Peter, yes I would say that is correct (or at least one way to do it). I suppose there are no hard and fast rules per se, but any Programming 101 professor would surely beat us with a stick for exiting a GOSUB with a GOTO rather than RETURN with a flag set or some other method.
CCK, Same here, I spent MANY hours headscratching over that one. Until I discovered that the processor always reset after exactly the same number of calls to a certain subroutine. Lots of time spent reading the datasheets/forums too. All resulting from poor (untrained) programming practices/bad habits. But learned a LOT in the process. 18F definitely has a few "gotchas" when migrating.




Bookmarks