소스 검색

zasm: allow blank lines in asm source code

pull/10/head
Virgil Dupras 5 년 전
부모
커밋
a7635cb1ea
3개의 변경된 파일17개의 추가작업 그리고 2개의 파일을 삭제
  1. +1
    -0
      apps/zasm/main.asm
  2. +4
    -2
      apps/zasm/tests/test1.asm
  3. +12
    -0
      apps/zasm/tok.asm

+ 1
- 0
apps/zasm/main.asm 파일 보기

@@ -24,6 +24,7 @@ main:
; to where we should write the next upcode.
parseLine:
push bc
call gotoNextNotBlankLine
call tokenize
jr nz, .error
call parseTokens


+ 4
- 2
apps/zasm/tests/test1.asm 파일 보기

@@ -1,2 +1,4 @@
add a, b
inc a
; comment
add a, b ; comment
inc a ; comment
; comment

+ 12
- 0
apps/zasm/tok.asm 파일 보기

@@ -144,6 +144,18 @@ gotoNextLine:
call JUMP_UNSETZ
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 ***

tokInstr:


불러오는 중...
취소
저장