does the dcpu-16 have a stack or does the stack pointer just point to ram adresses ?(writing a dcpu-16 emulator)

130 views Asked by At

I'm making a dcpu-16 emulator and I'm having trouble implementing opcodes that use the stack pointer. What does the stack pointer point to? ram addresses?

1

There are 1 answers

0
mikijov On BEST ANSWER

Almost all CPU's, including DCPU-16, implements stack in memory/RAM. Stack is simply a data structure, algorithm if you will, that is useful in low level programming. The SP stack pointer is used by the PUSH, POP and PEEK values, which in turn get or put values into memory pointed to by SP.