Implement SIZEOF("Section") and STARTOF("Section") (#766)

Updates the object file revision to 8

Fixes #765
This commit is contained in:
Rangi
2021-04-17 18:36:26 -04:00
committed by GitHub
parent 5108c5643c
commit 52797b6f68
14 changed files with 161 additions and 31 deletions

View File

@@ -180,6 +180,9 @@ static struct KeywordMapping {
{"BANK", T_OP_BANK},
{"ALIGN", T_OP_ALIGN},
{"SIZEOF", T_OP_SIZEOF},
{"STARTOF", T_OP_STARTOF},
{"ROUND", T_OP_ROUND},
{"CEIL", T_OP_CEIL},
{"FLOOR", T_OP_FLOOR},
@@ -592,7 +595,7 @@ struct KeywordDictNode {
uint16_t children[0x60 - ' '];
struct KeywordMapping const *keyword;
/* Since the keyword structure is invariant, the min number of nodes is known at compile time */
} keywordDict[357] = {0}; /* Make sure to keep this correct when adding keywords! */
} keywordDict[365] = {0}; /* Make sure to keep this correct when adding keywords! */
/* Convert a char into its index into the dict */
static uint8_t dictIndex(char c)