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

89 lines
1.4 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
*---------------------------------------
* 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