A2osX/BIN/CC.S.DIR.txt
2022-02-04 15:57:17 +01:00

129 lines
1.7 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
*--------------------------------------
CC.DIR jsr CC.GetNextCharNB
bcs .99
cmp #'!' #!/bin/cc
bne .1
jmp CC.SkipLine
.1 >LDYA L.CC.DIRS
jsr CC.LookupID
bcs .91
jmp (J.CC.DIRS,x)
.91 lda #E.CSYN
sec
.99 rts
*--------------------------------------
CC.DIR.DEFINE jsr CC.CheckSpace
bcs .99
jsr CC.IsLetter
bcs .90
>LDA.G CC.hDefines
jsr CC.SYM.NewKey
bcs .99
>STYA ZPSymID
jsr CC.SkipX
jsr CC.CheckSpace
bcs .99
ldy #$ff
.1 iny
lda (ZPLineBufPtr),y
beq .2
cmp #C.CR
bne .1
dey
.2 iny
phy
>PUSHB.G CC.hDefines
>PUSHW ZPSymID
>PUSHW ZPLineBufPtr
ply
lda #0
>PUSHYA DataLen
>SYSCALL SListAddData
bcs .99
jmp CC.SkipLine
.90 lda #E.CSYN
sec
.99 rts
*--------------------------------------
CC.DIR.INCLUDE lda #0 >STZ.G PathBuf
sta (pData)
jsr CC.CheckSpace
bcs .99
cmp #'"'
beq .1
cmp #'<'
bne .90
>PUSHW L.ENV.INCLUDE
>PUSHW pData >PUSHEA.G PathBuf
>SYSCALL GetEnv
bcs .90
lda #'>'
.1 sta ArgIndex
ldy #$ff
.2 iny
lda (pData),y
bne .2
.3 jsr CC.GetNextChar
beq .90
cmp ArgIndex
beq .8
sta (pData),y
iny
cpy #64
bne .3
.90 lda #E.CSYN
sec
.99 rts
.8 lda #0
sta (pData),y terminate string
jsr CC.GetNextChar skip " or >
>LDYA pData
jsr CS.RUN.FOpen
bcs .99
rts
*--------------------------------------
MAN
SAVE usr/src/bin/cc.s.dir
LOAD usr/src/bin/cc.s
ASM