Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Matrefeytontias on February 22, 2013, 10:12:39 am

Title: [z80 hex] Small but useful key hook
Post by: Matrefeytontias on February 22, 2013, 10:12:39 am
Heya people,

Yesterday, I was working on Super Crate Box again, and all was good until I saw that I forgot to write something on the really last line of the biggest program (which was 481 lines long). So I got lazy and thank about how to go to the bottom of a program with one key.

And I found : this small hex program installs a key hook that will make the cursor go at the very last character of the current editing session (also works with the homescreen) by accessing the Link menu ([2nd] [x,t,Θ,n]). Don't worry about the menu being inaccessible, you can still disable the hook by accessing the Calc menu ([2nd] [trace]). To re-enable it, just execute the program once again.

:AsmPrgm
:21A99D
:110080
:011900
:EDB0
:210080
:3E01
:EF664F
:C9
:83
:FDCB0156
:C8
:FE41
:2006
:EF5D49
:3E00
:C9
:FE3B
:C0
:EF6F4F
:3E00
:C9


(http://mattias.refeyton.fr/espace-ti/gobottomHook.gif)

Share comments :)
Title: Re: [z80 hex] Small but useful key hook
Post by: Xeda112358 on February 22, 2013, 11:35:53 am
That seems rather useful and it is pretty clever o.o If I may make a suggestion, maybe you can use ON+Down to scroll to the bottom of the code or ON+Up to scroll tot he top? This might need to be tweaked since I am not home and cannot test the code, but I modified it to:
Code: [Select]
:AsmPrgm
:21A89D
:110080
:011E00
:EDB0
:210080
:7C      ;instead of 3E01
:EF664F
:C9
:83
:FDCB0156
:C8
:47
:DB04EE08E608    ;Test if ON is pressed. Returns A=0 and z flag set if ON is pressed.
:C8
;0505
;1005
;EF5A491805
:1003
:EF5D49
:AF
:C9
Title: Re: [z80 hex] Small but useful key hook
Post by: Matrefeytontias on February 22, 2013, 12:15:21 pm
I didn't think that scrolling to the top was so useful since you can still do [2nd] [mode] to quit the program and edit it again to be at the beginning.

Also, I made it use the raw key hook because I didn't remember what was the test I had to perform on A before using the GetCSC hook ;D I'll rewrite the code to use the GetCSC hook and the On key.
Title: Re: [z80 hex] Small but useful key hook
Post by: Streetwalrus on February 22, 2013, 12:30:30 pm
zStart has label jumping in source, so I'm not gonna use it, but other people might find it useful. ;)
Title: Re: [z80 hex] Small but useful key hook
Post by: Matrefeytontias on February 22, 2013, 12:32:38 pm
Yeah I know, but I lost faith into it when zStart made my 83+.fr crash only by enabling the lowercase <_<
Title: Re: [z80 hex] Small but useful key hook
Post by: Streetwalrus on February 22, 2013, 01:04:07 pm
What ? Are you sure you were using the 83+BE version ?
Title: Re: [z80 hex] Small but useful key hook
Post by: Matrefeytontias on February 22, 2013, 01:04:37 pm
I am. But as thep said in his readme, it's mainly not for this calc.
Title: Re: [z80 hex] Small but useful key hook
Post by: Sorunome on February 22, 2013, 05:09:30 pm
Yeah, i won't use it as i use zstart, but other people would probably find it very useful :D
Title: Re: [z80 hex] Small but useful key hook
Post by: Matrefeytontias on November 02, 2013, 08:43:47 pm
Holy necropost update !

I got my new TI-84+CSE 5 hours ago, and I was shocked by how slow the program editor is <_< so I decided to port this hook to the 84+CSE, and I also improved it since you can now scroll to the end of the program by pressing ON+down arrow :)
:Asm84CPrgm
:211FA6
:110080
:011800
:
:3E01
:210080
:EF604F
:C9
:
:83
:FE1B
:C0
:78
:FE01
:C0
:DB04
:CB5F
:3E01
:C0
:EF4849
:3E01
:B7
:3E00
:C9


Sorry for the hex, I have no PC atm ^^'
Title: Re: [z80 hex] Small but useful key hook
Post by: DJ Omnimaga on November 02, 2013, 09:54:09 pm
Wow that's pretty nifty, but question: Will it still run even with Doors CSE 8 installed? Doors CSE 8 adds some stuff that makes Alpha scrolling nearly instant rather than gradual so it would suck if this program messed up DCSE hooks or vice-versa. D:
Title: Re: [z80 hex] Small but useful key hook
Post by: Matrefeytontias on November 02, 2013, 10:31:58 pm
If DCS8 supports hook chaining, everything will run fine. If it doesn't, the last hook installed will take the place of the old one.
Title: Re: [z80 hex] Small but useful key hook
Post by: Hayleia on November 03, 2013, 02:29:37 am
If DCS8 supports hook chaining, everything will run fine. If it doesn't, the last hook installed will take the place of the old one.
If we suppose DCS supports hook chaining, do we have to install your hook first then DCS or do we have to install DCS first then your hook ?

Anyway, nice to see it ported to the 84+CSE, it needed it really.
Now, start porting Axe and zStart ?
/me runs
Title: Re: [z80 hex] Small but useful key hook
Post by: Matrefeytontias on November 03, 2013, 03:56:08 am
If DCS8 chains hook, you'll have to run this hook first and then DCS8.
Title: Re: [z80 hex] Small but useful key hook
Post by: Sorunome on November 03, 2013, 04:04:15 am
If DCS8 supports hook chaining, everything will run fine. If it doesn't, the last hook installed will take the place of the old one.
If we suppose DCS supports hook chaining, do we have to install your hook first then DCS or do we have to install DCS first then your hook ?

Anyway, nice to see it ported to the 84+CSE, it needed it really.
Now, start porting Axe and zStart ?
/me runs
I thought pengiun didn't want to port zstart or is it just me making things up now ???
Title: Re: [z80 hex] Small but useful key hook
Post by: Matrefeytontias on November 03, 2013, 04:43:40 am
He doesn't want, that's why Hayleia was joking while asking me.