2018-01-10 16:34:57 +00:00
|
|
|
|
NEW
|
2018-11-17 17:17:13 +00:00
|
|
|
|
PREFIX
|
2018-01-10 16:34:57 +00:00
|
|
|
|
AUTO 4,1
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
2018-07-24 16:00:24 +00:00
|
|
|
|
.TF BIN/DEV/ASM
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*---------------------------------------
|
2018-07-23 15:28:42 +00:00
|
|
|
|
.INB INC/MACROS.I
|
|
|
|
|
.INB INC/A2OSX.I
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
ZPPtr1 .EQ ZPBIN
|
|
|
|
|
ZPPtr2 .EQ ZPBIN+2
|
|
|
|
|
|
|
|
|
|
ZPLineBuf .EQ ZPBIN+4
|
|
|
|
|
ZPLinePtr .EQ ZPBIN+6
|
|
|
|
|
ZPNameBuf .EQ ZPBIN+8
|
|
|
|
|
ZPGlobalBuf .EQ ZPBIN+10
|
|
|
|
|
ZPLookupBuf .EQ ZPBIN+12
|
|
|
|
|
|
2018-04-06 15:10:02 +00:00
|
|
|
|
ZPMacroBuf .EQ ZPBIN+14
|
|
|
|
|
ZPCtxBuf .EQ ZPBIN+16
|
2018-03-28 15:23:32 +00:00
|
|
|
|
|
|
|
|
|
ZPAMPtr .EQ ZPBIN+18
|
|
|
|
|
ZPRPtr .EQ ZPBIN+20
|
|
|
|
|
ZPOpsPtr .EQ ZPBIN+22
|
|
|
|
|
ZPOpDefPtr .EQ ZPBIN+24
|
2018-04-06 15:10:02 +00:00
|
|
|
|
|
|
|
|
|
ZPTmpBuf .EQ ZPBIN+16
|
2015-10-06 16:14:48 +00:00
|
|
|
|
*---------------------------------------
|
2019-01-29 16:42:06 +00:00
|
|
|
|
* Symbols
|
|
|
|
|
*---------------------------------------
|
|
|
|
|
SYM.F.PENDING .EQ %10000000
|
|
|
|
|
SYM.F.RW .EQ %01000000
|
|
|
|
|
*---------------------------------------
|
|
|
|
|
SYMG.TYPE .EQ 0 1,2,3,4
|
|
|
|
|
SYMG.TYPE.S .EQ $ff String
|
2018-03-28 15:23:32 +00:00
|
|
|
|
SYMG.F .EQ 1
|
|
|
|
|
SYMG.V .EQ 2
|
2018-03-23 15:57:35 +00:00
|
|
|
|
*
|
2019-01-29 16:42:06 +00:00
|
|
|
|
SYMG.SIZE .EQ 6 DWORD
|
2018-03-22 16:45:23 +00:00
|
|
|
|
*---------------------------------------
|
2019-01-29 16:42:06 +00:00
|
|
|
|
SYML.ID .EQ 0 1..255
|
|
|
|
|
SYML.F .EQ 1
|
|
|
|
|
SYML.V .EQ 2 DWORD
|
2018-03-23 15:57:35 +00:00
|
|
|
|
*
|
2019-01-29 16:42:06 +00:00
|
|
|
|
SYML.SIZE .EQ 6
|
2018-01-19 16:21:31 +00:00
|
|
|
|
*---------------------------------------
|
2018-04-06 15:10:02 +00:00
|
|
|
|
MCTX.LEN .EQ 0
|
|
|
|
|
MCTX.PTR .EQ 1
|
|
|
|
|
MCTX.ID .EQ 2
|
|
|
|
|
MCTX.ARGS .EQ 4
|
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
ASM.T.AM .EQ 0
|
|
|
|
|
ASM.T.R .EQ 2
|
|
|
|
|
ASM.T.O .EQ 4
|
2015-10-28 16:55:12 +00:00
|
|
|
|
*---------------------------------------
|
2018-04-06 15:10:02 +00:00
|
|
|
|
DO.MAXDEPTH .EQ 8
|
|
|
|
|
IN.MAXDEPTH .EQ 7
|
|
|
|
|
MA.MAXDEPTH .EQ 8
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*---------------------------------------
|
2015-10-06 16:14:48 +00:00
|
|
|
|
ERR.INV.ARGS .EQ $80
|
2018-04-06 15:10:02 +00:00
|
|
|
|
ERR.INV.T.FILE .EQ $81
|
2015-10-06 16:14:48 +00:00
|
|
|
|
ERR.SRC.INV.TYPE .EQ $90
|
|
|
|
|
ERR.SRC.TOO.MANY.IN .EQ $91
|
2015-10-09 15:53:30 +00:00
|
|
|
|
ERR.SRC.UNEXP.EOF .EQ $92
|
2015-10-06 16:14:48 +00:00
|
|
|
|
ERR.SYNTAX.ERROR .EQ $A0
|
|
|
|
|
ERR.SYM.TOO.LONG .EQ $A1
|
|
|
|
|
ERR.VAL.TOO.BIG .EQ $A2
|
|
|
|
|
ERR.LINE.TOO.LONG .EQ $A3
|
2018-01-11 16:34:09 +00:00
|
|
|
|
ERR.INV.LABEL .EQ $A4
|
2018-01-23 16:52:22 +00:00
|
|
|
|
ERR.INV.DIR .EQ $A5
|
2018-01-11 16:34:09 +00:00
|
|
|
|
ERR.INV.OPCODE .EQ $A6
|
|
|
|
|
ERR.INV.AM.SYN .EQ $A7
|
2018-03-21 16:22:05 +00:00
|
|
|
|
ERR.INV.AM .EQ $A8
|
|
|
|
|
ERR.INV.AM.4.OC .EQ $A9
|
|
|
|
|
ERR.RANGE .EQ $AA
|
|
|
|
|
ERR.UNDEF.SYMBOL .EQ $AB
|
|
|
|
|
ERR.SYMBOL.REDEF .EQ $AC
|
|
|
|
|
ERR.TOO.MANY.DO .EQ $AD
|
|
|
|
|
ERR.ELSE.WITHOUT.DO .EQ $AE
|
|
|
|
|
ERR.TOO.MANY.LOCAL .EQ $AF
|
2015-10-09 15:53:30 +00:00
|
|
|
|
ERR.MISSING.EXP .EQ $B0
|
|
|
|
|
ERR.EXP.SYN.ERROR .EQ $B1
|
2018-01-29 16:48:07 +00:00
|
|
|
|
ERR.MACRO.INV.DEF .EQ $E0
|
|
|
|
|
ERR.MACRO.TOO.BIG .EQ $E1
|
2018-04-06 15:10:02 +00:00
|
|
|
|
ERR.MACRO.INV .EQ $E2
|
|
|
|
|
ERR.MACRO.TOO.MANY .EQ $E3
|
2015-08-05 20:38:05 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* File Header (16 Bytes)
|
|
|
|
|
*--------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
CS.START cld
|
|
|
|
|
jmp (.1,x)
|
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 BIN Layout Version 1
|
2018-11-26 21:52:49 +00:00
|
|
|
|
.DA #S.PS.F.EVENT S.PS.F
|
|
|
|
|
.DA #0
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.DA CS.END-CS.START CS
|
|
|
|
|
.DA DS.END-DS.START DS
|
|
|
|
|
.DA #0 SS
|
|
|
|
|
.DA #32 ZP
|
|
|
|
|
.DA 0
|
2015-08-05 20:38:05 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
|
|
|
|
*--------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.1 .DA CS.INIT
|
|
|
|
|
.DA CS.RUN
|
|
|
|
|
.DA CS.DOEVENT
|
|
|
|
|
.DA CS.QUIT
|
|
|
|
|
L.MSG.HELP .DA MSG.HELP
|
|
|
|
|
L.MSG.OUT0 .DA MSG.OUT0
|
|
|
|
|
.DA MSG.OUT1
|
|
|
|
|
.DA MSG.OUT2
|
|
|
|
|
.DA MSG.OUT3
|
|
|
|
|
L.MSG.EQU0 .DA MSG.EQU0
|
|
|
|
|
.DA MSG.EQU1
|
|
|
|
|
.DA MSG.EQU2
|
|
|
|
|
.DA MSG.EQU3
|
|
|
|
|
.DA MSG.EQU4
|
2018-03-30 15:21:42 +00:00
|
|
|
|
L.MSG.LSYMBOL .DA MSG.LSYMBOL
|
2018-03-28 15:23:32 +00:00
|
|
|
|
L.MSG.SRCLINE .DA MSG.SRCLINE
|
|
|
|
|
L.MSG.ERROR .DA MSG.ERROR
|
|
|
|
|
L.MSG.SYMBOLS .DA MSG.SYMBOLS
|
|
|
|
|
L.MSG.PSTRCRLF .DA MSG.PSTRCRLF
|
2018-03-30 15:21:42 +00:00
|
|
|
|
L.MSG.PSTR .DA MSG.PSTR
|
|
|
|
|
L.MSG.CRLF .DA MSG.CRLF
|
2018-03-28 15:23:32 +00:00
|
|
|
|
L.MSG.SUMMARY .DA MSG.SUMMARY
|
|
|
|
|
L.MSG.PASS .DA MSG.PASS
|
|
|
|
|
L.MSG.SRC.FILE .DA MSG.SRC.FILE
|
|
|
|
|
L.MSG.OBJ.FILE .DA MSG.OBJ.FILE
|
|
|
|
|
L.MSG.T.FILE .DA MSG.T.FILE
|
|
|
|
|
L.SRC.AM.StrBuf .DA SRC.AM.StrBuf
|
|
|
|
|
L.ASM.6502 .DA ASM.6502
|
2015-10-21 16:24:11 +00:00
|
|
|
|
L.ASM.T.FILENAME .DA ASM.T.FILENAME
|
2018-03-28 15:23:32 +00:00
|
|
|
|
L.FIO.Stat .DA FIO.Stat
|
|
|
|
|
L.T.DIRECTIVES .DA T.DIRECTIVES
|
|
|
|
|
J.DIRECTIVES .DA DIR.AC
|
|
|
|
|
.DA DIR.AS
|
|
|
|
|
.DA DIR.AT
|
|
|
|
|
.DA DIR.AZ
|
|
|
|
|
.DA DIR.BS
|
|
|
|
|
.DA DIR.DA
|
|
|
|
|
.DA DIR.DO
|
|
|
|
|
.DA DIR.DU
|
|
|
|
|
.DA DIR.DU
|
|
|
|
|
.DA DIR.ED
|
|
|
|
|
.DA DIR.EL
|
|
|
|
|
.DA DIR.EM
|
|
|
|
|
.DA DIR.EN
|
|
|
|
|
.DA DIR.EP
|
|
|
|
|
.DA DIR.EQ
|
|
|
|
|
.DA DIR.FI
|
|
|
|
|
.DA DIR.HS
|
|
|
|
|
.DA DIR.IN
|
|
|
|
|
.DA DIR.IN
|
|
|
|
|
.DA DIR.IN
|
|
|
|
|
.DA DIR.IN
|
|
|
|
|
.DA DIR.IN
|
|
|
|
|
.DA DIR.IN
|
|
|
|
|
.DA DIR.IN
|
|
|
|
|
.DA DIR.IN
|
|
|
|
|
.DA DIR.IN
|
|
|
|
|
.DA DIR.IN
|
|
|
|
|
.DA DIR.IN
|
|
|
|
|
.DA DIR.LI
|
|
|
|
|
.DA DIR.LI
|
|
|
|
|
.DA DIR.MA
|
|
|
|
|
.DA DIR.OP
|
|
|
|
|
.DA DIR.OR
|
|
|
|
|
.DA DIR.PG
|
|
|
|
|
.DA DIR.PH
|
|
|
|
|
.DA DIR.SE
|
|
|
|
|
.DA DIR.TA
|
|
|
|
|
.DA DIR.TF
|
|
|
|
|
.DA DIR.TI
|
|
|
|
|
.DA DIR.US
|
|
|
|
|
L.T.LI .DA T.LI
|
|
|
|
|
J.LI .DA DIR.LI.ON
|
|
|
|
|
.DA DIR.LI.OFF
|
|
|
|
|
.DA DIR.LI.CON
|
|
|
|
|
.DA DIR.LI.COFF
|
|
|
|
|
.DA DIR.LI.MON
|
|
|
|
|
.DA DIR.LI.MOFF
|
|
|
|
|
.DA DIR.LI.XON
|
|
|
|
|
.DA DIR.LI.XOFF
|
|
|
|
|
J.EXP.MOD .DA EXP.MOD.8.1 #/^<>
|
|
|
|
|
.DA EXP.MOD.8.2
|
|
|
|
|
.DA EXP.MOD.8.3
|
|
|
|
|
.DA EXP.MOD.24
|
|
|
|
|
.DA EXP.MOD.32
|
|
|
|
|
J.EXP.OP .DA EXP.OP.EOR ^!|&<=>+-*/
|
|
|
|
|
.DA EXP.OP.ORA
|
|
|
|
|
.DA EXP.OP.ORA
|
|
|
|
|
.DA EXP.OP.AND
|
|
|
|
|
.DA EXP.OP.LOW
|
|
|
|
|
.DA EXP.OP.EQU
|
|
|
|
|
.DA EXP.OP.GRT
|
|
|
|
|
.DA EXP.OP.ADD
|
|
|
|
|
.DA EXP.OP.SUB
|
|
|
|
|
.DA EXP.OP.MUL
|
|
|
|
|
.DA EXP.OP.DIV
|
|
|
|
|
.DA 0
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
CS.INIT ldy #S.PS.ARGC
|
|
|
|
|
lda (pPs),y
|
|
|
|
|
beq .99
|
|
|
|
|
|
|
|
|
|
lda #1
|
2018-10-16 15:48:03 +00:00
|
|
|
|
>SYSCALL ArgV
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL RealPath
|
2018-03-28 15:23:32 +00:00
|
|
|
|
|
|
|
|
|
txa
|
|
|
|
|
ldy #SRC.hFILENAME
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
|
|
|
|
jsr FIO.Init
|
|
|
|
|
bcs .9
|
2017-07-07 15:13:55 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr SYM.Init
|
|
|
|
|
bcs .9
|
2017-07-07 15:13:55 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr MAC.Init
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
jsr OUT.Init
|
2018-01-29 07:41:05 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
>LDYAI 256
|
2018-07-20 11:51:08 +00:00
|
|
|
|
>SYSCALL getmem
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
>STYA ZPLineBuf
|
|
|
|
|
txa
|
|
|
|
|
>STA.G SRC.hLineBuf
|
2018-01-11 16:34:09 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
>LDYAI 256
|
2018-07-20 11:51:08 +00:00
|
|
|
|
>SYSCALL getmem
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
>STYA ZPTmpBuf
|
|
|
|
|
txa
|
|
|
|
|
>STA.G SRC.hTmpBuf
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
2018-11-26 21:52:49 +00:00
|
|
|
|
.99 >PUSHBI 0
|
|
|
|
|
>LDYA L.MSG.HELP
|
2018-06-21 15:12:10 +00:00
|
|
|
|
>SYSCALL printf
|
2018-03-28 15:23:32 +00:00
|
|
|
|
lda #ERR.INV.ARGS
|
|
|
|
|
sec
|
2015-12-04 16:33:33 +00:00
|
|
|
|
.9 rts
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*--------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
CS.RUN >SYSCALL GetChar
|
2018-04-06 15:10:02 +00:00
|
|
|
|
bcs .13 no char
|
2018-03-28 15:23:32 +00:00
|
|
|
|
|
2018-04-06 15:10:02 +00:00
|
|
|
|
cmp #$03 Ctrl-C
|
|
|
|
|
beq .99 Abort....beq=CS
|
|
|
|
|
|
|
|
|
|
cmp #$13 Ctrl-S
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bne .11
|
|
|
|
|
|
2018-04-06 15:10:02 +00:00
|
|
|
|
>LDA.G bPause
|
2018-03-28 15:23:32 +00:00
|
|
|
|
eor #$ff
|
|
|
|
|
sta (pData),y
|
|
|
|
|
|
2018-04-06 15:10:02 +00:00
|
|
|
|
bpl .12
|
|
|
|
|
clc
|
|
|
|
|
rts
|
2017-07-07 15:13:55 +00:00
|
|
|
|
|
2018-04-06 15:10:02 +00:00
|
|
|
|
.13 >LDA.G bPause
|
2018-11-26 21:52:49 +00:00
|
|
|
|
bpl .11
|
|
|
|
|
clc
|
|
|
|
|
rts
|
2018-04-06 15:10:02 +00:00
|
|
|
|
|
|
|
|
|
.11 >STZ.G bPause
|
|
|
|
|
|
|
|
|
|
.12 >LDA.G SRC.COUNT root file is already opened?
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bne .10
|
2017-07-07 15:13:55 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
>LDA.G ASM.PASS
|
|
|
|
|
inc
|
|
|
|
|
>PUSHA
|
2018-11-26 21:52:49 +00:00
|
|
|
|
>PUSHBI 1
|
2018-03-28 15:23:32 +00:00
|
|
|
|
>LDYA L.MSG.PASS
|
|
|
|
|
jsr OUT.Print
|
2015-03-14 21:47:37 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
ldy #SRC.hFILENAME
|
|
|
|
|
lda (pData),y
|
2017-07-07 15:13:55 +00:00
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL GetMemPtr
|
2018-03-28 15:23:32 +00:00
|
|
|
|
|
|
|
|
|
jsr FIO.OpenFile
|
|
|
|
|
bcs .99
|
|
|
|
|
|
|
|
|
|
jsr DIR.Reset
|
|
|
|
|
jsr SYM.Reset
|
2018-04-06 15:10:02 +00:00
|
|
|
|
jsr MAC.Reset
|
2018-03-28 15:23:32 +00:00
|
|
|
|
|
|
|
|
|
.10 jsr FIO.ReadLine
|
|
|
|
|
bcc .2
|
2018-04-06 15:10:02 +00:00
|
|
|
|
cmp #$4C End Of File?
|
2018-03-28 15:23:32 +00:00
|
|
|
|
bne .9
|
|
|
|
|
|
|
|
|
|
jsr FIO.FileClose
|
|
|
|
|
|
|
|
|
|
ldy #SRC.COUNT end of root file ?
|
|
|
|
|
lda (pData),y
|
|
|
|
|
bne .8 no continue back to previous file
|
|
|
|
|
|
|
|
|
|
jsr SYM.FlushGlobal Store last Symbol, if any....
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
>LDA.G ASM.PASS End of pass #2 ??
|
|
|
|
|
bne .1
|
|
|
|
|
inc
|
|
|
|
|
sta (pData),y
|
|
|
|
|
clc
|
|
|
|
|
.99 rts
|
|
|
|
|
|
|
|
|
|
.1 jsr SYM.Dump
|
|
|
|
|
>PUSHW ZPLinePtr
|
2019-01-28 07:44:37 +00:00
|
|
|
|
>PUSHBI 2
|
2018-03-28 15:23:32 +00:00
|
|
|
|
>LDYA L.MSG.SUMMARY
|
|
|
|
|
jsr OUT.Print
|
|
|
|
|
|
|
|
|
|
lda #0 End of assembly, exit with no error
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.2 jsr SRC.ParseLine
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
jsr OUT.PrintLine
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
2015-10-02 16:04:30 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.9 pha
|
|
|
|
|
jsr OUT.PrintLineErr
|
|
|
|
|
jsr SYM.Dump
|
|
|
|
|
pla
|
|
|
|
|
sec
|
|
|
|
|
rts
|
2015-08-05 20:38:05 +00:00
|
|
|
|
*--------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
CS.DOEVENT sec
|
|
|
|
|
rts
|
2015-08-05 20:38:05 +00:00
|
|
|
|
*--------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
CS.QUIT jsr FIO.FileClose
|
|
|
|
|
bne CS.QUIT
|
2015-10-02 16:04:30 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
jsr MAC.Quit
|
|
|
|
|
jsr SYM.Quit
|
|
|
|
|
|
|
|
|
|
>LDA.G ASM.T.hMem
|
|
|
|
|
beq .1
|
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL FreeMem
|
2018-03-28 15:23:32 +00:00
|
|
|
|
|
|
|
|
|
.1 >LDA.G SRC.hFILENAME
|
|
|
|
|
beq .2
|
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL FreeMem
|
2018-03-28 15:23:32 +00:00
|
|
|
|
|
|
|
|
|
.2 >LDA.G SRC.hLineBuf
|
|
|
|
|
beq .3
|
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL FreeMem
|
2018-03-28 15:23:32 +00:00
|
|
|
|
|
|
|
|
|
.3 >LDA.G SRC.hTmpBuf
|
|
|
|
|
beq .8
|
|
|
|
|
|
2018-07-18 15:30:42 +00:00
|
|
|
|
>SYSCALL FreeMem
|
2018-03-28 15:23:32 +00:00
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
2015-08-05 20:38:05 +00:00
|
|
|
|
*---------------------------------------
|
2019-01-28 07:44:37 +00:00
|
|
|
|
.INB USR/SRC/BIN/ASM.S.DIR
|
|
|
|
|
.INB USR/SRC/BIN/ASM.S.EXP
|
|
|
|
|
.INB USR/SRC/BIN/ASM.S.FIO
|
|
|
|
|
.INB USR/SRC/BIN/ASM.S.MAC
|
|
|
|
|
.INB USR/SRC/BIN/ASM.S.OUT
|
|
|
|
|
.INB USR/SRC/BIN/ASM.S.SRC
|
|
|
|
|
.INB USR/SRC/BIN/ASM.S.SYM
|
2015-10-02 16:04:30 +00:00
|
|
|
|
*---------------------------------------
|
2015-03-14 21:47:37 +00:00
|
|
|
|
CS.END
|
2018-03-28 15:23:32 +00:00
|
|
|
|
T.DIRECTIVES >PSTR "AC"
|
|
|
|
|
>PSTR "AS"
|
|
|
|
|
>PSTR "AT"
|
|
|
|
|
>PSTR "AZ"
|
|
|
|
|
>PSTR "BS"
|
|
|
|
|
>PSTR "DA"
|
|
|
|
|
>PSTR "DO"
|
|
|
|
|
>PSTR "DU"
|
|
|
|
|
>PSTR "DUMMY"
|
|
|
|
|
>PSTR "ED"
|
|
|
|
|
>PSTR "ELSE"
|
|
|
|
|
>PSTR "EM"
|
|
|
|
|
>PSTR "EN"
|
|
|
|
|
>PSTR "EP"
|
|
|
|
|
>PSTR "EQ"
|
|
|
|
|
>PSTR "FIN"
|
|
|
|
|
>PSTR "HS"
|
|
|
|
|
>PSTR "IN"
|
|
|
|
|
>PSTR "INB"
|
|
|
|
|
>PSTR "INB1"
|
|
|
|
|
>PSTR "INB2"
|
|
|
|
|
>PSTR "INB3"
|
|
|
|
|
>PSTR "INB4"
|
|
|
|
|
>PSTR "INB5"
|
|
|
|
|
>PSTR "INB6"
|
|
|
|
|
>PSTR "INB7"
|
|
|
|
|
>PSTR "INB8"
|
|
|
|
|
>PSTR "INB9"
|
|
|
|
|
>PSTR "LI"
|
|
|
|
|
>PSTR "LIST"
|
|
|
|
|
>PSTR "MA"
|
|
|
|
|
>PSTR "OP"
|
|
|
|
|
>PSTR "OR"
|
|
|
|
|
>PSTR "PG"
|
|
|
|
|
>PSTR "PH"
|
|
|
|
|
>PSTR "SE"
|
|
|
|
|
>PSTR "TA"
|
|
|
|
|
>PSTR "TF"
|
|
|
|
|
>PSTR "TI"
|
|
|
|
|
>PSTR "US"
|
|
|
|
|
.HS 00
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
T.LI >PSTR "ON"
|
|
|
|
|
>PSTR "OFF"
|
|
|
|
|
>PSTR "CON"
|
|
|
|
|
>PSTR "COFF"
|
|
|
|
|
>PSTR "MON"
|
|
|
|
|
>PSTR "MOFF"
|
|
|
|
|
>PSTR "XON"
|
|
|
|
|
>PSTR "XOFF"
|
|
|
|
|
.HS 00
|
2015-10-06 16:14:48 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
ASM..T. .AZ ".T."
|
|
|
|
|
ASM.6502 .AZ "6502"
|
|
|
|
|
MSG.HELP .AZ "A2osX-Macro Assembler (S-C MASM 3.0 Based)\r\nUsage : ASM <src file> [type TXT ($04) or S-C/BAS ($FA)]\r\n"
|
2018-04-06 15:10:02 +00:00
|
|
|
|
MSG.PASS .AZ "*** Pass:#%d\r\n"
|
2018-03-28 15:23:32 +00:00
|
|
|
|
MSG.SRC.FILE .AZ "*** Reading SRC File:%s\r\n"
|
|
|
|
|
MSG.OBJ.FILE .AZ "*** Writing OBJ File:%s, Type=%02x\r\n"
|
|
|
|
|
MSG.T.FILE .AZ "*** Loading CPU File:%s\r\n"
|
|
|
|
|
MSG.OUT0 .AZ "%H- "
|
|
|
|
|
MSG.OUT1 .AZ "%H-%h "
|
|
|
|
|
MSG.OUT2 .AZ "%H-%h %h "
|
|
|
|
|
MSG.OUT3 .AZ "%H-%h %h %h"
|
|
|
|
|
MSG.EQU0 .AZ " [ ?]"
|
|
|
|
|
MSG.EQU1 .AZ " [ %h]"
|
|
|
|
|
MSG.EQU2 .AZ " [ %h%h]"
|
|
|
|
|
MSG.EQU3 .AZ " [ %h%h%h]"
|
|
|
|
|
MSG.EQU4 .AZ " [%h%h%h%h]"
|
2018-04-06 15:10:02 +00:00
|
|
|
|
MSG.LSYMBOL .AZ ", .%d=%h%h%h%h"
|
2018-03-28 15:23:32 +00:00
|
|
|
|
MSG.SRCLINE .AZ " %05D %s\r\n"
|
|
|
|
|
MSG.ERROR .AZ "*** Fatal Error $%h "
|
2018-11-26 21:52:49 +00:00
|
|
|
|
MSG.SYMBOLS .AZ "Symbol Table:"
|
2018-03-28 15:23:32 +00:00
|
|
|
|
MSG.PSTRCRLF .AZ " %S\r\n"
|
2018-03-30 15:21:42 +00:00
|
|
|
|
MSG.PSTR .AZ " %S"
|
|
|
|
|
MSG.CRLF .AZ " \r\n"
|
2018-03-28 15:23:32 +00:00
|
|
|
|
MSG.SUMMARY .AZ "\r\nSymbol Table Size : %5D Bytes.\r\nEnd Of Assembly.\r\n"
|
2018-03-16 16:33:11 +00:00
|
|
|
|
SRC.MOD.RESERVED >PSTR "#/^<>"
|
2016-10-24 15:54:43 +00:00
|
|
|
|
SRC.EXP.RESERVED >PSTR "^!|&<=>+-*/"
|
2018-03-16 16:33:11 +00:00
|
|
|
|
SRC.AM.RESERVED >PSTR "[](),"
|
2018-01-11 16:34:09 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
ASM.T.FILENAME .BS 65
|
2015-11-20 16:31:14 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
FIO.Stat .BS S.STAT
|
2015-11-20 16:31:14 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
SRC.ACC.SIZE .BS 1
|
|
|
|
|
SRC.ACC .BS 4
|
2015-09-16 20:48:59 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
SRC.ARG.SIZE .BS 1
|
|
|
|
|
SRC.ARG .BS 4
|
|
|
|
|
|
|
|
|
|
SRC.ACCTMP .BS 4
|
|
|
|
|
SRC.AM.StrBuf .BS 32
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DUMMY
|
|
|
|
|
.OR 0
|
|
|
|
|
DS.START
|
|
|
|
|
bPause .BS 1
|
2015-10-02 16:04:30 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
SRC.hFILENAME .BS 1
|
|
|
|
|
SRC.hLineBuf .BS 1
|
|
|
|
|
SRC.hTmpBuf .BS 1
|
2015-08-05 20:38:05 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
SRC.COUNT .BS 1
|
2018-04-06 15:10:02 +00:00
|
|
|
|
SRC.hFILES .BS IN.MAXDEPTH
|
|
|
|
|
SRC.hFILETYPES .BS IN.MAXDEPTH
|
2018-03-23 15:57:35 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
SRC.LINENUM .BS 2
|
|
|
|
|
SRC.AMID .BS 1
|
2015-10-06 16:14:48 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
DST.hFILENAME .BS 1
|
|
|
|
|
DST.hREFNUM .BS 1
|
|
|
|
|
DST.hBUFFER .BS 1
|
|
|
|
|
DST.hFILETYPE .BS 1
|
2015-12-04 16:33:33 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
DIR.Word .BS 2
|
|
|
|
|
DIR.Byte .BS 1
|
2018-03-16 16:33:11 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
EXP.Modifier .BS 1
|
|
|
|
|
EXP.Prefix .BS 1
|
|
|
|
|
EXP.Operator .BS 1
|
2018-03-16 16:33:11 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
ASM.T.hMem .BS 1
|
2018-01-19 16:21:31 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
ASM.PASS .BS 1
|
2018-04-06 15:10:02 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
ASM.DO.ON .BS 1
|
2018-04-06 15:10:02 +00:00
|
|
|
|
ASM.DO.StackPtr .BS 1
|
|
|
|
|
ASM.DO.Stack .BS DO.MAXDEPTH
|
|
|
|
|
|
|
|
|
|
ASM.DU.ON .BS 1
|
2018-03-28 15:23:32 +00:00
|
|
|
|
ASM.PH.ON .BS 1
|
2018-04-06 15:10:02 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
ASM.LI.ON .BS 1
|
|
|
|
|
ASM.LI.CON .BS 1
|
|
|
|
|
ASM.LI.MON .BS 1
|
|
|
|
|
ASM.LI.XON .BS 1
|
2018-04-06 15:10:02 +00:00
|
|
|
|
|
|
|
|
|
ASM.MA.ON .BS 1
|
|
|
|
|
ASM.MA.StackPtr .BS 1
|
|
|
|
|
ASM.MA.Stack .BS MA.MAXDEPTH
|
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
ASM.PC .BS 4
|
|
|
|
|
ASM.PC.PH .BS 4
|
2018-04-06 15:10:02 +00:00
|
|
|
|
ASM.PC.DU .BS 4
|
2018-03-22 16:45:23 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
SYM.hGlobalList .BS 1
|
|
|
|
|
SYM.hNameBuf .BS 1
|
|
|
|
|
SYM.hGlobalBuf .BS 1
|
|
|
|
|
SYM.GlobalID .BS 2
|
2018-03-22 16:45:23 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
SYM.hLookupBuf .BS 1
|
2018-01-26 16:19:17 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
SYM.LocalID .BS 2
|
2018-01-26 16:19:17 +00:00
|
|
|
|
|
2018-04-06 15:10:02 +00:00
|
|
|
|
MAC.hMacroList .BS 1
|
|
|
|
|
MAC.hMacroBuf .BS 1
|
|
|
|
|
MAC.hCtxList .BS 1
|
|
|
|
|
MAC.hCtxBuf .BS 1
|
|
|
|
|
MAC.CtxID .BS 2
|
2018-01-26 16:19:17 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
OUT.PC .BS 4
|
|
|
|
|
OUT.Buf .BS 4
|
|
|
|
|
OUT.bEquate .BS 1
|
|
|
|
|
OUT.LineCnt .BS 1
|
2018-01-31 16:20:20 +00:00
|
|
|
|
|
2018-03-28 15:23:32 +00:00
|
|
|
|
DS.END .ED
|
2015-11-20 16:31:14 +00:00
|
|
|
|
*---------------------------------------
|
2018-03-28 15:23:32 +00:00
|
|
|
|
.DO DS.END-DS.START>$FF
|
|
|
|
|
ERROR:DS too big
|
|
|
|
|
.FIN
|
2015-03-14 21:47:37 +00:00
|
|
|
|
*---------------------------------------
|
|
|
|
|
MAN
|
2019-01-28 07:44:37 +00:00
|
|
|
|
SAVE USR/SRC/BIN/ASM.S
|
2015-03-14 21:47:37 +00:00
|
|
|
|
ASM
|