Some background info:
I am currently writing a bootloader in protected mode while learning intel x86 assembly. The final result will be a “BootLoader ASCII snake” game.
What I want to do is to pop a value from the stack into the AL register. This gives me a error and I therefore assume I have to pop a value into a 16bit register. This gets me to the point where I need to copy the first 8 bits in the 16bit register to my 8bit register?
This is the instruction reference I am using:
http://www.mathemainzel.info/files/x86asmref.html
From the reference linked I see instructions for converting byte to word for example. All the conversion instructions seems to go from a lower register to a bigger.
Actually
AXregister representsAHandALregisters so thatALrepresents bits 0-7 andAHbits 8-15. If you put ie. 0xef80 toAXthenAHwould be 0xef andALwould be 0x80.