From ee01f1a7f1e10be78bcceb4f0f42aa352a6a588f Mon Sep 17 00:00:00 2001 From: Jacques Comeaux Date: Sat, 24 Aug 2024 01:14:04 -0500 Subject: Add parsers for basic instruction types --- newasm/parsers/label.s | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'newasm/parsers/label.s') diff --git a/newasm/parsers/label.s b/newasm/parsers/label.s index 4770e6c..45d39e5 100644 --- a/newasm/parsers/label.s +++ b/newasm/parsers/label.s @@ -5,9 +5,6 @@ .type label, %function .global label -// 1 unexpected begin char -// 2 doesn't end with colon - // R4 input buffer // R2 output buffer @@ -23,7 +20,7 @@ label: PUSH {LR} LDRB R0, [R4] // get a char CMP R0, ': // colon BEQ 3f - MOVS R0, #2 // return code 2 (expected colon) + MOVS R0, #3 // return code 3 (expected colon) POP {PC} 3: ADDS R4, 1 // consume the colon MOVS R0, #0 // return code 0 (success) -- cgit v1.2.3