3

I read that, In 8085 the starting address of processor is 00000H. Where as, In 8086 the starting address of the processor is FFFF0H.

Now I have also learnt that the top portion of the memory is heap while below lies the stack. What I am confused now is whether in 8085, memory is allocated from stack whereas in 8086 from heap?

Please help me out to clear the concept. Thanks

trincot
  • 317,000
  • 35
  • 244
  • 286

2 Answers2

2

Heap allocation is a higher-level (C, java, etc) concept than assembly language, you don't have such thing in 808x assembly. You don't "allocate" memory.

On the other hand, the stack is a native concept of the 808x, as well as countless microprocessors (and virtual machines), it is used each time you use "CALL" for example (the PC is pushed onto the stack). When you RET, the return PC address is popped from the stack. And you can push registers / data onto the stack also.

huelbois
  • 6,762
  • 1
  • 19
  • 21
  • The stack concept is supported by lots of other CPUs as well, even from that era like for example the [Motorola 6800](http://en.wikipedia.org/wiki/Motorola_6800) from 1974. – DarkDust Feb 15 '12 at 13:52
  • Yes, sorry I wasn't clear enough. Corrected it. I just wanted to say that 808x microprocessors knows what a stack is, they can manipulate it directly or indirectly. Which is not the case of a heap. – huelbois Feb 15 '12 at 13:57
0

For a discussion about why the 8085's start address is 0000H (that's four zeros, not five since the processor only supports 16 bit addresses) see this thread.

As to the location of the stack: by modifying SP you can move the stack to wherever you want, but since it grows downward it simply makes sense to move it to the very end of the address space.

DarkDust
  • 90,870
  • 19
  • 190
  • 224
  • Your partially right. There should be 4 zero's but the Physical Address generated is of 20 bits so I bit increases. Thanks. –  Feb 15 '12 at 13:59