A2osX/BIN/ASM.S.DIR.txt
2015-10-30 17:34:59 +01:00

219 lines
4.0 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.

PR#3
PREFIX /A2OSX.SRC
NEW
INC 1
AUTO 6
.LIST OFF
*---------------------------------------
DIR.AC clc
rts
*---------------------------------------
DIR.AS clc
rts
*---------------------------------------
DIR.AT clc
rts
*---------------------------------------
DIR.AZ clc
rts
*---------------------------------------
DIR.BS clc
rts
*---------------------------------------
DIR.DA clc
rts
*---------------------------------------
DIR.DO clc
rts
*---------------------------------------
DIR.DU clc
rts
*---------------------------------------
DIR.ED clc
rts
*---------------------------------------
DIR.EL clc
rts
*---------------------------------------
DIR.EM lda #ERR.INVALID.MACRO.DEF
sec
rts
*---------------------------------------
DIR.EN clc
rts
*---------------------------------------
DIR.EP clc
rts
*---------------------------------------
DIR.EQ jsr EXP.Eval
bcs .9
clc
.9 rts
*---------------------------------------
DIR.FI clc
rts
*---------------------------------------
DIR.HS clc
rts
*---------------------------------------
DIR.IN jsr SRC.GetArg
bcs .9
>LDYA L.SRC.BUFFER
>SYSCALL SYS.NewPStrYA
jsr FIO.OpenFileA
bcs .99
rts
.9 lda #ERR.SYNTAX.ERROR
.99 sec
rts
*---------------------------------------
DIR.LI >LDYA L.T.LI
jsr SRC.GetKeyword
bcc .1
lda #ERR.SYNTAX.ERROR
sec
rts
.1 jmp (J.LI,x)
DIR.LI.CON ldy #ASM.LI.CON
sec
bra DIR.LI.APPLY
DIR.LI.COFF ldy #ASM.LI.CON
clc
bra DIR.LI.APPLY
DIR.LI.XON ldy #ASM.LI.XON
sec
bra DIR.LI.APPLY
DIR.LI.XOFF ldy #ASM.LI.XON
clc
bra DIR.LI.APPLY
DIR.LI.ON ldy #ASM.LI.ON
sec
bra DIR.LI.APPLY
DIR.LI.OFF ldy #ASM.LI.ON
clc
DIR.LI.APPLY lsr
sta (pData),y
rts
*---------------------------------------
DIR.MA jsr SRC.GetArg
bcs .9
.1 jsr FIO.ReadLine
bcs .99
lda TmpBuffer256
beq .1
cmp #'*' Comment?
beq .8
cmp #';' Comment?
beq .8
cmp #' ' no label...go scan dir/opcode
beq .3
.2 jsr SRC.GetChar skip label
beq .8
cmp #' '
bne .2
.3 jsr SRC.GetCharNB Scan for an Opcode...
beq .8
cmp #'.'
bne .8
jsr SRC.GetChar
beq .8
cmp #'E'
bne .8
jsr SRC.GetChar
beq .8
cmp #'M'
bne .8
clc
rts
.8 ldy #ASM.PASS If Pass#2, ignore
lda (pData),y
bne .1
bra .1
clc
rts
.9 lda #ERR.INVALID.MACRO.DEF
sec
.99 rts
*---------------------------------------
DIR.OP jsr SRC.GetArg
bcs .9
ldx SRC.Buffer
lda ASM.T.FILENAMELEN
adc SRC.Buffer
sta ASM.T.FILENAME
tay
.1 lda SRC.Buffer,x
sta ASM.T.FILENAME,y
dey
dex
bne .1
jmp LOAD.ASM.T
.9 lda #ERR.SYNTAX.ERROR
sec
rts
*---------------------------------------
DIR.OR jsr EXP.Eval
bcs .9
ldy #ASM.PC
ldx #0
.1 lda SRC.ACC,x
sta (pData),y
inx
iny
cpx #4
bne .1
clc
.9 rts
*---------------------------------------
DIR.PG clc
rts
*---------------------------------------
DIR.PH clc
rts
*---------------------------------------
DIR.SE clc
rts
*---------------------------------------
DIR.TA clc
rts
*---------------------------------------
DIR.TF clc
rts
*---------------------------------------
DIR.TI clc
rts
*---------------------------------------
DIR.US clc
rts
*---------------------------------------
MAN
SAVE BIN/ASM.S.DIR
LOAD BIN/ASM.S
ASM