ok, I've kludged it...but there's *got* to be an easier way than this...
'set up some variables....
turns_required VAR BYTE[3] ; the main input
UNITS VAR BYTE ' will use this to extract units from above
TENS VAR BYTE ' will use this to extract tens from above
HUNDREDS VAR word ' ' will use this to extract hundreds from above
TURNS_INPUT VAR WORD ' this will be used for the final goal - a useable number!!
pause 200 ' let things settle down a bit
HSEROUT ["Enter Number of turns required (3 digits + leading 0)>>>", 13,10] 'prompt for input.
Main
HSERIN 5000,finish,[WAIT("0"),STR turns_required \3] 'read in a 3 character string preceded by a '0'
UNITS = turns_required(2) - 48 'extract the last character (units) & revert it down to a true decimal
TENS = (turns_required(1) - 48) * 10 'extract the middle character (tens) & revert it down to a true decimal
HUNDREDS = (turns_required(0) - 48) * 100 ''extract the first character (tens) & revert it down to a true decimal
TURNS_INPUT = UNITS + TENS + HUNDREDS ' add them all together.
Using the above, I've turned my keyed in '3 character ASCII code' based string into its numeric equivalent, (that I can use later in the PIC program) ...but like I say, there's got to be an easier way?
Bookmarks