mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
@@ -339,6 +339,9 @@ void out_SetLoadSection(char const *name, uint32_t type, uint32_t org,
|
|||||||
if (currentLoadSection)
|
if (currentLoadSection)
|
||||||
fatalerror("`LOAD` blocks cannot be nested\n");
|
fatalerror("`LOAD` blocks cannot be nested\n");
|
||||||
|
|
||||||
|
if (sect_HasData(type))
|
||||||
|
error("`LOAD` blocks cannot create a ROM section\n");
|
||||||
|
|
||||||
struct Section *sect = getSection(name, type, org, attribs, false);
|
struct Section *sect = getSection(name, type, org, attribs, false);
|
||||||
|
|
||||||
loadOffset = curOffset;
|
loadOffset = curOffset;
|
||||||
|
|||||||
5
test/asm/load-rom.asm
Normal file
5
test/asm/load-rom.asm
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
SECTION "Hello", ROM0
|
||||||
|
ld a, 1
|
||||||
|
LOAD "Wello", ROM0
|
||||||
|
ld a, 2
|
||||||
|
ENDL
|
||||||
3
test/asm/load-rom.err
Normal file
3
test/asm/load-rom.err
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
ERROR: load-rom.asm(3):
|
||||||
|
`LOAD` blocks cannot create a ROM section
|
||||||
|
error: Assembly aborted (1 errors)!
|
||||||
0
test/asm/load-rom.out
Normal file
0
test/asm/load-rom.out
Normal file
Reference in New Issue
Block a user