Author Topic: Full Normal Slow?  (Read 17132 times)

0 Members and 1 Guest are viewing this topic.

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: Full Normal Slow?
« Reply #45 on: January 29, 2011, 11:44:52 pm »
Wait, I just read something and now I want to know what "Stop" does in Axe.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Full Normal Slow?
« Reply #46 on: January 29, 2011, 11:45:31 pm »
Stop = Halt = 76h

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: Full Normal Slow?
« Reply #47 on: January 29, 2011, 11:47:04 pm »
Well, I mean what is it supposed to do? I though stop would stop program execution.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Full Normal Slow?
« Reply #48 on: January 29, 2011, 11:47:58 pm »
In TI Basic is Stops it.  In Axe is just waits for the next interrupt. ;)

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: Full Normal Slow?
« Reply #49 on: January 29, 2011, 11:49:50 pm »
Ah, okay. It seems like it would be more useful if it stopped the program, in my opinion. Then again, I don't code in Axe, so it might be better that way.

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Full Normal Slow?
« Reply #50 on: January 30, 2011, 02:01:22 am »
Ah, okay. It seems like it would be more useful if it stopped the program, in my opinion. Then again, I don't code in Axe, so it might be better that way.
Isn't there another command that stops the program? Like Return or something...

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: Full Normal Slow?
« Reply #51 on: January 30, 2011, 02:03:04 am »
Oh, okay. Yeah I seem to remember that now... It has been a long while since I checked Axe... Doesn't that end calls and routines, too?

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Full Normal Slow?
« Reply #52 on: January 30, 2011, 12:08:59 pm »
Return is like ret in Assembly.  Basically, there's no "Stop program right now" command, but there's not one of those in Assembly either. ;D

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: Full Normal Slow?
« Reply #53 on: January 30, 2011, 12:17:26 pm »
Well of course there is! I use it in BatLib...
Just kidding, kind of. What I do is I save SP and then when I need to do an emergency exit, I jump to a call that restores SP and then exits.

Offline Binder News

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 785
  • Rating: +46/-3
  • Zombie of Tomorrow
    • View Profile
Re: Full Normal Slow?
« Reply #54 on: January 30, 2011, 03:03:52 pm »
Couldn't that mess up the stack though?
Spoiler For userbars:







Hacker-in-training!   Z80 Assembly Programmer     Axe Programmer
C++ H4X0R             Java Coder                           I <3 Python!

Perdidisti ludum     Cerebrum non habes

"We are humans first, no matter what."
"Fame is a vapor, popularity an accident, and riches take wings. Only one thing endures, and that is character."
Spoiler For Test Results:





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: Full Normal Slow?
« Reply #55 on: January 30, 2011, 03:08:22 pm »
Nope, that is why you save the stack pointer to a spot in RAM. Then, if you need to exit, you just restore it and use C9. So for example, in BatLib, OP5 and OP6 are never used, so I use some RAM there. Here is some code at the beginning:
ED73AF84

Then I have a call that ends with this (I call it HardExit):
F3             ;disable interrupts
ED7BAF84
C9

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Full Normal Slow?
« Reply #56 on: January 30, 2011, 03:22:56 pm »
Doesn't that fill up the stack though?  Couldn't that cause the stack to overflow if used enough?

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Full Normal Slow?
« Reply #57 on: January 30, 2011, 03:45:18 pm »
No, more like it empties the stack all at once.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Full Normal Slow?
« Reply #58 on: January 30, 2011, 03:55:47 pm »
Yeah, its a nice idea.  I use it in a lot of my programs, sometimes because I'm just too lazy to keep track of the stack, but the reason I don't have a single command for that in Axe is because its a 2 part command.  You would need a "save stack" and "restore stack" command.  Calling the restore stack without saving first though is pretty much a guaranteed ram clear.
« Last Edit: January 30, 2011, 04:02:11 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

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: Full Normal Slow?
« Reply #59 on: January 30, 2011, 03:59:21 pm »
Ah, okay! Cool! Again, I'm not Axe literate, so I was just curious. So are you saying that you can do this in Axe? There is a command to save it and a command to restore it? That would be useful for programs that require user input that could destabilize the stack.