2

I am currently working through Project 7 on Nand2Tetris, and when the VM Emulator loads the .asm file, I am faced with the error:

SimpleAdd.asm: in line 1: unknown instruction - @SP

I thought SP was a predefined symbol that points to the stack pointer in RAM; in which case how could I resolve this error?

Mat
  • 21
  • 1

2 Answers2

2

I've got the same error. The solution is to run the .tst with the CPU Emulator:)

Kenta Kudo
  • 31
  • 1
1

You cannot use .asm files in the VM Emulator. That's why you get this error. To test your VM Translator, use the CPU Emulator to open the test file. Make sure the .asm file is in the same directory of the test file.