-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SP points to last-1 instead of last push #10
Comments
Nice catch! In order to adhere to that, I'm probably going to start the SP at address FFFE. It could still start at FFFF, but since every PUSH is pushing 16 bits, I'd like to keep those aligned nicely in the memory. That way: If SP=FFFE, the stack is empty Does that sound okay? |
Sounds perfect, and FFFE is the starting address of some old, respected but outdated simulators. |
Fixed as of edc7bc0. |
initial SP = 0000
run:
SP = FFFD, it should be FFFE instead.
SP isn't pointing to the address containing the last PUSHed byte but rather the next available one. This is an error, according to Intel's specification (see 3-44, 3-45) it should be pointing to the address of the last one.
The text was updated successfully, but these errors were encountered: