Implement LOAD/ENDL blocks

Basically implements and closes rednex#274.
This commit is contained in:
ISSOtm
2020-02-09 16:30:25 +01:00
parent f121119283
commit eb0d75711a
5 changed files with 119 additions and 57 deletions

View File

@@ -575,6 +575,7 @@ static void strsubUTF8(char *dest, const char *src, uint32_t pos, uint32_t len)
%token T_POP_POPC
%token T_POP_SHIFT
%token T_POP_ENDR
%token T_POP_LOAD T_POP_ENDL
%token T_POP_FAIL
%token T_POP_WARN
%token T_POP_PURGE
@@ -730,6 +731,7 @@ simple_pseudoop : include
| setcharmap
| pushc
| popc
| load
| rept
| shift
| fail
@@ -777,6 +779,15 @@ warn : T_POP_WARN string { warning(WARNING_USER, "%s", $2); }
shift : T_POP_SHIFT { sym_ShiftCurrentMacroArgs(); }
;
load : T_POP_LOAD string comma sectiontype sectorg sectattrs
{
out_SetLoadSection($2, $4, $5, &$6);
}
| T_POP_ENDL
{
out_EndLoadSection();
}
rept : T_POP_REPT uconst
{
uint32_t nDefinitionLineNo = nLineNo;