SAP-1 icon indicating copy to clipboard operation
SAP-1 copied to clipboard

Emulator Question

Open William-Brumble opened this issue 2 years ago • 0 comments

Is the emulator in working order? I'm playing around with it and can't get it to take the programs in the example program folder.

When trying to run them I get the error below:

(venv) .\sap-1\SAP-1> python .\Emulator\main.py .\Example-Programs\Counter.s  
Traceback (most recent call last):
  File "F:\coding\github\sap-1\SAP-1\Emulator\main.py", line 274, in <module>
    curses.wrapper(partial(main, args))
  File "C:\Users\William.B.Brumble\AppData\Local\Programs\Python\Python310\lib\curses\__init__.py", line 94, in wrapper
    return func(stdscr, *args, **kwds)
  File "F:\coding\github\sap-1\SAP-1\Emulator\main.py", line 21, in main
    processor.load_program(args.assembly)
  File "F:\coding\github\sap-1\SAP-1\Emulator\lib\sap1.py", line 82, in load_program
    self.program = Tools.asm.parseFile(program_file)
  File "F:\coding\github\sap-1\SAP-1\Emulator\lib\../..\Tools\asm.py", line 190, in parseFile
    raise SyntaxError(f"Unknown instruction: {mnemo}.", (file_path, cur_line, 0, line))
  File "F:\coding\github\sap-1\SAP-1\Example-Programs\Counter.s", line 1
    .data:
0xF: 0x1

LDA 0xF
loop:
OUT
SUB 0xF
JMP loop
SyntaxError: Unknown instruction: .data:
0xF:.
(venv) .\sap-1\SAP-1>

William-Brumble avatar Jan 13 '23 22:01 William-Brumble