(uxnasm) Allow writing the 0xffff byte of RAM.

This commit is contained in:
Andrew Alderwick 2022-02-19 00:28:03 +00:00
parent 8b84813c6e
commit 550aceee23
1 changed files with 6 additions and 1 deletions

View File

@ -35,7 +35,8 @@ typedef struct {
typedef struct {
Uint8 data[LENGTH];
Uint16 ptr, length, llen, mlen, rlen;
unsigned int ptr, length;
Uint16 llen, mlen, rlen;
Label labels[512];
Macro macros[256];
Reference refs[2048];
@ -193,6 +194,10 @@ writebyte(Uint8 b)
fprintf(stderr, "-- Writing in zero-page: %02x\n", b);
return 0;
}
else if(p.ptr > 0xffff) {
fprintf(stderr, "-- Writing after the end of RAM: %02x\n", b);
return 0;
}
else if(p.ptr < p.length) {
fprintf(stderr, "-- Memory overwrite: %04x -> %04x\n", p.length, p.ptr);
return 0;