mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
This also fixes two bugs: `-1 >>> 32` was -1 not 0, and `macro_FreeArgs` should have been called but wasn't.
27 lines
663 B
NASM
27 lines
663 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' hashmap 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
|