diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-15 04:57:38 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2023-10-15 04:57:38 +0100 |
commit | cfc9edebbadd0b079567058d5d78ba218f94be2b (patch) | |
tree | d2e2057c2b52bf6e00452c35668f1c90028015c7 /src/main.c | |
parent | 118083316114bd9b28ead41016058d37957dad70 (diff) | |
download | ovm-cfc9edebbadd0b079567058d5d78ba218f94be2b.tar.gz ovm-cfc9edebbadd0b079567058d5d78ba218f94be2b.tar.bz2 ovm-cfc9edebbadd0b079567058d5d78ba218f94be2b.zip |
Added macro constructors for union types
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -41,6 +41,9 @@ typedef union word as_word; } data_t; +#define DBYTE(BYTE) ((data_t){.as_byte = (BYTE)}) +#define DWORD(WORD) ((data_t){.as_word = (WORD)}) + void vm_push_byte(vm_t *vm, data_t b) { if (vm->stack.pointer >= VM_STACK_MAX) |