ettikudiappan
Member
Hi
I have a BASIC module program that disables stopping the program using ^C after initial delay of 5 seconds. The problem is, even if I press ^C within the designated 5 sec, the program does not stop. I am not able to list the program either. I need to do this to backup the BASIC module program. I have set the jumpers such that PRT1 is a program port and the cable used is also of the proper type. I have uploaded sucessfully using the same cable and hyperterminal from other BASIC module that do not disable ^C.
For those interested, I am listing the program below.
5 REM **Reset LED's 1 & 2 - Ctrl-C Is Now Active**
10 PUSH 0 : PUSH 0 : CALL 112
20 REM
50 REM **Delay Before disabling Ctrl-C**
60 FOR X=1 TO 5000 : NEXT X
70 REM **Disable Ctrl-C**
80 REM CALL 19
90 REM
100 REM **Setup Ports 1 & 2**
110 MODE (PRT1,9600,N,8,1,N,R)
120 MODE (PRT2,9600,N,8,1,N,R)
130 REM
150 REM **Setup Port 1 For Data Xfer From Port 1 to M1:e.0 (12 Bytes)**
160 PUSH 1 : PUSH 12 : PUSH 10 : PUSH 1 : PUSH 0 : PUSH 0 : PUSH 1
170 CALL 22 : POP X
180 REM
200 REM **Setup Port 2 For Data Xfer From O:e.2 To Port 2**
210 PUSH 4 : PUSH 0 : PUSH 2 : PUSH 0 : PUSH 1
220 CALL 23 : POP X
230 REM
250 REM **Setup Port 2 For Data Xfer From Port 2 to I:e.2 (1 Byte)**
260 PUSH 2 : PUSH 1 : PUSH 0 : PUSH 0 : PUSH 2 : PUSH 0 : PUSH 1
270 CALL 22 : POP X
280 REM
300 REM **Clear Basic/SLC I/O Buffers**
310 PUSH 15 : CALL 120
320 REM
350 REM **Clear Port 2 I/O Buffers**
360 PUSH 2 : CALL 37
370 REM
400 REM **Clear Port 1 I/O Buffers**
410 PUSH 2 : CALL 96
420 REM
500 REM **Alternate LED's To Indicate Ctrl-C Disabled**
510 DO
520 PUSH 1 : PUSH 0 : CALL 112
530 FOR X=1 TO 100 : NEXT X
540 PUSH 0 : PUSH 1 : CALL 112
550 FOR X=1 TO 100 : NEXT X
560 UNTIL 1=2
1000 END
I have a BASIC module program that disables stopping the program using ^C after initial delay of 5 seconds. The problem is, even if I press ^C within the designated 5 sec, the program does not stop. I am not able to list the program either. I need to do this to backup the BASIC module program. I have set the jumpers such that PRT1 is a program port and the cable used is also of the proper type. I have uploaded sucessfully using the same cable and hyperterminal from other BASIC module that do not disable ^C.
For those interested, I am listing the program below.
5 REM **Reset LED's 1 & 2 - Ctrl-C Is Now Active**
10 PUSH 0 : PUSH 0 : CALL 112
20 REM
50 REM **Delay Before disabling Ctrl-C**
60 FOR X=1 TO 5000 : NEXT X
70 REM **Disable Ctrl-C**
80 REM CALL 19
90 REM
100 REM **Setup Ports 1 & 2**
110 MODE (PRT1,9600,N,8,1,N,R)
120 MODE (PRT2,9600,N,8,1,N,R)
130 REM
150 REM **Setup Port 1 For Data Xfer From Port 1 to M1:e.0 (12 Bytes)**
160 PUSH 1 : PUSH 12 : PUSH 10 : PUSH 1 : PUSH 0 : PUSH 0 : PUSH 1
170 CALL 22 : POP X
180 REM
200 REM **Setup Port 2 For Data Xfer From O:e.2 To Port 2**
210 PUSH 4 : PUSH 0 : PUSH 2 : PUSH 0 : PUSH 1
220 CALL 23 : POP X
230 REM
250 REM **Setup Port 2 For Data Xfer From Port 2 to I:e.2 (1 Byte)**
260 PUSH 2 : PUSH 1 : PUSH 0 : PUSH 0 : PUSH 2 : PUSH 0 : PUSH 1
270 CALL 22 : POP X
280 REM
300 REM **Clear Basic/SLC I/O Buffers**
310 PUSH 15 : CALL 120
320 REM
350 REM **Clear Port 2 I/O Buffers**
360 PUSH 2 : CALL 37
370 REM
400 REM **Clear Port 1 I/O Buffers**
410 PUSH 2 : CALL 96
420 REM
500 REM **Alternate LED's To Indicate Ctrl-C Disabled**
510 DO
520 PUSH 1 : PUSH 0 : CALL 112
530 FOR X=1 TO 100 : NEXT X
540 PUSH 0 : PUSH 1 : CALL 112
550 FOR X=1 TO 100 : NEXT X
560 UNTIL 1=2
1000 END