0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00
Files
nasm/test/chrord.asm
H. Peter Anvin f6166e571a preproc: implement %hs2b() and %b2hs() functions for compact binary data
Convenience preprocessor functions that allows for efficient packing
of binary data in source code.

Move some functions that has previously been local but are more
generally useful into more accessible places.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-15 23:01:59 -07:00

10 lines
306 B
NASM

db %chr(40,41,42,43,44,45,46)
db %ord("Hello, World!")
db %ord("Hello, World!",1,-1)
db %chr()
db %b2hs("Hello, World!")
db %b2hs("Hello, World!",':')
db %hs2b("303132 33 34 35 3 6 3 78 9", "abcd")
db 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09
db %hs2b("00010203 4 0506 07 8","9")