I’m currently learning assembly, and am stuck on a problem. I need to convert 0x006B to 0xF06B.
The ‘template’ for a character in video memory is 0xTextcolor(white)-bgColor(black)-charactercode(6B).
I think my best bet is bit-shifting? Although I’m not at all familiar with it. Just started learning assembly yesterday.
EDIT:
First of all thanks for the replies, I figured it out. I’m using the 0x10c dev kit, which if I’m not mistaken emulates a DCPU-16 cpu. What I needed to do was (this code is part of a loop)
set a, [text+i]
set b, 0xf000
bor a, b
set [0x8000+i], a ;Put the data in the video memory
Where ‘a’ is the current character read in a 0x00XX format. And ‘bor’ is the ‘|’ operation which Tobias pointed out.
I do not know what assembler you use, but you have to or 0x06B with 0xF00:
How this is done depends on your assembly ..