Author Topic: ! and #  (Read 10842 times)

0 Members and 1 Guest are viewing this topic.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
! and #
« on: October 22, 2010, 10:34:06 am »
A couple of questions:
  • I know that ! is for the current entry on the homescreen and # is for the previous entry, but what about all the other entries? Where are they stored?
  • Does the OS treat ! and # specially, not just as normal programs? In other words, if I changed the data at ! and #, would it glitch the OS?
  • I noticed that apps can start and quit without changing the homescreen entry (!), but when I made a program that changed ! before quitting, it cleared after I quit. Is there a way to make it stay on the homescreen?
Thanks!
« Last Edit: October 22, 2010, 06:35:41 pm by Deep Thought »




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: ! and #
« Reply #1 on: October 22, 2010, 04:52:59 pm »
Lots of bullets

1. At least on OS 2.53 they are stored out in the extra ram page. Page 3 977Eh–9A7Dh, I have no idea what format. They are somewhere else on previous OS's but I don't remember.
2. ! and # are normal for what they do. If you change them cleverly you can mess with them.
3. Instead of changing !, use the recall queue. With this, you can send whatever you want to the command line when the app returns.
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: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: ! and #
« Reply #2 on: October 22, 2010, 05:01:52 pm »
Also this might be off-topic but make sure to not accidentally lock/hide them because it can mess up your calc badly when you recall an entry or press ENTER on the home screen. It's even worse when trying to archive them. When adding ":" at the start of a home screen line, those files showed in MirageOS 1.1 and out of curiosity I decided to mess around with them.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: ! and #
« Reply #3 on: October 22, 2010, 07:15:08 pm »
LOTS OF BULLETS

1. AT LEAST ON OS 2.53 THEY ARE STORED OUT IN THE EXTRA RAM PAGE. PAGE 3 977EH–9A7DH, I HAVE NO IDEA WHAT FORMAT. THEY ARE SOMEWHERE ELSE ON PREVIOUS OS'S BUT I DON'T REMEMBER.
2. ! AND # ARE NORMAL FOR WHAT THEY DO. IF YOU CHANGE THEM CLEVERLY YOU CAN MESS WITH THEM.
3. INSTEAD OF CHANGING !, USE THE RECALL QUEUE. WITH THIS, YOU CAN SEND WHATEVER YOU WANT TO THE COMMAND LINE WHEN THE APP RETURNS.


Oh, okay, thanks.

I got my calc to recall a string of tokens by messing with #, but I couldn't make the rclQueue thing work, even when I copied the example program directly. Does it work with normal programs?

Also this might be off-topic but make sure to not accidentally lock/hide them because it can mess up your calc badly when you recall an entry or press ENTER on the home screen. It's even worse when trying to archive them. When adding ":" at the start of a home screen line, those files showed in MirageOS 1.1 and out of curiosity I decided to mess around with them.

Got it ;D Can Axe create protected programs?




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: ! and #
« Reply #4 on: October 22, 2010, 07:20:25 pm »
It doeswhen compiling your source but otherwise you would need to check the VAT topics, one of which Cooliojazz posted how to do this

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: ! and #
« Reply #5 on: October 23, 2010, 11:33:46 am »
Another question:
  • I noticed a real var ? in Calcsys. What is it?

EDIT:
I got my calc to recall a string of tokens by messing with #, but I couldn't make the rclQueue thing work, even when I copied the example program directly. Does it work with normal programs?
« Last Edit: October 23, 2010, 11:34:45 am by Deep Thought »




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: ! and #
« Reply #6 on: October 23, 2010, 12:20:04 pm »
The recall queue should work with standard programs, you just have to be sure to store the info to be recalled somewhere where it won't get destroyed. Like appBackUpScreen. Also, I'm not positive, but you might need to force a jForceCMDNoChar. One way would be to manually deallocate the memory for your program and then bcall(_jForceCmdNoChar)

And real vars are real number variables. So like A, B, C are all real number vars. Unless of course they are complex ;)
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 Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: ! and #
« Reply #7 on: October 23, 2010, 12:24:01 pm »
The recall queue should work with standard programs, you just have to be sure to store the info to be recalled somewhere where it won't get destroyed. Like appBackUpScreen. Also, I'm not positive, but you might need to force a jForceCMDNoChar. One way would be to manually deallocate the memory for your program and then bcall(_jForceCmdNoChar)

The example in the link you gave me said to close with a jForceCmdNoChar, but I read the info page on it and it said that normal ASM prgms should never use it, so I replaced it with a RET :-\ What does it do?

And real vars are real number variables. So like A, B, C are all real number vars. Unless of course they are complex ;)

I meant I found one called "?" :P




Offline mapar007

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 550
  • Rating: +28/-5
  • The Great Mata Mata
    • View Profile
Re: ! and #
« Reply #8 on: October 24, 2010, 03:18:33 pm »
Calcsys is not always right about variable names, I've also seen Reals called [A] and such. I think it's a bug in Calcsys, not in the OS.

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: ! and #
« Reply #9 on: October 24, 2010, 04:58:16 pm »
Ok, bcall(_jForceCMDNoChar) tells the OS, "Go." But when you do this, the OS does not know that there is a program currently sitting in ram that needs to be deallocated, which results in a memory leak the size of your program. So here's how to get around that:

First, put a label "theStart" at the very beginning of your program (but after .db $BB $6D). Then put a label "theEnd" at the very end of your program. Now, instead of quitting with RET, quit with this.
Code: [Select]
quit:
ld hl, runner
ld de, $8000
ld bc, runnerEnd-runner
ldir

jp $8000
runner:
ld hl, $9D95
ld de, theEnd-theStart
bcall(_delMem)
bcall(_jForceCMDNoChar)
runnerEnd:

This manually deallocates your program (which obviously must be done from outside of it) and then does a jForceCMDNoChar. This might cause a one byte memory leak or something, so if it does, just increase DE by one there at the end.

Oh, and using RET instead of jForceCMDNoChar won't make the OS look at the recall queue. But then pressing [2nd] [mode] might make it happen.
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 Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: ! and #
« Reply #10 on: October 25, 2010, 12:10:53 pm »
I can't test it until later, but thanks. What's $8000, by the way? How big is it?




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: ! and #
« Reply #11 on: October 25, 2010, 04:24:24 pm »
$8000 has at least until $8100 of nothing. And then the area from $8100 to about $8180 is also rarely used.

It's basically just used as a temporary do something area. That's what the OS uses it for.
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 Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: ! and #
« Reply #12 on: October 25, 2010, 07:54:08 pm »
Oh, okay, thanks! By the way, what's after $C000? Why can't programs run after it?




Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: ! and #
« Reply #13 on: October 25, 2010, 07:57:40 pm »
Oh, okay, thanks! By the way, what's after $C000? Why can't programs run after it?
It's a hardware limitation. TI apparently added it so you couldn't run FlashApps from RAM or something, iirc
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: ! and #
« Reply #14 on: October 25, 2010, 07:58:11 pm »
Oh, okay, thanks! By the way, what's after $C000? Why can't programs run after it?
It's a hardware limitation. TI apparently added it so you couldn't run FlashApps from RAM or something, iirc

But it's still normal RAM, right?