' {$STAMP BS2} ' {$PBASIC 2.5} 'This routine reads waypoint latitide and Longitudes that have beem previously entered 'into the Stamp EEPROM and displays them in a Debug window 'The last waypoint is marked by a 10000 Decimal in the EEPROM memory 'This program will overwrite the existing program and the operating program must be re-loaded 'the waypoints will not typically be affected by these operations. Waypointcounter VAR Byte DestLong VAR Word DestLat VAR Word DEBUG CLS DEBUG "Waypoint Latitude Longitude", CR Begin: READ (Waypointcounter * 4), Word DestLat 'Get Latitude for waypoint from EEPROM IF DestLat > 9999 THEN 'If greater than 9999 then no more are stored GOTO Final 'No more waypoints - Jumps out of subroutine & ends program ENDIF READ (Waypointcounter * 4 + 2), Word DestLong 'Get Longitude for current destination fromm EEPROM DEBUG " ", DEC3 Waypointcounter, " ", DEC4 DestLat," ", DEC4 DestLong, CR Waypointcounter = Waypointcounter + 1 GOTO Begin Final: END