Correcting alignment

This commit is contained in:
jede 2017-02-02 00:05:50 +01:00
parent bbff709d9f
commit 4b77072fed
3 changed files with 24 additions and 26 deletions

View file

@ -6,7 +6,7 @@
.include "zeropage.inc"
.include "telestrat.inc"
.include "errno.inc"
.include "errno.inc"
.include "fcntl.inc"
; int open (const char* name, int flags, ...); /* May take a mode argument */

View file

@ -26,14 +26,14 @@ initmainargs:
L0: lda BUFEDT,x
beq L3
cmp #' '
bne L1
lda #0
beq L3
bne L1
lda #0
beq L3
L1: sta name,x
inx
cpx #FNAME_LEN
cpx #FNAME_LEN
bne L0
lda #0
lda #0
L3:
sta name,x
inc __argc ; argc always is equal to, at least, 1
@ -57,7 +57,7 @@ setterm:sta term ; Set end of argument marker
; Now, store a pointer, to the argument, into the next slot.
txa ; Get low byte
clc
clc
adc #<BUFEDT
bcc L4
inc L5+1

View file

@ -24,25 +24,23 @@
stx ptr1+1
jsr popax ; get fd and discard
; if fd=0001 then it stdout
cpx #0
beq next
jmp L1
; if fd=0001 then it stdout
cpx #0
beq next
jmp L1
next:
cmp #1
beq L1
cmp #1
beq L1
; Here it's a file opened
lda ptr1
sta PTR_READ_DEST
lda ptr1+1
sta PTR_READ_DEST+1
lda ptr3
ldy ptr3+1
BRK_TELEMON XFWRITE
rts
; Here it's a file opened
lda ptr1
sta PTR_READ_DEST
lda ptr1+1
sta PTR_READ_DEST+1
lda ptr3
ldy ptr3+1
BRK_TELEMON XFWRITE
rts
L1: inc ptr2
@ -54,9 +52,9 @@ L2: ldy #0
tax
cpx #$0A ; Check for \n
bne L3
BRK_TELEMON XWR0 ; Macro send char to screen (channel 0 in telemon terms)
BRK_TELEMON XWR0 ; Macro send char to screen (channel 0 in telemon terms)
lda #$0D ; return to the beggining of the line
BRK_TELEMON XWR0 ; Macro ;
BRK_TELEMON XWR0 ; Macro ;
ldx #$0D