This problem occurs in the SIMULATOR only!
sample program below:-
Multitask program.
Start1 suspends itself.
An interrupt from pinsc.3 contains a PAUSE then: the PAUSE has no effect i.e. it runs past the pause. The simulator stop at the RETURN statement.
Remove the PAUSE and the simulation runs OK.
Remove the START1: section and the simulation runs OK with the PAUSE staement.
V5 simulator runs OK.
Load the program on a chip and it runs OK.
#picaxe 20m2
#simtask all
start0:
'********* SETUP ***************
'let dirsC = %00000011 'switch pins 0 and 1 to outputs
setint %00001000,%00001000
gosub dowhile
Main:
goto main
dowhile:
do while bit0 = 0
loop
return
start1:
suspend 1
main1:
goto main1
interrupt:
bit0 = 1
pause 1000
return
sample program below:-
Multitask program.
Start1 suspends itself.
An interrupt from pinsc.3 contains a PAUSE then: the PAUSE has no effect i.e. it runs past the pause. The simulator stop at the RETURN statement.
Remove the PAUSE and the simulation runs OK.
Remove the START1: section and the simulation runs OK with the PAUSE staement.
V5 simulator runs OK.
Load the program on a chip and it runs OK.
#picaxe 20m2
#simtask all
start0:
'********* SETUP ***************
'let dirsC = %00000011 'switch pins 0 and 1 to outputs
setint %00001000,%00001000
gosub dowhile
Main:
goto main
dowhile:
do while bit0 = 0
loop
return
start1:
suspend 1
main1:
goto main1
interrupt:
bit0 = 1
pause 1000
return