luhsra / MinimaxSimulator

Platform independent GUI-based Minimax simulator
https://luhsra.github.io/MinimaxSimulator/
MIT License
7 stars 5 forks source link

MAR overflow exception #35

Closed JoFalken closed 5 years ago

JoFalken commented 6 years ago

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 commented 6 years ago

@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 commented 5 years ago

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