Browse Source

+ check for end directive even if firsttoken=true in the 6502 inline asm reader

Nikolay Nikolov 1 month ago
parent
commit
dc10d53f4a
1 changed files with 6 additions and 0 deletions
  1. 6 0
      compiler/mos6502/ramos6502asm.pas

+ 6 - 0
compiler/mos6502/ramos6502asm.pas

@@ -184,6 +184,12 @@ Unit ramos6502asm;
               end;
             actasmpattern[0]:=chr(len);
             actasmpattern_origcase:=actasmpattern;
+            { check for end which is a reserved word unlike the opcodes }
+            if actasmpattern = 'END' then
+              begin
+                actasmtoken:=AS_END;
+                exit;
+              end;
             { Opcode ? }
             if is_asmopcode(upper(actasmpattern)) then
               begin