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

0 Members and 1 Guest are viewing this topic.

Offline mapar007

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 550
  • Rating: +28/-5
  • The Great Mata Mata
    • View Profile
Re: The case of the decreasing RAM
« Reply #30 on: June 25, 2010, 02:58:30 am »
ret (C9) in asm is pretty similar to Return in BASIC, (and Axe, it seems).

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: The case of the decreasing RAM
« Reply #31 on: June 25, 2010, 04:40:15 am »
Return IS ret in Axe.  They are one and the same :P

A self launching program is going to be too difficult without help from the OS or the start-up app.  What I would do instead is have the calculator turn off the LCD and then halt the execution until the next [ON] interrupt.  You might have to get an ASM programmer to write this for you if you're new to assembly since its pretty tricky.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline calcdude84se

  • Needs Motivation
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2272
  • Rating: +78/-13
  • Wondering where their free time went...
    • View Profile
Re: The case of the decreasing RAM
« Reply #32 on: June 25, 2010, 11:42:24 am »
The code for that is:
Code: [Select]
;Wait until [ON] is pressed, and in low power mode
ld a,1
out (03h),a ;Set the calc to go into low power mode on a halt, and only respond to the [ON] key
ei ;Just to make sure they are on
halt ;Wait until [ON] is pressed
ld a,$0B ;normal mask
out (03h),a ;Set things back to normal
Let me assemble that for you.
* calcdude goes and assembles this.
Edit: The hex is 3E01D303FB763E0BD303
This should be inserted as a normal line in code, seeing as there is no return at the end
« Last Edit: October 09, 2010, 05:50:32 pm by calcdude84se »
"People think computers will keep them from making mistakes. They're wrong. With computers you make mistakes faster."
-Adam Osborne
Spoiler For "PartesOS links":
I'll put it online when it does something.

Offline Michael.3545

  • LV3 Member (Next: 100)
  • ***
  • Posts: 69
  • Rating: +13/-7
    • View Profile
Re: The case of the decreasing RAM
« Reply #33 on: June 25, 2010, 05:18:29 pm »
As all of you stated above, the C9 on the end was the issue.  I figured this out myself last night before I went to bed.  Actually, it was keeping me up.  I thought to myself, "What if ret is the same as Return?"  I took off the C9, and bazinga!  After turning back on, the code resumed where it had left off.  After a slight modification of my program, (eliminated the appvar and added a big ol' loop) it worked beautifully.  So all of the people who were talking about the C9 above were right.  In conclusion, C9's are bad to have at the end of your Asm( tags in Axe.  Quigibo, perhaps this would be a worthy addition to the Asm( portion of the commands list?  And if anyone wants the working source code, I will post that here as soon as I unlock uploads at 20 posts.  The 8 digit password can be easily changed in the source code if you use the keycodes.png file included with 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: The case of the decreasing RAM
« Reply #34 on: June 25, 2010, 05:21:15 pm »
I took off the C9, and bazinga!
Nice bazinga. ;D

Great!  I'm glad you got it to work properly. :D

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: The case of the decreasing RAM
« Reply #35 on: June 25, 2010, 07:13:29 pm »
Nice to hear you got it working properly :)
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Michael.3545

  • LV3 Member (Next: 100)
  • ***
  • Posts: 69
  • Rating: +13/-7
    • View Profile
Re: The case of the decreasing RAM
« Reply #36 on: June 25, 2010, 10:33:33 pm »
Here's the source file, for anyone who's interested.  To change the 8 character password, put the key codes into GDB1.  Currently, it is set a 1,2,3,4,5,6,7,8.
If it locks after two tries, holding [2ND] + [MODE] + [DEL] will reset tries and go back to password screen.  You can change the initial tries by changing the value stored to T.  All the things that you might want to change are on the first screen.

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: The case of the decreasing RAM
« Reply #37 on: June 25, 2010, 11:15:01 pm »
Mhmm I might try this later, altough I might not need it much personally (since no one else touches my calc, so no risk of getting mem resets)
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Michael.3545

  • LV3 Member (Next: 100)
  • ***
  • Posts: 69
  • Rating: +13/-7
    • View Profile
Re: The case of the decreasing RAM
« Reply #38 on: June 26, 2010, 12:33:39 pm »
It seems that the off mode the program goes into is somehow fundamentally different than a normal shutdown, and Press-To-Test cannot be enabled.  Of course, the password may just PO a teacher and cause them to rip out a battery, clearing your RAM.  But that could be fun to watch.  (If you had a back-up)

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: The case of the decreasing RAM
« Reply #39 on: June 26, 2010, 01:00:31 pm »
Mhmm... interesting. TOo bad I couldn't test the later because I have been out of hi scool for years ;D
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: The case of the decreasing RAM
« Reply #40 on: June 26, 2010, 02:01:32 pm »
And I just got out of high school :O haha what would be funny is if you hacked your calculators to have secret extra bateries :P watch them pull the bateries and *nothing happens*!  (and then get your calc confiscated x.x)

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: The case of the decreasing RAM
« Reply #41 on: June 26, 2010, 02:05:45 pm »
Yeah I think if they noticed your calc was modded/hacked so no reset can be possible, they would take it away for the entire test
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Michael.3545

  • LV3 Member (Next: 100)
  • ***
  • Posts: 69
  • Rating: +13/-7
    • View Profile
Re: The case of the decreasing RAM
« Reply #42 on: June 26, 2010, 02:23:06 pm »
Hence the two patches to respectively disable PTT, and make it appear to be non-disabled.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: The case of the decreasing RAM
« Reply #43 on: June 26, 2010, 02:30:28 pm »
Ahh tricky tricky ^-^ teachers around the world are losing their grasp of control :D

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: The case of the decreasing RAM
« Reply #44 on: June 26, 2010, 02:48:00 pm »
Hence the two patches to respectively disable PTT, and make it appear to be non-disabled.
True, usually they won't notice that one :P
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)