aboutsummaryrefslogtreecommitdiff
path: root/newasm/errors.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/errors.s
parent80d8f3ae48255f786bd4d52a1819ea0c339f6946 (diff)
Add parsers for basic instruction typesHEADmaster
Diffstat (limited to 'newasm/errors.s')
-rw-r--r--newasm/errors.s30
1 files changed, 30 insertions, 0 deletions
diff --git a/newasm/errors.s b/newasm/errors.s
new file mode 100644
index 0000000..3822851
--- /dev/null
+++ b/newasm/errors.s
@@ -0,0 +1,30 @@
+.syntax unified
+.cpu cortex-m0plus
+.thumb
+
+// .type print_error, %function
+// .global print_error
+
+// 00 success
+// 01 expected an opcode (or unexpected character)
+// 02 expected label or opcode
+// 03 expected colon at end of label
+// 04 opcode not found
+
+// 05 expected digit
+
+// 06 expected register
+// 07 invalid general-purpose register number
+// 08 invalid register for this register position
+// 09 invalid register combo for this instruction
+
+// 0A immediate value too large
+
+// 0B extra input at end of statement
+
+ .align 4
+no_colon: .asciz "Error: Expected colon at end of label"
+ .align 4
+no_opcode: .asciz "Error: Expected an opcode"
+ .align 4
+not_found: .asciz "Error: Opcode not found"