[gccsdk] Lost key codes __os.s ?

Ronald ronanon at zoho.com
Wed May 27 20:40:18 PDT 2020


I am wondering if the recipe file --os.s  is part of the unixlib
module build or if I am in the right area.
I cant remember if building Native outputs the unixlib module.

I would like to try altering the following snippet
	.global	__os_inkey
	NAME	__os_inkey
__os_inkey:
	MOV	ip, a1
	MOV	a1, #0x81
	AND	a2, ip, #0xff
	MOV	a3, ip, LSR #8
	SWI	XOS_Byte
	MVNVS	a1, #0
	MOVVS	pc, lr

	TEQ	a3, #0
	MOVEQ	a1, a2
	MVNNE	a1, #0
	MOV	pc, lr
	DECLARE_FUNCTION __os_inkey

I haven't worked out what the #0x81 or the XOS_Byte is doing yet.
But the end goal is to get keyboard values (maybe all above
0x100) or at least the arrow key area OR'd with 0x10 to get them back
to what they should be.
Currently these keys are EOR'd and shifting down by 0x10.
The arrow keys (0x18c-18f are not getting converted to a readable byte,
and the Up key higher shifted value of 0x19c appears as 0x8c instead.

Thanks, Ronald




More information about the gcc mailing list