Is this the DCPU-16 assembler 'dat' with a string that should generate a byte or word per character?

It’s not clear to me whether

dat "Hello"

should generate 5 words or 3 (with one fill byte)

+6
source share
1 answer

according to this figure, this is one word per 8-bit character:

So

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

will generate

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

and etc.

it checks the difference between ordinary characters and special characters with

 ifg a, 0xff 

this will lead to the conclusion that all ascii char will have their own word

+8
source

Source: https://habr.com/ru/post/912558/


All Articles