From 3f546e594ce91e293d9a38ca6789d2b720419f14 Mon Sep 17 00:00:00 2001 From: Lukas Krickl Date: Mon, 13 Nov 2023 20:15:35 +0100 Subject: [PATCH] WIP: assembly directives --- include/ulas.h | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/include/ulas.h b/include/ulas.h index 501a191..beccd40 100644 --- a/include/ulas.h +++ b/include/ulas.h @@ -100,6 +100,8 @@ struct ulas { // holds the current token struct ulas_str tok; + unsigned int address; + // internal counter // used whenever a new unique number might be needed int icntr; @@ -115,12 +117,21 @@ int ulas_icntr(void); enum ulas_ppdirs { ULAS_PPDIR_NONE = 1, + // #define name value ULAS_PPDIR_DEF, + // #undefine name ULAS_PPDIR_UNDEF, + // #macro name + // value + // value ULAS_PPDIR_MACRO, + // #endmacro ULAS_PPDIR_ENDMACRO, + // ifdef name ULAS_PPDIR_IFDEF, + // ifndef name ULAS_PPDIR_IFNDEF, + // endif ULAS_PPDIR_ENDIF }; @@ -222,6 +233,26 @@ struct ulas_expr { union ulas_expdat dat; }; +/** + * asm + */ +enum ulas_asmdir { + // .org
+ ULAS_ASMDIR_ORG, + // .set name = + ULAS_ASMDIR_SET, + // .byte , , , ... + ULAS_ASMDIR_BYTE, + // .str "String value" + ULAS_ASMDIR_STR, + // .fill , n + ULAS_ASMDIR_FILL, + // .pad , + ULAS_ASMDIR_PAD, + // .incbin + ULAS_ASMDIR_INCBIN, +}; + extern struct ulas_config ulascfg; struct ulas_config ulas_cfg_from_env(void); -- 2.30.2