mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-27 14:38:05 +11:00
zasm: allow blank lines in asm source code
This commit is contained in:
parent
eb5c974573
commit
a7635cb1ea
@ -24,6 +24,7 @@ main:
|
|||||||
; to where we should write the next upcode.
|
; to where we should write the next upcode.
|
||||||
parseLine:
|
parseLine:
|
||||||
push bc
|
push bc
|
||||||
|
call gotoNextNotBlankLine
|
||||||
call tokenize
|
call tokenize
|
||||||
jr nz, .error
|
jr nz, .error
|
||||||
call parseTokens
|
call parseTokens
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
add a, b
|
; comment
|
||||||
inc a
|
add a, b ; comment
|
||||||
|
inc a ; comment
|
||||||
|
; comment
|
||||||
|
@ -144,6 +144,18 @@ gotoNextLine:
|
|||||||
call JUMP_UNSETZ
|
call JUMP_UNSETZ
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
; Repeatedly calls gotoNextLine until the line in (HL) points to a line that
|
||||||
|
; isn't blank or 100% comment. Sets Z if we reach a line, Unset Z if we reach
|
||||||
|
; EOF
|
||||||
|
gotoNextNotBlankLine:
|
||||||
|
call toWord
|
||||||
|
ret z ; Z set? we have a not-blank line
|
||||||
|
; Z not set? (HL) is at the end of the line or at the beginning of
|
||||||
|
; comments.
|
||||||
|
call gotoNextLine
|
||||||
|
ret nz
|
||||||
|
jr gotoNextNotBlankLine
|
||||||
|
|
||||||
; *** Variables ***
|
; *** Variables ***
|
||||||
|
|
||||||
tokInstr:
|
tokInstr:
|
||||||
|
Loading…
Reference in New Issue
Block a user