Author Topic: [Tutorial] Key hooks in Axe  (Read 12723 times)

0 Members and 1 Guest are viewing this topic.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: [Tutorial] Key hooks in Axe
« Reply #15 on: March 20, 2016, 01:20:07 pm »
Yes, deleting a small app is about as "bad" as deleting a big app. But unless you're doing it 100+ times a day, I don't think you'll ever actually wear the flash out.

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: [Tutorial] Key hooks in Axe
« Reply #16 on: March 20, 2016, 04:16:29 pm »
So, if I write about 30000 bytes to archive a day, I have nothing to worry about?
Is there a hook that or way to run a program when the enter key is pressed instead of the OS evaluating it?
Thanks for your help!  :thumbsup:
I'm still around... kind of.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: [Tutorial] Key hooks in Axe
« Reply #17 on: March 20, 2016, 05:15:34 pm »
I'm sure you could manage it with a key hook, but perhaps the homescreen hook is better.

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: [Tutorial] Key hooks in Axe
« Reply #18 on: March 21, 2016, 05:39:52 pm »
GetCalc([0523]) can't get the address of the entry
Sometimes if I look for the file (Y1) instead, it works but other times it fails.
Do I need to do something else?
Also the error handlers from RUNPRGM always crashes it.
It does run when the enter key is pressed though!
Thanks for your help!
I'm still around... kind of.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: [Tutorial] Key hooks in Axe
« Reply #19 on: March 21, 2016, 06:53:25 pm »
You need a zero byte at the end of the name. You can either add it manually, or you could write the name in string form and the compiler would automatically add it for you.

As for error handler issues, I can't say I understand what you're experiencing.

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: [Tutorial] Key hooks in Axe
« Reply #20 on: March 21, 2016, 08:07:04 pm »
That makes me feel like an idiot. I should have realized that!  :-\
It works now but the basic part runs a lot slower any reason why?
I'm still around... kind of.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: [Tutorial] Key hooks in Axe
« Reply #21 on: March 22, 2016, 08:43:39 am »
Are you running this on an 83+SE or 84+? If so, it's possible that your hook (and anything it does as a result) is only running at 6MHz, while BASIC normally runs at 15MHz. In this case, try setting full CPU speed.

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: [Tutorial] Key hooks in Axe
« Reply #22 on: March 22, 2016, 04:20:06 pm »
Thanks! it worked!
After the hook is finished, it then evaluates the OS's interpratation of the expression.
How do I return the nz flag?
I'm still around... kind of.

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: [Tutorial] Key hooks in Axe
« Reply #23 on: March 22, 2016, 09:29:40 pm »
if you know that in a is something other than zero you can do "or a / ret". If you already know that z is reset the answer is obvious :P

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

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: [Tutorial] Key hooks in Axe
« Reply #24 on: March 25, 2016, 11:15:26 am »
Maybe I came over as knowing more than I do.
What would the hex code be? Can I put it anywhere or just at the end?
I'm still around... kind of.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: [Tutorial] Key hooks in Axe
« Reply #25 on: March 25, 2016, 11:17:19 am »
Maybe I came over as knowing more than I do.
What would the hex code be? Can I put it anywhere or just at the end?

Put this right before you return from your hook to return nz: Asm(AF3D).

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: [Tutorial] Key hooks in Axe
« Reply #26 on: March 25, 2016, 01:17:39 pm »
It works! How do I disable it from displaying done?
(it runs a basic program)
I'm still around... kind of.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: [Tutorial] Key hooks in Axe
« Reply #27 on: March 25, 2016, 01:46:35 pm »
It works! How do I disable it from displaying done?
(it runs a basic program)

Asm(FDCB00AE) might do it. If not, I'm not sure how.