Hi Steve
You only get the error if you use the MPLAB SIM tool or program the PIC
and install it in the board.
Thanks
Wayne
Hi Steve
You only get the error if you use the MPLAB SIM tool or program the PIC
and install it in the board.
Thanks
Wayne
So to be clear does
fix the problem... i guess yes !?!Code:main: GoSub getkey Goto Start ' <=== Add this line getkey: kp1=0 'Clear kp1
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi Steve (MR. E)
Yes that did work and thank you very much for the help.
But one more thing WHY and what is a stack underflow?
Again Thanks
Wayne
A short explanation:
once the program RETURN from GETKEY, it RETURN after the GOSUB line, then do once again the GETKEY sub, meet a RETURN without a previous gosub.
Gosub => stack+1 => stack = +
Return => stack-1 => stack = 0
Return +> stack-1 => stack=-1 <=== here's the underflow![]()
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks