davervw / wozmon_cbm

wozmon hex monitor from Apple-1 ported to Commodore
Other
3 stars 0 forks source link

SYNTAX ERROR after running a program #1

Closed demesos closed 4 months ago

demesos commented 4 months ago

I tend to get a SYNTAX ERROR after running a program, for example, on the C64: sys5120 \ c350:ee 20 d0 60 c350: ff r ?syntax error ready.

davervw commented 4 months ago

Two points of clarification

  1. Wozmon does a JMP to your program, not a JSR. So you can exit with a JMP $1400 to return to Wozmon. 4C 00 14 Otherwise RTS returns to BASIC.
  2. $200 Buffer is shared between BASIC and Wozmon. The syntax error is that the SYS instruction was corrupted by Wozmon command line processor. A possible solution is to update zero page TXTPTR $7A/$7B that points to what BASIC is processing, so it points to a zero next (END) to avoid the syntax error. Example: 7A: 57 02 C350 R
demesos commented 4 months ago

Thanks a lot for the clarification! Awesome conversion!