From cad92bf3bab86359914f5248cef6a2b7e8964d83 Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Wed, 29 Nov 2023 15:37:57 +0000 Subject: Moved preprocessor>Constants to Completed and started work on %USE --- todo.org | 64 ++++++++++++++++++++++++++++++++-------------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/todo.org b/todo.org index 3d6cdcf..d660e81 100644 --- a/todo.org +++ b/todo.org @@ -6,38 +6,7 @@ Like in FASM or NASM where we can give certain helpful instructions to the assembler. I'd use the ~%~ symbol to designate preprocessor directives. -** DONE Constants -Essentially a directive which assigns some literal to a symbol as a -constant. Something like -#+begin_src asm -%const(n) 20 %end -#+end_src - -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) - push.word 1 - print.word -%end -#+end_src -which when referred to (by ~$print-1~) would insert the bytecode given -inline. -** TODO Import another file +** WIP Import another file Say I have two "asm" files: /a.asm/ and /b.asm/. #+CAPTION: a.asm @@ -241,3 +210,34 @@ Proposed syntax: #+begin_src asm init