Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

dcpu-16

It's not clear to me whether

dat "Hello"

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

like image 857
James Tauber Avatar asked Apr 06 '12 03:04

James Tauber


1 Answers

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

like image 121
ratchet freak Avatar answered Sep 23 '22 13:09

ratchet freak