Author Topic: The case of the decreasing RAM  (Read 20304 times)

0 Members and 4 Guests are viewing this topic.

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: The Case of the Missing RAM
« Reply #15 on: June 24, 2010, 02:25:38 pm »
Take the program off Startup and add a routine that once you turn the calc back on, the program returns to the beginning of itself. Thus, you stay within the same instance. Remember, when the calc is turned off using asm within a program, when the calc is turned back on, it resumes from the line it left off. Hope this help.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: The Case of the Missing RAM
« Reply #16 on: June 24, 2010, 02:32:59 pm »
Try this hex instead maybe: 3E01D303FB76FDCB09A6C9
« Last Edit: June 24, 2010, 02:40:28 pm by Runer112 »

Offline Michael.3545

  • LV3 Member (Next: 100)
  • ***
  • Posts: 69
  • Rating: +13/-7
    • View Profile
Re: The Case of the Missing RAM
« Reply #17 on: June 24, 2010, 02:37:20 pm »
@ACagliano

...when the calc is turned off using asm within a program, when the calc is turned back on, it resumes from the line it left off...

My code doesn't do this.
I tried:
Code: [Select]
Disp "HI"
Asm(EF0850C9)
Pause 1000
Disp "HI2"

And I received the output of HI on the home screen after turning the calculator back on.



@Runner112


EF0850   =   bcall 5008
C9   =   ret


Why is the longer one so much longer?
« Last Edit: June 24, 2010, 02:44:20 pm by Michael.3545 »

Offline ACagliano

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 919
  • Rating: +32/-2
    • View Profile
    • ClrHome Productions
Re: The Case of the Missing RAM
« Reply #18 on: June 24, 2010, 02:41:14 pm »
Because, the "calc off" command doesn't really turn off the calc. It just turns off the LCD, but the processor moves forward onto the next instruction. So when you press ON, the Pause 1000 is already done, so now "HI" is on the screen.

At least I think thats how it works. correct me if I'm wrong.
« Last Edit: June 24, 2010, 02:42:05 pm by ACagliano »

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: The Case of the Missing RAM
« Reply #19 on: June 24, 2010, 02:43:21 pm »
Because, the "calc off" command doesn't really turn off the calc. It just turns off the LCD, but the processor moves forward onto the next instruction. So when you press ON, the Pause 1000 is already done, so now "HI" is on the screen.

At least I think thats how it works. correct me if I'm wrong.

This hex only turns off the LCD: 3E02D310C9

The hex he's using turns off the entire calculator and halts processing.

Offline Michael.3545

  • LV3 Member (Next: 100)
  • ***
  • Posts: 69
  • Rating: +13/-7
    • View Profile
Re: The Case of the Missing RAM
« Reply #20 on: June 24, 2010, 02:46:30 pm »
Ah, so is there one that pauses processing and turns off the LCD screen?  Like a standby mode in windows?

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: The Case of the Missing RAM
« Reply #21 on: June 24, 2010, 02:50:36 pm »
I'm looking at the bottom of this page http://tibasicdev.wikidot.com/hexcodes for information about hex codes involving turning off the calculator. They say the hex code you're using should do what you want, but there's another hex code that it sounds like your code is producing the behavior of. I'm thinking perhaps the two got mixed up and the one you really want is 3E01D303FB76FDCB09A6C9.
« Last Edit: June 24, 2010, 02:51:38 pm by Runer112 »

Offline Michael.3545

  • LV3 Member (Next: 100)
  • ***
  • Posts: 69
  • Rating: +13/-7
    • View Profile
Re: The Case of the Missing RAM
« Reply #22 on: June 24, 2010, 03:06:08 pm »
That new code (the long one) doesn't resume where I left off, but it also seems to not eat RAM, so I will test it out.

EDIT:  The new code now works just like the old one (returns to home screen on power-on) , only without the RAM-eating side effect.  Thanks everyone, it seems that this case is closed.
« Last Edit: June 24, 2010, 03:11:27 pm by Michael.3545 »

Offline Michael.3545

  • LV3 Member (Next: 100)
  • ***
  • Posts: 69
  • Rating: +13/-7
    • View Profile
Re: The Case of the Missing RAM
« Reply #23 on: June 24, 2010, 06:00:09 pm »
Well, when you turn back on again from the new asm code, the startup application doesn't launch.  Any suggestions?  Perhaps there is a way to make the program start itself without the app?


(self-starting programs *shudder* what's next, a calculator virus?  skynet8x?)

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: The Case of the Missing RAM
« Reply #24 on: June 24, 2010, 10:39:38 pm »
EDIT:  Now that I think of it, there MUST be some way of doing this, as other password protection Apps and Programs don't have this problem.  Oh, and where in memory do the copied programs go? I can't seem to find them with calcsys.
When programs are run they start execution at $9D95. :)

I'm glad you figured this out.  It sounds like a neat program. ;D

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: The case of the decreasing RAM
« Reply #25 on: June 24, 2010, 10:45:22 pm »
Btw I renamed the first post of this topic so OmnomIRC grabs it under it, because it might make people think this topic is about the extra 84+ RAM pages issue that hits TI-Boy SE, Msd8x, Omnicalc RestoreMem and the like.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: The case of the decreasing RAM
« Reply #26 on: June 25, 2010, 02:09:15 am »
I think the C9 should be removed from ASM routines you use, because that causes it to return, which you don't want with inline assembly like this.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

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: The case of the decreasing RAM
« Reply #27 on: June 25, 2010, 02:18:08 am »
Will it act like Stop does in BASIC in some ways, exiting from every single program you were in back to the TI-OS? I remember Doors CS had troubles dealing with this.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: The case of the decreasing RAM
« Reply #28 on: June 25, 2010, 02:21:01 am »
Well, it works just like a "Return" instruction in Axe (and you probably won't want your program/subroutine to exit after your Asm() statement)
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

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: The case of the decreasing RAM
« Reply #29 on: June 25, 2010, 02:23:38 am »
Aaaah ok, I see, thanks for the info