diff --git a/src/asm/asmy.y b/src/asm/asmy.y index 71aa2218..ea144b89 100644 --- a/src/asm/asmy.y +++ b/src/asm/asmy.y @@ -2126,6 +2126,11 @@ z80_stop : T_Z80_STOP out_AbsByte(0x10); out_AbsByte(0x00); } + | T_Z80_STOP const_8bit + { + out_AbsByte(0x10); + out_RelByte(&$2); + } ; z80_sub : T_Z80_SUB op_a_n diff --git a/test/link/all-instructions.asm b/test/link/all-instructions.asm index 02c9615a..8a80be71 100644 --- a/test/link/all-instructions.asm +++ b/test/link/all-instructions.asm @@ -235,3 +235,8 @@ jrlabel: nop scf stop +BYTE = 0 +REPT 256 + stop BYTE +BYTE = BYTE + 1 +ENDR diff --git a/test/link/all-instructions.out.bin b/test/link/all-instructions.out.bin index 7f2b6234..d92783e4 100644 Binary files a/test/link/all-instructions.out.bin and b/test/link/all-instructions.out.bin differ