mirror of
https://github.com/A2osX/A2osX.git
synced 2024-12-27 18:30:51 +00:00
89 lines
1.4 KiB
Plaintext
89 lines
1.4 KiB
Plaintext
PR#3
|
||
PREFIX /A2OSX.SRC
|
||
NEW
|
||
INC 1
|
||
AUTO 6
|
||
.LIST OFF
|
||
*---------------------------------------
|
||
* U-Operators :
|
||
* B-Operators :
|
||
* Num Format : 0-9 -> decimal
|
||
* $ = Hex
|
||
* % = binary
|
||
* & = octal
|
||
* * = PC
|
||
*---------------------------------------
|
||
EXP.Eval jsr SRC.GetCharNB
|
||
beq .98
|
||
cmp #'*'
|
||
bne .10
|
||
|
||
ldy #ASM.PC
|
||
ldx #0
|
||
|
||
.11 lda (pData),y
|
||
sta SRC.ACC,x
|
||
inx
|
||
iny
|
||
cpx #4
|
||
bne .11
|
||
|
||
bra .8
|
||
|
||
.10 jsr SRC.IsDigit10 Decimal constant ?
|
||
bcs .1
|
||
|
||
dec SRC.BufPtr
|
||
jsr SRC.GetDecimal
|
||
bcs .97
|
||
bra .8
|
||
|
||
.1 cmp #'$' Hex?
|
||
bne .2
|
||
jsr SRC.GetHex
|
||
bcs .97
|
||
bra .8
|
||
|
||
|
||
.2 cmp #'%' binary?
|
||
bne .3
|
||
jsr SRC.GetBinary
|
||
bcs .97
|
||
|
||
bra .8
|
||
|
||
|
||
.3 cmp #'&' octal?
|
||
bne .4
|
||
jsr SRC.GetOctal
|
||
bcs .97
|
||
|
||
bra .8
|
||
|
||
.4 jsr SRC.IsLetter Symbol ?
|
||
bcs .97
|
||
|
||
|
||
.8 clc
|
||
rts
|
||
|
||
.97 lda #ERR.SYNTAX.ERROR
|
||
sec
|
||
rts
|
||
|
||
.98 lda #ERR.MISSING.EXP
|
||
sec
|
||
.99 rts
|
||
*---------------------------------------
|
||
stz SRC.ACC
|
||
stz SRC.ACC+1
|
||
stz SRC.ACC+2
|
||
stz SRC.ACC+3
|
||
*---------------------------------------
|
||
|
||
*---------------------------------------
|
||
MAN
|
||
SAVE BIN/ASM.S.EXP
|
||
LOAD BIN/ASM.S
|
||
ASM
|