mirror of
https://github.com/A2osX/A2osX.git
synced 2024-06-08 08:33:37 +00:00
LS: Added CS.RUN.ISATTY and fixed EOL handling
This commit is contained in:
parent
4d20317dd6
commit
ddf9321150
21
BIN/LS.S.txt
21
BIN/LS.S.txt
|
@ -39,7 +39,7 @@ bColumn .BS 1
|
||||||
bFullPath .BS 1
|
bFullPath .BS 1
|
||||||
bLong .BS 1
|
bLong .BS 1
|
||||||
bRecurse .BS 1
|
bRecurse .BS 1
|
||||||
|
bIsTTY .BS 1
|
||||||
|
|
||||||
ZS.END .ED
|
ZS.END .ED
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
@ -90,6 +90,9 @@ CS.INIT clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN
|
CS.RUN
|
||||||
|
stz bIsTTY
|
||||||
|
jsr CS.RUN.ISATTY
|
||||||
|
|
||||||
.1 inc ArgCount
|
.1 inc ArgCount
|
||||||
lda ArgCount
|
lda ArgCount
|
||||||
>SYSCALL ArgV
|
>SYSCALL ArgV
|
||||||
|
@ -689,6 +692,9 @@ CS.RUN.NewLine.1
|
||||||
lda #C.CR
|
lda #C.CR
|
||||||
>SYSCALL PutChar
|
>SYSCALL PutChar
|
||||||
|
|
||||||
|
lda bIsTTY
|
||||||
|
beq CS.RUN.NewLine.8
|
||||||
|
|
||||||
lda #C.LF
|
lda #C.LF
|
||||||
>SYSCALL PutChar
|
>SYSCALL PutChar
|
||||||
|
|
||||||
|
@ -696,6 +702,19 @@ CS.RUN.NewLine.8
|
||||||
clc
|
clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
CS.RUN.ISATTY ldy #S.PS.hStdOut
|
||||||
|
lda (pPS),y
|
||||||
|
tax
|
||||||
|
lsr
|
||||||
|
bcc .9
|
||||||
|
lda Nod.Table.hFD-2,x
|
||||||
|
>SYSCALL GetMemPtr
|
||||||
|
>STYA ZPPtr1
|
||||||
|
lda (ZPPtr1)
|
||||||
|
beq .9
|
||||||
|
inc bIsTTY
|
||||||
|
.9 rts
|
||||||
|
*--------------------------------------
|
||||||
CS.DOEVENT sec
|
CS.DOEVENT sec
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue
Block a user