is DCPU-16 assembler 'dat' with a string supposed to generate a byte or word per character?
Asked Answered
E

1

6

It's not clear to me whether

dat "Hello"

is supposed to generate 5 words or 3 (with one byte of padding)

Extant answered 6/4, 2012 at 3:32 Comment(0)
B
8

according to this pic it is one word per 8 bit character:

so

:data dat 0x170, "Hello ", 0x2e1 ...

will generate

0x0170 0x0048 0x0065 0x006c 0x006c 0x006f 0x0020 0x02e1

etc.

he tests the difference between normal chars and the special chars with

ifg a, 0xff

this would conclude that all ascii char will have its own word

Browder answered 6/4, 2012 at 11:43 Comment(1)
yep, that's how I've gone and implemented it in github.com/jtauber/dcpu16pyExtant

© 2022 - 2024 — McMap. All rights reserved.