If the stack operator runs out of memory because registers are constantly pushed onto it and not popped off what happens to the calculator? When I emulate it the emulator tells me it fails and the calculator turns off and clears the RAM, but are their actual detrimental effects to the calculator's RAM or Archive memory?

Code:

          ld b,0
          ld h,0
top:
          ld l,b
          inc b
          push hl
          jr top

I know its an infinite loop, but its the goal to scare people, I always back up the RAM in a group before using it.[/code]
The stack grows from high memory to low memory; you will be able to push until the stack overwrites the area in RAM where you are running the program, at which point random code will execute, and your calculator will almost definitely crash. Since you're executing completely random code, there is a nonzero possibility you could accidentally write things to ROM, but you won't permanently damage your RAM.
Ok thanks
Quote:
I know its an infinite loop, but its the goal to scare people, I always back up the RAM in a group before using it.


Explain please? Do you mean to make a routine to purposely crash a calculator?
Unfortunately yes, but it was more of just a mistake that it came about. I was working on learning assembly and I accidentally made that, and it happened to spread a bit, i wanted to make sure it was harmless to the calculator's ROM before it got onto some school owned calculator
Sonlen wrote:
Quote:
I know its an infinite loop, but its the goal to scare people, I always back up the RAM in a group before using it.


Explain please? Do you mean to make a routine to purposely crash a calculator?
I hope not; we generally frown on that sort of thing. On a happier note, would you care to introduce yourself in the Introduce Yourself topic?
will do
Etag wrote:
Unfortunately yes, but it was more of just a mistake that it came about. I was working on learning assembly and I accidentally made that, and it happened to spread a bit, i wanted to make sure it was harmless to the calculator's ROM before it got onto some school owned calculator


Ohh, I was under the impression that you were trying to make a sort of "malicious" program so-to-speak. Also I don't know Assembly, so I can't help, I was just trying to decide what the intentions of that bit of code was.
Sonlen wrote:
Etag wrote:
Unfortunately yes, but it was more of just a mistake that it came about. I was working on learning assembly and I accidentally made that, and it happened to spread a bit, i wanted to make sure it was harmless to the calculator's ROM before it got onto some school owned calculator


Ohh, I was under the impression that you were trying to make a sort of "malicious" program so-to-speak. Also I don't know Assembly, so I can't help, I was just trying to decide what the intentions of that bit of code was.
That's fair; thanks for asking, Sonlen. Etag, I wouldn't call it harmless, but it's unlikely to cause permanent damage.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement