Login
Back to forumSee the full topicGo to last reply

Posted By

BushRat
on 2002-08-10
 Quote...

Maybe this will help, guys, I typed it in from the annoted technical papers when they upgraded the kernal Rom from Version 4 to Version 5

Starting at $932C...

"The main purpose of the following routines is to read in the ASCII text of BASIC expressions, seperate the operators and terms of the expression, check them for errors, combine the individual terms by performing the indicated operations, and obtain a single value which the BASIC program can use.
This is a very complex task, as expressions can be of the string or numeric type, and can contain any type of variable, as well as constants.
At the end, the flag which shows whether the resulting value is string or numeric at 13 ($D) is set, and if the the value is numeric, the flag at 14 ($E) is set as well, to show if it is an interger or floating point number.
The Label EVAL (decimal 37911), but mainly the EVAL (decimal 38001), routine reduces a single arithmetic term which is part of an expression from ASCII text to its floating point equivalent.
If the term ia a constant, the routine sets the data type flag to number, sets the text pointer to the first ASCII numeric character, and jumps to the routine which converts the ASCII string to a floating point number.
If the term ia a variable, the variable value is retreived. If it is the PI character, the value of PI is moved to the Floating Point Accumulator.
This routine is vectored through RAM at 778 ($30A), IEVAL"



Back to top


Copyright © Plus/4 World Team, 2001-2024