mirror of https://github.com/A2osX/A2osX.git
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
|
||||
bLong .BS 1
|
||||
bRecurse .BS 1
|
||||
|
||||
bIsTTY .BS 1
|
||||
|
||||
ZS.END .ED
|
||||
*--------------------------------------
|
||||
|
@ -90,6 +90,9 @@ CS.INIT clc
|
|||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN
|
||||
stz bIsTTY
|
||||
jsr CS.RUN.ISATTY
|
||||
|
||||
.1 inc ArgCount
|
||||
lda ArgCount
|
||||
>SYSCALL ArgV
|
||||
|
@ -689,6 +692,9 @@ CS.RUN.NewLine.1
|
|||
lda #C.CR
|
||||
>SYSCALL PutChar
|
||||
|
||||
lda bIsTTY
|
||||
beq CS.RUN.NewLine.8
|
||||
|
||||
lda #C.LF
|
||||
>SYSCALL PutChar
|
||||
|
||||
|
@ -696,6 +702,19 @@ CS.RUN.NewLine.8
|
|||
clc
|
||||
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
|
||||
rts
|
||||
*--------------------------------------
|
||||
|
|
Loading…
Reference in New Issue