Mouhaha it's working
it never jump to 'there' or 'there2' and for sure 'there3'Code:' program to perfom an software reset ' PIC18F2220 DEFINE LOADER_USED 1 DEFINE OSC 20 DEFINE HSER_RCSTA 90h DEFINE HSER_TXSTA 24h DEFINE HSER_BAUD 9600 loop var byte begin: STKPTR = 0 ' clear Stack resets bits hserout ["software RESET",13,10] start: for loop = 10 to 0 step -1 hserout ["reset in ",dec loop,13,10] pause 1000 next STKPTR = $FF ' full stack pointer gosub there pause 1000 goto start there: hserout ["I'm supposed to be die now ;o("] pause 1000 gosub there2 return there2: hserout ["I'm supposed to be die now for the 2nd time ;o("] pause 1000 gosub there3 return there3: hserout ["I'm supposed to be die now for the 3rd time ;o("] pause 1000 return
cool stuff!




Bookmarks