Troubleshooting a Stopped BASIC Program

 

Determine if the Program is Stopped or Hung-Up

Configure Hyperterminal for the correct baud rate, framing, and parity and connect your cable to the current COMMAND port on the BASIC module and press <ENTER>. If the module returns the command prompt ‘>’ then the program has stopped executing. See ‘Reasons for a Program to Stop’.

If the program did not return the command prompt on the previous step, press <CTRL> C. If the module returns the message ‘Stop in Line ###’, note the line number and see ‘Reasons for a Program to Hang-Up’.

If the message “Command Mode Lockout’ is returned, the person who wrote the BASIC program should be contacted.

If the above steps did not produce any results then Hyperterminal is not configured correctly, the cable is not wired correctly, the cable is not connected to the COMMAND port of the BASIC module, or the BASIC module is damaged.

 

Reasons for a Program to Stop

Type PRINT1 SYSTEM(1) from the command prompt to determine the last error (use PRINT2 if port 2 is the COMMAND port). The most likely causes are BAD SYNTAX Errors or BAD ARGUMENT Errors.

If a serial device is connected to the COMMAND port, does that device send ASCII code 3? If the serial device connected to the command port sends an ASCII 3 the BREAK statement should be added to the program to prevent ASCII 3 (CTRL C) from stopping the program.

 

Reasons for a Program to Hang-Up

If a program executes an INPUT statement and the SETINPUT parameters have not been set or the Wait for First Time-Out parameter is set to 0 and the serial device is not connected or does not send characters the program will ‘Wait Forever’ for characters to come into the serial port.

If a serial port is configured for XON/XOFF (Software Handshaking) (Default) and the serial device sends ASCII 19 (XOFF), then the BASIC module will wait until ASCII 17 (XON) is received before proceeding with a PRINT or INPUT statement.

 

 

×