mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Implement BITWIDTH and TZCOUNT functions (#1450)
This commit is contained in:
11
test/asm/bit-functions.asm
Normal file
11
test/asm/bit-functions.asm
Normal file
@@ -0,0 +1,11 @@
|
||||
assert BITWIDTH(0) == 0
|
||||
assert BITWIDTH(42) == 6
|
||||
assert BITWIDTH(-1) == 32
|
||||
assert BITWIDTH($80000000) == 32
|
||||
|
||||
assert TZCOUNT(0) == 32
|
||||
assert TZCOUNT(42) == 1
|
||||
assert TZCOUNT(-1) == 0
|
||||
assert TZCOUNT($80000000) == 31
|
||||
|
||||
assert TZCOUNT(1.0) == 16
|
||||
Reference in New Issue
Block a user