aboutsummaryrefslogtreecommitdiff
path: root/newasm/parsers/label.s
diff options
context:
space:
mode:
authorJacques Comeaux <jacquesrcomeaux@protonmail.com>2024-08-24 01:14:04 -0500
committerJacques Comeaux <jacquesrcomeaux@protonmail.com>2024-08-24 01:14:04 -0500
commitee01f1a7f1e10be78bcceb4f0f42aa352a6a588f (patch)
tree271e7034ee94e4447784db5b31bf8e332b30fbba /newasm/parsers/label.s
parent80d8f3ae48255f786bd4d52a1819ea0c339f6946 (diff)
Add parsers for basic instruction typesHEADmaster
Diffstat (limited to 'newasm/parsers/label.s')
-rw-r--r--newasm/parsers/label.s5
1 files changed, 1 insertions, 4 deletions
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)