Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Whats a good initial setting for the stack pointer?

good initial pointer setting stack
0
Posted

Whats a good initial setting for the stack pointer?

0

SOLUTION: One greater than the highest RAM address. For example, if your highest RAM address is $1FFF, set the stack pointer at $2000. This will work even if there is nothing at $2000, because the first thing that happens when you store something on the stack is that the SP is decremented. PROBLEM: The program runs for a while, then it jumps to a location that is not in the program, and I get the error “Halt request Failed”. But it is not the stack. SOLUTION: This could be a code data segment problem. Check that under the Configure Menu “CPU” that the code/data segment is disabled. PROBLEM: I’m trying to use 68000 code for a timing loop, but the loop always seems to run faster than my calculations indicate. SOLUTION: The 68000 uses “instruction prefetch” which frequently causes the fetching of instructions to be buried within the execution of others. It is almost hopeless to try to count cycles to determine accurate 68000 timing. Use a device like the PI/T for accurate timing. PROBLEM:

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123