06-08-2026, 02:49 AM
Okay, think I've got the first bit working now - not sure whether this is the neatest way to do it, but it appears to work as expected - or at least, it doesn't not work...
Code:
u8 Link_CreateTestByte()
{
// VECT_COMCREATEDATA=0x13
__asm("ldb rw3, 0x13");
__asm("ldb rb3, 123");
SystemCall();
// The "return value" of the system call will be
// in register ra3
// Move into the XHL register
__asm("ldb l,ra3"); // Loads ra3 into the hl lower byte
__asm("ldb h,0"); // Clears the upper byte
return;
}
