kierenj / 0x10c-DevKit

0x10c DevKit
http://0x10c-devkit.com/
39 stars 4 forks source link

Packed string DAT #205

Open Olathe opened 12 years ago

Olathe commented 12 years ago

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