Having trouble trying to search for this in the data sheet, just have seen how big it is and how it handles stack pointers. Would anyone mind helping me out where the "Stack" start on an Intel 8080?

  • 6
    The stack starts where the SP points to. See en.wikipedia.org/wiki/Intel_8080 – Jon Custer Apr 23 at 18:37
  • 2
    Th stack can be anywhere in the 64 KB address space and grow to any amount of the 64 KB address space. Software first loads the stack pointer with an initial address of the programmer's choice. – TonyM Apr 23 at 18:56
  • 4
    The 8080 stack doesn't remain in a confined space like the 6502 stack. It can potentially romp all across memory, causing a condition which StackExchange's original site was named after. In fact, that's one lazy way to do a memory clear, set the SP to the space, and "push like hell"... – Harper - Reinstate Monica Apr 24 at 8:38
  • @JBentley To my endless frustration, we do things differently here at Retrocomputing. – wizzwizz4 Apr 25 at 21:48

The stack starts wherever you as the programmer choose to initialize it to. Note that the stack grows downwards (i.e. towards lower memory addresses) so you would normally initialize the stack pointer to point to the top of a free area of RAM.

| improve this answer | |
  • 2
    Short and to the point. – another-dave Apr 24 at 11:28
  • @another-dave Thanks. It sounds as though OP has access to low-level documentation in the data sheet but, as is too often the case, it lacks context on how you might use a feature. – Graham Nye Apr 26 at 14:12

Would anyone mind helping me out where the "Stack" start on an Intel 8080?

After Reset content of the stackpointer is undefined.

Keep in mind, these are early 8 bit machines. There is no huge hardware and microcode that puts every part into a well defined state. For the 8080 the only thing guaranteed is that the PC will be reset to zero and execution starts from there (*1). Everything else has to be initialized by software (Boot code).

*1 - Reset is effectively just a clear input for the PC.

| improve this answer | |
  • 3
    Reset isn't just a clear input for the PC. It also needs to block execution of any instruction in progress. Otherwise, if e.g. RESET were asserted between the fetch of an "STA" instruction and the fetch of its operands, and the instruction at address 0000 was a JMP [ocode 0C3h], the STA instruction would write to address 0C3C3h. – supercat Apr 23 at 20:12
  • 13
    @supercat That's why the specifier 'effectively' has been used. After all, this is not supposed to be a course in CPU design, but helping the OP on a rather high abstraction leven, isn't it? – Raffzahn Apr 23 at 21:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.