Author Topic: Exiting an APP: bjump _JforceCmdNoChaR isn't working!?  (Read 3757 times)

0 Members and 1 Guest are viewing this topic.

Offline Jerros

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 137
  • Rating: +9/-0
    • View Profile
Exiting an APP: bjump _JforceCmdNoChaR isn't working!?
« on: July 12, 2010, 05:45:30 am »
I've figured that exiting an APP by simply using "ret" causes ram resets, so after some searching I fount that the prober way to exit an APP is by using the instruction :
Code: [Select]
bjump _JforceCmdNoChaR
However, when I try to compile it, my assembler (AppDev) gives the following error message:

"Macro expects args but none found"

What's the deal with this? Am I using the wrong command? or what arguments am I supposed to use?
If any more information is needed, just ask.
Hope someone can help me out here!


79% of all statistics are made up randomly.

Offline BuckeyeDude

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 283
  • Rating: +42/-0
    • View Profile
Re: Exiting an APP: bjump _JforceCmdNoChaR isn't working!?
« Reply #1 on: July 12, 2010, 05:56:10 am »
your include file (ti83plus.inc) likely defines bjump as a macro rather than an instruction, meaning that it wants parenthesis around it:
Code: [Select]
bjump(_JForceCmdNoChar)I believe the include file defines the instruction as B_JUMP, but i'm not positive, as I perfer the bjump() style syntax
also you can save 2 bytes in your code by using bcall instead of bjump. It will do exactly the same thing, and doesnt matter its suppose to be a jump, since this call will never return anyway
« Last Edit: July 12, 2010, 05:59:51 am by BuckeyeDude »

Offline Jerros

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 137
  • Rating: +9/-0
    • View Profile
Re: Exiting an APP: bjump _JforceCmdNoChaR isn't working!?
« Reply #2 on: July 12, 2010, 06:22:47 am »
Thanks, using "b_call _JforceCmdNoChaR" fixed it, though I could SWEAR I've tried that already, else I wouldn't post it here...
Anyway, seems to work allright now, thanks alot!


79% of all statistics are made up randomly.

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: Exiting an APP: bjump _JforceCmdNoChaR isn't working!?
« Reply #3 on: July 12, 2010, 07:00:21 am »
Buckeye, is that trick to use bcall() instead of bjump() always safe to use?  And does that also work with bjump(_Mon)?
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline BuckeyeDude

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 283
  • Rating: +42/-0
    • View Profile
Re: Exiting an APP: bjump _JforceCmdNoChaR isn't working!?
« Reply #4 on: July 12, 2010, 07:50:02 am »
No, only in the case of _JForceCmdNoChar will this work. The only reason it works is because the routine itself resets sp to the level the os expects it to (along with cleaning everything else up). Otherwise its the equivalent of trying to replace a jp Label with a call Label
I think bcall(_Mon) should work, test it. I've never really had to use the system monitor
« Last Edit: July 12, 2010, 07:52:00 am by BuckeyeDude »

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: Exiting an APP: bjump _JforceCmdNoChaR isn't working!?
« Reply #5 on: July 12, 2010, 10:14:56 am »
bcall(_Mon) works. I didn't even realize it was supposed to be a bjump.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

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: Exiting an APP: bjump _JforceCmdNoChaR isn't working!?
« Reply #6 on: July 12, 2010, 12:35:25 pm »
Glad it got fixed ^^

Also welcome back :)