1 #ifndef AS_DCPU16_H_PTFNJB09
2 #define AS_DCPU16_H_PTFNJB09
7 char *label
; /* set if a label points here */
8 char *opcode
; /* tokenized instruction text */
9 struct operand_
*operands
; /* list of operands */
10 unsigned int length
; /* words */
11 unsigned int ready
: 1; /* bytecode computed? */
12 DCPU16_WORD instr_words
[];
17 OT_DIRECT
, /* these operands simply render their contents into bytecode */
18 OT_NEXT
, /* these operands increase instruction length */
19 OT_LABEL
/* labels need to be computed then converted to other types */
23 struct operand_
*next
;
24 char *operand
; /* tokenized operand text */
25 enum operand_types_ type
;
27 DCPU16_WORD word_value
;
28 struct instruction_
*label_destination
;
33 #define IL_SIZE(entries) (((entries) * sizeof(struct instruction_ *)) + sizeof(struct instruction_list_))
35 struct instruction_list_
{
38 struct instruction_
*instr
[];
42 /* note label table holds its own structs, not pointers */
44 char *label
; /* name of label */
45 struct instruction_
*instr
;
48 #define LL_SIZE(entries) (((entries) * sizeof(struct label_ *)) + sizeof(struct label_list_))
53 struct label_ label
[];
56 #endif /* AS_DCPU16_H_PTFNJB09 */