Deze website werkt beter met JavaScript.
Beginscherm
Verkennen
lain.church
Help
Registreren
Inloggen
izaya
/
collapseos
kopie van
https://github.com/hsoft/collapseos.git
Volgen
1
Ster
1
Vork
0
Code
Kwesties
0
Publicaties
0
Wiki
Activiteit
Bladeren bron
zasm: implement error conditions in .dw
pull/10/head
Virgil Dupras
5 jaren geleden
bovenliggende
f5d4321ece
commit
436ff51c39
2 gewijzigde bestanden
met
toevoegingen van 13
en
0 verwijderingen
Zij-aan-zij weergave
Diff Options
Show Stats
Download Patch File
Download Diff File
+11
-0
apps/zasm/directive.asm
+2
-0
tools/tests/zasm/errtests.sh
+ 11
- 0
apps/zasm/directive.asm
Bestand weergeven
@@ -79,8 +79,10 @@ handleDW:
push hl
.loop:
call readWord
jr nz, .badfmt
ld hl, scratchpad
call parseExpr
jr nz, .badarg
push ix \ pop hl
ld a, l
call ioPutC
@@ -91,6 +93,15 @@ handleDW:
cp a ; ensure Z
pop hl
ret
.badfmt:
ld a, ERR_BAD_FMT
jr .error
.badarg:
ld a, ERR_BAD_ARG
.error:
call unsetZ
pop hl
ret
handleEQU:
push hl
+ 2
- 0
tools/tests/zasm/errtests.sh
Bestand weergeven
@@ -20,8 +20,10 @@ chkerr "foo" 1
chkerr "ld a, foo" 2
chkerr "ld a, hl" 2
chkerr ".db foo" 2
chkerr ".dw foo" 2
chkerr "ld a," 3
chkerr "ld a, 'A" 3
chkerr ".db 0x42," 3
chkerr ".dw 0x4242," 3
chkerr "ld a, 0x100" 4
chkerr ".db 0x100" 4
Schrijf
Voorbeeld
Laden…
Annuleren
Opslaan