Skip to content
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

MAR overflow exception #35

Closed
JoFalken opened this issue Oct 24, 2018 · 2 comments
Closed

MAR overflow exception #35

JoFalken opened this issue Oct 24, 2018 · 2 comments
Assignees
Labels

Comments

@JoFalken
Copy link

JoFalken commented Oct 24, 2018

When trying to write 4 bytes in MAR (which is limited to 3 bytes) instead of truncating the simulator extends MAR to 4 bytes (seen in debug mode). Using MAR in another operation afterward results in an overflow exception.
For example:
MAR <- 0xff000000;
MDR <- 8;
M[MAR] <- MDR;

@prohde
Copy link
Contributor

prohde commented Oct 25, 2018

@OpusV
What do we want to do? I think there are two possibilities.

  1. truncate the first byte but that could result in unwanted behaviour of the own program to simulate
  2. raise an exception so the user is aware of the problem and is able to fix his/her program

@prohde
Copy link
Contributor

prohde commented Nov 8, 2018

According to the lecture the machine should truncate the first byte.

@prohde prohde added the bug label Nov 15, 2018
@prohde prohde self-assigned this Nov 15, 2018
@prohde prohde closed this as completed in 1e816a2 Nov 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants