0x10c-DevKit
0x10c-DevKit copied to clipboard
Packed string DAT
It would be nice if I could do, say:
DAT8 "ZOMG, hi!!", 0
and it would put two octets per word in little-endian order (the zero at the end is an octet, not a word). As it is, if we want packed strings in our source code, we have to calculate the numbers and put them in as numbers, which is time-consuming to write and hard to read.
With odd-length strings, you'd just append a null. The above would effectively become:
DAT8 "ZOMG, hi!!", 0, 0