Omnimaga

Calculator Community => TI Calculators => ASM => Topic started by: aeTIos on March 23, 2011, 11:53:52 am

Title: Display the keycode of a keypress
Post by: aeTIos on March 23, 2011, 11:53:52 am
Hi-

How can you display the key code of a keypress gotten from B_CALL _getKey on the screen?

thanks in advance!
Title: Re: Display the keycode of a keypress
Post by: Xeda112358 on March 23, 2011, 12:09:22 pm
I would store it to HL and use _DispHL:
Code: [Select]
ld hl,0
 ld (CurRow),hl
 bcall(_getKey)
 ld l,a
 ld h,0
 bcall(_DispHL)
 ret
Title: Re: Display the keycode of a keypress
Post by: aeTIos on March 24, 2011, 03:55:09 am
Thanks!
Title: Re: Display the keycode of a keypress
Post by: Munchor on March 24, 2011, 02:38:50 pm
aeTIos, all of your questions are making me wanna relearn ASM so much =D
Title: Re: Display the keycode of a keypress
Post by: aeTIos on March 25, 2011, 09:12:06 am
You can!
You should use Hot_Dogs asm tutorials then z80 in 28 days. (I finished that in like 5 days, gonna reread it a few times)
Title: Re: Display the keycode of a keypress
Post by: Xeda112358 on March 25, 2011, 08:23:38 pm
That is probably the best method (reading it a few times). You won't absorb everything at first, but as you get practice and you learn something new, it will eventually all get absorbed :D
Title: Re: Display the keycode of a keypress
Post by: Deep Toaster on March 25, 2011, 08:24:37 pm
You can!
You should use Hot_Dogs asm tutorials then z80 in 28 days. (I finished that in like 5 days, gonna reread it a few times)

You should. There were always things I missed each time I read it. It's actually interesting to read, too :D