Files
rgbds/test/asm/underscore-in-numeric-literal.asm
Rangi 5d998ef483 Restrict custom binary and graphics digits (#1693)
* Restrict custom binary and graphics digits

* Update documentation

* Fix build error
2025-05-22 10:52:51 +02:00

29 lines
543 B
NASM

SECTION "Test", ROM0
_1234::
; without underscores
dw _1234 ; label
db 123, 123, 123 ; decimal
dw 12345 ; decimal
dw $abcd ; hex
db &200 ; octal
db %11110000, %10 ; binary
dl 6.283185 ; fixed point
dw `01233210, `00332211 ; gfx
; with underscores
dw _1234 ; label
db 123, 1_23, 1__23 ; decimal
dw 12_345 ; decimal
dw $ab_cd ; hex
db &2_0_0_ ; octal
db %1111_0000, %1_0 ; binary
dl 6_._283_185 ; fixed point
dw `0123_3210, `00_33_22_11_ ; gfx
; underscores with custom digits
opt g.ABC, b.X
db %.X.X_..XX_
dw `.A.B_.C.._