Files
rgbds/test/asm/charmap-inheritance.asm
Rangi42 d06376c170 Use std::unordered_map and std::vector for sections
This allows us to control the order in which sections are iterated,
instead of it depending on the internals of `std::map`. (This order
is arbitrary, but should be deterministic regardless.)
2024-03-16 11:51:47 -04:00

27 lines
676 B
NASM

SECTION "test", ROM0
newcharmap foo
charmap "<START>", $00
charmap "<RAM>", $01
charmap "<WAIT>", $02
charmap "<ASM>", $03
charmap "<NUM>", $04
charmap "<EXIT>", $05
charmap "<SOUND>", $06
charmap "<DAY>", $07
charmap "<FAR>", $08
; At this point, enough nodes were allocated for 'foo' to be reallocated.
; Its value in the charmaps' `std::unordered_map` should have been updated too,
; so that usages of 'foo' will not segfault.
; This uses 'foo; by switching to it.
setcharmap foo
; This uses 'foo' by deriving another charmap from it.
newcharmap bar, foo
; This is an error because 'eggs' does not exist.
newcharmap spam, eggs