diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-08-18 16:39:37 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-08-18 16:39:37 +0200 |
| commit | fcd4c9a267b407e653ed6b21ae87f219f3e4c4af (patch) | |
| tree | 0b5f3e9bf99ab7377fa0bb6d204661ac8fbe3380 /scripts | |
| parent | d479b0fbd3778f5b6fc8b63f46aa0c5364e4fe7e (diff) | |
| download | tools.nes-fcd4c9a267b407e653ed6b21ae87f219f3e4c4af.tar.gz tools.nes-fcd4c9a267b407e653ed6b21ae87f219f3e4c4af.zip | |
Add global labels
These are labels that are declared by prefixing a '#' symbol to the
name, and it allows the label to be declared at the global scope instead
of the current one.
This is a feature which is not to be abused so to not make scopes
pointless, but it can be quite handy with some optimizations while not
abandoning scopes completely.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/test-e2e.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/test-e2e.sh b/scripts/test-e2e.sh index 0620f25..6e18644 100755 --- a/scripts/test-e2e.sh +++ b/scripts/test-e2e.sh @@ -140,6 +140,13 @@ exit_code=$((exit_code + $?)) diff tests/out/fixed-segments.nes tests/expected/fixed-segments.nes exit_code=$((exit_code + $?)) +echo "test: custom => global-labels.nes" +./target/debug/nasm -c empty -Werror --asan -o tests/out/global-labels.nes tests/global-labels.s 2>tests/out/global-labels.txt +diff tests/out/global-labels.txt tests/expected/global-labels.txt +exit_code=$((exit_code + $?)) +diff tests/out/global-labels.nes tests/expected/global-labels.nes +exit_code=$((exit_code + $?)) + ## # code.nes |
