A2osX/BIN/CSH.S.DIR.txt
2021-05-04 19:31:21 +02:00

136 lines
1.8 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NEW
AUTO 3,1
.LIST OFF
*--------------------------------------
CSH.DIR jsr CSH.GetNextCharNB
bcs .99
cmp #'!' #!/bin/csh
bne .1
jmp CSH.SkipLine
.1 >LDYA L.CSH.DIRS
jsr CSH.LookupID
bcs .91
jmp (J.CSH.DIRS,x)
.91 lda #E.CSYN
sec
.99 rts
*--------------------------------------
CSH.DIR.DEFINE jsr CSH.CheckSpace
bcs .99
jsr CSH.IsLetter
bcs .90
>LDA.G CSH.hDefines
jsr CSH.NewKey
bcs .99
>STYA ZPVarID
jsr CSH.CheckSpace
bcs .99
ldy #$ff
.1 iny
lda (ZPInputBufPtr),y
beq .2
cmp #C.CR
bne .1
dey
.2 iny
phy
>PUSHB.G CSH.hDefines
>PUSHW ZPVarID
>PUSHW ZPInputBufPtr
ply
lda #0
>PUSHYA DataLen
>SYSCALL SListAddData
bcs .99
jmp CSH.SkipLine
.90 lda #E.CSYN
sec
.99 rts
*--------------------------------------
CSH.DIR.INCLUDE >STZ.G PathBuf
jsr CSH.CheckSpace
bcs .99
cmp #'"'
beq .1
cmp #'<'
bne .90
>PUSHW L.ENV.INCLUDE
>PUSHEA.G PathBuf
>SYSCALL GetEnv
lda #'>'
.1 sta ArgIndex
ldy #PathBuf
.2 lda (pData),y
beq .3
iny
bra .2
.3 jsr CSH.GetNextChar
beq .90
cmp ArgIndex
beq .8
sta (pData),y
iny
cpy #64
bne .3
.90 lda #E.CSYN
sec
.99 rts
.8 jsr CSH.GetNextChar skip " or >
lda hInclude
bne .90
lda hDefine
bne .90
>LDYA ZPInputBufPtr
>STYA.G CSH.SaveInclude
>LDYA pData
jsr CS.RUN.LoadFile
bcs .99
stx hInclude
>STYA ZPInputBufPtr
rts
*--------------------------------------
MAN
SAVE usr/src/bin/csh.s.dir
LOAD usr/src/bin/csh.s
ASM