diff options
| author | Miquel Sabaté Solà <mssola@mssola.com> | 2026-09-29 23:37:48 +0200 |
|---|---|---|
| committer | Miquel Sabaté Solà <mssola@mssola.com> | 2026-09-29 23:37:48 +0200 |
| commit | 54e3fc561add5ce9d776a11a286b988aacb59daa (patch) | |
| tree | 0e1eca3d85988d389e14525c85917646dd8796ac /tests | |
| parent | 438c379b9ce4c6a6e4da445c3bf7f94458b1c816 (diff) | |
| download | tools.nes-54e3fc561add5ce9d776a11a286b988aacb59daa.tar.gz tools.nes-54e3fc561add5ce9d776a11a286b988aacb59daa.zip | |
nasm: warn on labels that point out of bounds
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/expected/out.nes | 0 | ||||
| -rw-r--r-- | tests/expected/out.txt | 1 | ||||
| -rw-r--r-- | tests/out.s | 12 |
3 files changed, 13 insertions, 0 deletions
diff --git a/tests/expected/out.nes b/tests/expected/out.nes new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/expected/out.nes diff --git a/tests/expected/out.txt b/tests/expected/out.txt new file mode 100644 index 0000000..7f7a94c --- /dev/null +++ b/tests/expected/out.txt @@ -0,0 +1 @@ +error: label 'label' is pointing to out of bounds (out.s: line 12) diff --git a/tests/out.s b/tests/out.s new file mode 100644 index 0000000..d40ec42 --- /dev/null +++ b/tests/out.s @@ -0,0 +1,12 @@ +.segment "HEADER" + .byte 'N', 'E', 'S', $1A + .byte $02, $01 + .byte $00 + .byte $00 + +.segment "CODE" +;; asan:stack full + +jmp label +nop +label: |
