Updated the Parser to try and give 'AddressParameter's more meaning depending on the SymbolType.
This commit is contained in:
+3
-1
@@ -1,5 +1,7 @@
|
||||
.db video_start 0xF37F
|
||||
.db msg "Hello, world!", 0
|
||||
.db NOTERM "No terminating byte here"
|
||||
.db null_byte 0
|
||||
|
||||
load r1, [msg] ; Because the lod* instructions can't load an address
|
||||
; from anything but a register, this becomes laa r1, [msg]
|
||||
@@ -11,7 +13,7 @@ load r1, [msg] ; Because the lod* instructions can't load an address
|
||||
string_length:
|
||||
loadb r3, [r1] ; Load the byte from the address in R1, into R3
|
||||
load r2, 0 ; String length
|
||||
cmp r3, 0 ; Is R3 a null byte?
|
||||
cmp r3, null_byte ; Is R3 a null byte?
|
||||
je end
|
||||
inc r2
|
||||
|
||||
|
||||
Reference in New Issue
Block a user