Переглянути джерело

zasm: make DE indicate the last line to be read

Facilitates debugging
pull/10/head
Virgil Dupras 5 роки тому
джерело
коміт
1e3982d3ab
2 змінених файлів з 7 додано та 2 видалено
  1. +6
    -2
      apps/zasm/main.asm
  2. +1
    -0
      tools/emul/zasm.c

+ 6
- 2
apps/zasm/main.asm Переглянути файл

@@ -88,10 +88,14 @@ incOutputOffset:
pop de
ret

; Repeatedly reads lines from IO, assemble them and spit the binary code in
; IO. Z is set on success, unset on error. DE contains the last line number to
; be read (first line is 1).
zasmParseFile:
ld hl, 0
ld (curOutputOffset), hl
ld de, 0
ld (curOutputOffset), de
.loop:
inc de
call ioReadLine
or a ; is A 0?
ret z ; We have EOF


+ 1
- 0
tools/emul/zasm.c Переглянути файл

@@ -119,6 +119,7 @@ int main()
}
#endif
fflush(stdout);
fprintf(stderr, "Ended with A=%d DE=%d\n", cpu.R1.br.A, cpu.R1.wr.DE);
return 0;
}


Завантаження…
Відмінити
Зберегти