From 5ba4d043e598ce5a5c68528d2a8db64edbeb8db6 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Sat, 30 May 2020 13:26:20 -0400 Subject: [PATCH] merlin linker truncates opcodes to 3-characters. This allows for things like `TYPe` and `LINk` --- src/link/linker.1.s | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/link/linker.1.s b/src/link/linker.1.s index 1ea681b..682ebdc 100644 --- a/src/link/linker.1.s +++ b/src/link/linker.1.s @@ -496,12 +496,15 @@ getopcode blt ]lup beq ]lup dex -:done lda #$2020 +:done lda #$2020 ;truncate to 3 bytes max sta opcode+$1,Y + sta opcode+4 tya - and #$1F sep $20 - sta opcode + cmp #4 + bcc :3 + lda #3 +:3 sta opcode ]flush lda linebuff,x cmp #' ' bne :tya