Wellingborough / LMC

Little Man Computer Simulator
https://wellingborough.github.io/LMC/
GNU General Public License v3.0
1 stars 4 forks source link

Blank lines within program code #11

Closed Wellingborough closed 2 years ago

Wellingborough commented 2 years ago

[minor] Any blank lines in the LMC will pass assembly, but will not run as we hit a 000 HLT instruction. Perhaps we should compact the text on assembly? Or fail assembly? I think delete should delete the line if it is empty.

Leaving blank lines between program code and data is OK and should continue to be supported.

Wellingborough commented 2 years ago

What if someone intentionally writes a gappy program, with branch instructions to jump over the gaps? I have seen students do just this, so I think we should continue to allow (and assemble) gappy programs.