Closed jiaminglimjm closed 3 years ago
This pull request fixes two small bugs. The first bug is an off-by-one error, here is a program which should assemble because it is short enough to fit into memory: insufficient_memory_demo.mas. It is noted however, that instructions stored in the last cell cannot actually be executed as the PC will overflow, which is why I left the other lines of code using 4095 alone: https://github.com/MARIE-js/MARIE.js/blob/12687bdb5a6c8394a1aeb33c2f8a10914590690b/src/js/interface.js#L1103
4095
And the second bug is that labels containing whitespace are accepted but unaddressable. This program whitespace_label.mas should not be able to compile.
This pull request fixes two small bugs. The first bug is an off-by-one error, here is a program which should assemble because it is short enough to fit into memory: insufficient_memory_demo.mas. It is noted however, that instructions stored in the last cell cannot actually be executed as the PC will overflow, which is why I left the other lines of code using
4095
alone: https://github.com/MARIE-js/MARIE.js/blob/12687bdb5a6c8394a1aeb33c2f8a10914590690b/src/js/interface.js#L1103And the second bug is that labels containing whitespace are accepted but unaddressable. This program whitespace_label.mas should not be able to compile.