mirror of
https://github.com/cc65/cc65.git
synced 2025-02-25 01:29:04 +00:00
Correcting alignment
This commit is contained in:
parent
bbff709d9f
commit
4b77072fed
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
.include "zeropage.inc"
|
.include "zeropage.inc"
|
||||||
.include "telestrat.inc"
|
.include "telestrat.inc"
|
||||||
.include "errno.inc"
|
.include "errno.inc"
|
||||||
.include "fcntl.inc"
|
.include "fcntl.inc"
|
||||||
|
|
||||||
; int open (const char* name, int flags, ...); /* May take a mode argument */
|
; int open (const char* name, int flags, ...); /* May take a mode argument */
|
||||||
|
@ -26,14 +26,14 @@ initmainargs:
|
|||||||
L0: lda BUFEDT,x
|
L0: lda BUFEDT,x
|
||||||
beq L3
|
beq L3
|
||||||
cmp #' '
|
cmp #' '
|
||||||
bne L1
|
bne L1
|
||||||
lda #0
|
lda #0
|
||||||
beq L3
|
beq L3
|
||||||
L1: sta name,x
|
L1: sta name,x
|
||||||
inx
|
inx
|
||||||
cpx #FNAME_LEN
|
cpx #FNAME_LEN
|
||||||
bne L0
|
bne L0
|
||||||
lda #0
|
lda #0
|
||||||
L3:
|
L3:
|
||||||
sta name,x
|
sta name,x
|
||||||
inc __argc ; argc always is equal to, at least, 1
|
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.
|
; Now, store a pointer, to the argument, into the next slot.
|
||||||
|
|
||||||
txa ; Get low byte
|
txa ; Get low byte
|
||||||
clc
|
clc
|
||||||
adc #<BUFEDT
|
adc #<BUFEDT
|
||||||
bcc L4
|
bcc L4
|
||||||
inc L5+1
|
inc L5+1
|
||||||
|
@ -24,25 +24,23 @@
|
|||||||
stx ptr1+1
|
stx ptr1+1
|
||||||
jsr popax ; get fd and discard
|
jsr popax ; get fd and discard
|
||||||
|
|
||||||
; if fd=0001 then it stdout
|
; if fd=0001 then it stdout
|
||||||
|
cpx #0
|
||||||
|
beq next
|
||||||
cpx #0
|
jmp L1
|
||||||
beq next
|
|
||||||
jmp L1
|
|
||||||
next:
|
next:
|
||||||
cmp #1
|
cmp #1
|
||||||
beq L1
|
beq L1
|
||||||
|
|
||||||
; Here it's a file opened
|
; Here it's a file opened
|
||||||
lda ptr1
|
lda ptr1
|
||||||
sta PTR_READ_DEST
|
sta PTR_READ_DEST
|
||||||
lda ptr1+1
|
lda ptr1+1
|
||||||
sta PTR_READ_DEST+1
|
sta PTR_READ_DEST+1
|
||||||
lda ptr3
|
lda ptr3
|
||||||
ldy ptr3+1
|
ldy ptr3+1
|
||||||
BRK_TELEMON XFWRITE
|
BRK_TELEMON XFWRITE
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
L1: inc ptr2
|
L1: inc ptr2
|
||||||
@ -54,9 +52,9 @@ L2: ldy #0
|
|||||||
tax
|
tax
|
||||||
cpx #$0A ; Check for \n
|
cpx #$0A ; Check for \n
|
||||||
bne L3
|
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
|
lda #$0D ; return to the beggining of the line
|
||||||
BRK_TELEMON XWR0 ; Macro ;
|
BRK_TELEMON XWR0 ; Macro ;
|
||||||
|
|
||||||
|
|
||||||
ldx #$0D
|
ldx #$0D
|
||||||
|
Loading…
x
Reference in New Issue
Block a user