Allow 32 bit segments, add .TOPBYTE pseduo instruction
Some checks failed
Snapshot Build / Build, Test, and Snapshot (Linux) (push) Has been skipped
Snapshot Build / Build (Windows) (push) Has been cancelled
Windows Test Scheduled / Build, Test (Windows MSVC) (push) Has been cancelled

This commit is contained in:
2026-05-08 09:52:51 -07:00
parent 8eed63fa52
commit a5a3e40ffe
13 changed files with 73 additions and 11 deletions

View File

@@ -58,6 +58,7 @@
#include "spool.h"
#include "studyexpr.h"
#include "symtab.h"
#include "cpu.h"
@@ -93,7 +94,22 @@ Segment* ActiveSeg;
/* Code */
/*****************************************************************************/
void CreateDefaultSegments(void) {
int AddrSizeAbs;
if (CPU == CPU_65C032) {
AddrSizeAbs = 4;
} else {
AddrSizeAbs = 2;
}
NullSegDef.AddrSize = AddrSizeAbs;
ZeropageSegDef.AddrSize = ADDR_SIZE_ZP;
DataSegDef.AddrSize = AddrSizeAbs;
BssSegDef.AddrSize = AddrSizeAbs;
RODataSegDef.AddrSize = AddrSizeAbs;
CodeSegDef.AddrSize = AddrSizeAbs;
}
static Segment* NewSegFromDef (SegDef* Def)
/* Create a new segment from a segment definition. Used only internally, no