shithub: rgbds

Download patch

ref: 9687e6e1dd071ccceb427cc5d6ac03f2d313e79f
parent: ee34200e5fa295c54b2bc41c00d9f5d16e1961ff
author: ISSOtm <eldredhabert0@gmail.com>
date: Fri Feb 7 05:06:02 EST 2020

Allow forcing the second byte of STOP
Fixes #433

--- a/src/asm/asmy.y
+++ b/src/asm/asmy.y
@@ -2126,6 +2126,11 @@
 			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
--- a/test/link/all-instructions.asm
+++ b/test/link/all-instructions.asm
@@ -235,3 +235,8 @@
     nop
     scf
     stop
+BYTE = 0
+REPT 256
+    stop BYTE
+BYTE = BYTE + 1
+ENDR
binary files a/test/link/all-instructions.out.bin b/test/link/all-instructions.out.bin differ