int e l 9.6 ADDED LINK ROUTINES TO VERSION 1.1 OPBYTE = 64 (40H) GET CHARACTER, THEN INCREMENT TEXT POINTER This OPBYTE does the same thing as the previous one described, except that the BASIC text pointer is INCREMENTED AFTER the character is read. An example of this OPBYTE is presented at the end of this section. OPBYTE = 65 (41H) INPUT A CHARACTER FROM THE CONSOLE DEVICE, PUT IT IN THE ACCUMULATOR, THEN RETURN This OPBYTE permits the user to input characters from MCS BASlC-52's console input routine. The character is placed in the accumulator upon return.
OPBYTE = 66 (42H) ENTER THE RUN MODE This OPBYTE permits the user to start the execution of an MCS BASIC-52 program from assembly language. The user need only insure that locations 19 (13H) and 20 (14H) of internal data memory contain the start address (high byte, low byte respectively) of the BASIC program. OPBYTE = 129 (81H) INPUT AN ASCII FLOATING POINT NUMBER AND PLACE IT ON THE ARGUMENT STACK. THE DPTR POINTS TO THE EXTERNAL RAM LOCATION, WHERE THE ASCII TEXT STRING IS STORED This routine assumes that the user has placed an ASCII text string somewhere in memory and that this ASCII text string represents a valid floating point number.
The user then puts the DPTR to the starting address of this text string. After this OPBYTE is executed the text string will be converted to a valid MCS BASIC-52 floating point number and placed on the argument stack and the DPTR will be advanced to the end of the floating point number. If the DPTR does not point to a text string that contains a valid floating point number, the accumulator will contain an 0FFH upon return. OPBYTE = 152 (98) OUTPUT, IN HEX, TO THE CONSOLE OUTPUT DRIVER, THE CONTENTS OF R3:R1 This routine is used to display HEX numbers, assuming that they are in registers R3:R1. If R3 = 0, leading zeros can be suppressed by setting BIT 54 (36H) before calling this routine.
If BIT 54 (36H) is cleared when this routine is called, the driver will always output four hex digits followed by the character H. This routine always outputs a space character (20H) to the console device, before any hex digits are output. BIT 54 (36H) is bit 6 of internal RAM location 38. - 123 -