Author Topic: [z80 hex] Small but useful key hook  (Read 7665 times)

0 Members and 1 Guest are viewing this topic.

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
[z80 hex] Small but useful key hook
« 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




Share comments :)
« Last Edit: February 22, 2013, 10:13:08 am by Matrefeytontias »

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: [z80 hex] Small but useful key hook
« Reply #1 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

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [z80 hex] Small but useful key hook
« Reply #2 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.
« Last Edit: February 22, 2013, 12:17:14 pm by Matrefeytontias »

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: [z80 hex] Small but useful key hook
« Reply #3 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. ;)

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [z80 hex] Small but useful key hook
« Reply #4 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 <_<

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: [z80 hex] Small but useful key hook
« Reply #5 on: February 22, 2013, 01:04:07 pm »
What ? Are you sure you were using the 83+BE version ?

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [z80 hex] Small but useful key hook
« Reply #6 on: February 22, 2013, 01:04:37 pm »
I am. But as thep said in his readme, it's mainly not for this calc.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: [z80 hex] Small but useful key hook
« Reply #7 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

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [z80 hex] Small but useful key hook
« Reply #8 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 ^^'

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [z80 hex] Small but useful key hook
« Reply #9 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:
« Last Edit: November 02, 2013, 09:55:05 pm by DJ Omnimaga »

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [z80 hex] Small but useful key hook
« Reply #10 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.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: [z80 hex] Small but useful key hook
« Reply #11 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 ?
* Hayleia runs
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [z80 hex] Small but useful key hook
« Reply #12 on: November 03, 2013, 03:56:08 am »
If DCS8 chains hook, you'll have to run this hook first and then DCS8.

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: [z80 hex] Small but useful key hook
« Reply #13 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 ?
* Hayleia runs
I thought pengiun didn't want to port zstart or is it just me making things up now ???

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Matrefeytontias

  • Axe roxxor (kinda)
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1982
  • Rating: +310/-12
  • Axe roxxor
    • View Profile
    • RMV Pixel Engineers
Re: [z80 hex] Small but useful key hook
« Reply #14 on: November 03, 2013, 04:43:40 am »
He doesn't want, that's why Hayleia was joking while asking me.