aboutsummaryrefslogtreecommitdiff
path: root/todo.org
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2023-11-06 08:16:15 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2023-11-06 08:16:15 +0000
commit6e524569c34b0fb41c85280af5ea3f924999bbdf (patch)
tree425b790210dadb7832edc4e6f75fc126da36422f /todo.org
parent4ae6c052764767f8281576a4ed938e1d6cf7c688 (diff)
downloadovm-6e524569c34b0fb41c85280af5ea3f924999bbdf.tar.gz
ovm-6e524569c34b0fb41c85280af5ea3f924999bbdf.tar.bz2
ovm-6e524569c34b0fb41c85280af5ea3f924999bbdf.zip
Current work on preprocessor
Diffstat (limited to 'todo.org')
-rw-r--r--todo.org23
1 files changed, 17 insertions, 6 deletions
diff --git a/todo.org b/todo.org
index 60c6585..30a1574 100644
--- a/todo.org
+++ b/todo.org
@@ -43,22 +43,33 @@ directives.
Essentially a directive which assigns some literal to a symbol as a
constant. Something like
#+begin_src asm
-%const:n:20%end
+%const(n) 20 %end
#+end_src
-Where you'd refer to the definition using ~$n~. The assembler will
-look for symbols like ~$n~ and insert definitions it finds for them.
-Can be useful when defining data type bounds and other useful constants.
+Then, during my program I could use it like so
+#+begin_src asm
+...
+ push.word $n
+ print.word
+#+end_src
+
+The preprocessor should convert this to the equivalent code of
+#+begin_src asm
+...
+ push.word 20
+ print.word
+#+end_src
2023-11-04: You could even put full program instructions for a
constant potentially
#+begin_src asm
-%const:print-1:
+%const(print-1)
push.word 1
print.word
%end
#+end_src
-which when referred to ~$print-1~ would just insert the bytecode given inline.
+which when referred to ~$print-1~ would just insert the bytecode given
+in sequence.
* Completed
** DONE Write a label/jump system :ASM:
Essentially a user should be able to write arbitrary labels (maybe