A2osX/BIN/ASM.S.EXP.txt

84 lines
1.4 KiB
Plaintext
Raw Normal View History

2015-10-09 15:53:30 +00:00
PR#3
PREFIX /A2OSX.SRC
NEW
INC 1
AUTO 6
.LIST OFF
*---------------------------------------
2015-10-28 16:55:12 +00:00
* Addressing Mode reserved : []#(),
* EXP.Operators .AS "^!|&<=>+-*/"
2015-10-09 15:53:30 +00:00
* U-Operators :
* B-Operators :
* Num Format : 0-9 -> decimal
2015-10-28 16:55:12 +00:00
* $ = Hex
2015-10-09 15:53:30 +00:00
* % = binary
* & = octal
2015-10-28 16:55:12 +00:00
* * = PC
2015-10-09 15:53:30 +00:00
*---------------------------------------
EXP.Get jsr SRC.GetCharNB
2015-10-28 16:55:12 +00:00
beq .98
cmp #'*'
bne .10
2015-10-09 15:53:30 +00:00
2015-10-28 16:55:12 +00:00
ldy #ASM.PC
ldx #0
2015-10-09 15:53:30 +00:00
2015-10-28 16:55:12 +00:00
.11 lda (pData),y
sta SRC.ACC,x
inx
iny
cpx #4
bne .11
2015-10-09 15:53:30 +00:00
2015-10-28 16:55:12 +00:00
bra .8
2015-10-09 15:53:30 +00:00
2015-10-28 16:55:12 +00:00
.10 jsr SRC.IsDigit10 Decimal constant ?
bcs .1
2015-10-09 15:53:30 +00:00
2015-10-28 16:55:12 +00:00
dec SRC.BufPtr
jsr SRC.GetDecimal
bcs .97
bra .8
2015-10-09 15:53:30 +00:00
2015-10-28 16:55:12 +00:00
.1 cmp #'$' Hex?
bne .2
jsr SRC.GetHex
bcs .97
bra .8
2015-10-09 15:53:30 +00:00
2015-10-28 16:55:12 +00:00
.2 cmp #'%' binary?
bne .3
jsr SRC.GetBinary
bcs .97
2015-10-09 15:53:30 +00:00
2015-10-28 16:55:12 +00:00
bra .8
2015-10-09 15:53:30 +00:00
2015-10-28 16:55:12 +00:00
.3 jsr SRC.IsLetter Symbol ?
bcs .97
2015-10-09 15:53:30 +00:00
2015-10-28 16:55:12 +00:00
.8 clc
rts
2015-10-09 15:53:30 +00:00
2015-10-28 16:55:12 +00:00
.97 lda #ERR.SYNTAX.ERROR
sec
rts
2015-10-09 15:53:30 +00:00
2015-10-28 16:55:12 +00:00
.98 lda #ERR.MISSING.EXP
2015-10-09 15:53:30 +00:00
sec
.99 rts
*---------------------------------------
stz SRC.ACC
stz SRC.ACC+1
stz SRC.ACC+2
stz SRC.ACC+3
*---------------------------------------
2015-10-28 16:55:12 +00:00
2015-10-09 15:53:30 +00:00
*---------------------------------------
MAN
2015-10-28 16:55:12 +00:00
SAVE BIN/ASM.S.EXP
2015-10-09 15:53:30 +00:00
LOAD BIN/ASM.S
2015-10-28 16:55:12 +00:00
ASM