• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Everyone in the world will die if I use the stack.
#1
I had a dream when I was child of about 5 years old. In this dream, I saw the coming destruction of the world. I alone was able to stop it. Oddly the instrument of destruction of the lives of everyone on this planet was a large balancing rock. Somehow if it toppled, all life would cease. Unfortunately, I knew I could stop it by merely placing a penny under it to stabilize it- like one does with salt to make an egg stand on end(not the gyroscope method!).

I did not get the penny there on time- it was too late and it merely folded under the crushing weight of the world killing stone. Everyone in the world died because of my inaction. For this reason, ambiguity leads to shut down in my cpu.

Roundabout 8 years later when I was learning assembly language, I saw there were certain commands that would use the stack to move stuff around- pushing things onto the stack and pulling them off whenever it required. Being self taught with no one to guide my tender prepubescent mind abnormally obsessed with responsibility, I made the decision to allow the cpu use the stack however it wanted and I would use indirect addressing for datasets or 'arrays' thus never having to concern myself with stack overflows. It seemed to make sense to me at the time.

And there you have it- You are all still alive because I don't use the stack.

Even though there are only like 2 people on this forum that know what I am talking about, I posted it anyways. And you thought you had issues!
Having long hair is great until you have to pull a footlong out of the dog's butt. flatank.blogspot.com
I. AM. LATCH.
  Reply
#2
Erm... Thanks
[Image: Bulbasaur_by_bigsharn.jpg]
As you do...
  Reply
#3
I can understand how that thought process could be formulated. When I learned assembly originally all I did was manipulate cpu register data, and therefore I was "taught" to deal with the stack first and to draw concern about it. Usually the concern is unnecessary because often when your code is compiled all of it is pretty much handled at compile time. Buffer overflows are engineered often take advantage of the assumed variable that we leave to chance.
[Image: icpn5k.jpg]
Trolls are the last thing you need to be concerned with.

VCD Wrote:// Forever more, count and reply, bitch.
  Reply
#4
I am one of the people who has no clue what your taking about, i freak out when i hear the word "Assembly language". Its always at the bottom of every coding forum, only the crazies go there!
[Image: bustedtees.07e3d5a3-8bf6-4c9a-8f85-5bccf2e28120.gif]
  Reply
#5
(01-02-2011, 05:40 AM)Mr. President Wrote: I am one of the people who has no clue what your taking about, i freak out when i hear the word "Assembly language". Its always at the bottom of every coding forum, only the crazies go there!

I doubt that Pack3t will disagree and I know I won't. Also, welcome to mcompute!
Having long hair is great until you have to pull a footlong out of the dog's butt. flatank.blogspot.com
I. AM. LATCH.
  Reply
#6
(31-01-2011, 09:55 PM)Pack3t SynAck3r Wrote: I can understand how that thought process could be formulated. When I learned assembly originally all I did was manipulate cpu register data, and therefore I was "taught" to deal with the stack first and to draw concern about it. Usually the concern is unnecessary because often when your code is compiled all of it is pretty much handled at compile time. Buffer overflows are engineered often take advantage of the assumed variable that we leave to chance.

Oops double posted! Wanted Pack3t to see the new addition and we shall call this a BUMP!

'Pretty much' handled at compile time- I was using a cartridge-that's right, cartridge. I don't is compiler was very smart- my guess was it was merely replacing the asm instructions for opcode, plus whatever variables used. My understanding of the overflow was that an overflow flag bit was triggered and the stack pointer went back to zero. Then if you pull from the stack you get whatever you put there a zillion time units ago or you pushed new values in the midst of the old ones. I can't remember if you could move the pointer any direction you wanted without load accumulator with the value you want the stack pointer to become then STA in stack pointer. That adds 2 more instructions! Most instructions take at least 2 cpu cycles. The processor I was using was 2 mhz. Which means I would have to wait a half a millionth of a second! I don't have that kind of time! That's wasteful! I am going to snap! Anywho, seemed like I thought it would be much easier to use the x index or y index since I almost had the same power with those as I did with the all-powerful accumulator!
Having long hair is great until you have to pull a footlong out of the dog's butt. flatank.blogspot.com
I. AM. LATCH.
  Reply


Forum Jump: