I'm using the assembler that came with the Manx Aztec C compiler (version 5.0) on a Commodore Amiga 500.
I want to code the equivalent of the following C code:
enum STATUS {
STATUS_OKAY,
STATUS_WAITING,
STATUS_ERROR
};
I tried the following—which works—but it seems kind of hokey:
s_id set 0
STATUS_OKAY equ s_id
s_id set s_id+1
STATUS_WAITING equ s_id
s_id equ s_id+1
STATUS_ERROR equ s_id
I know I could do:
STATUS_OKAY equ 0
STATUS_WAITING equ 1
STATUS_ERROR equ 2
But I would like to be able to insert and rearrange values without having to manually renumber.
I was thinking I might be able to do something with macros, but I don't have much experience with them.