intel MCS BASIC-52 — Intel MCS BASIC-52 Versions 1 & 1.1 Operating and Reference Manual PDF (EN)

int e l 9.2 GENERAL PURPOSE ROUTINES OPBYTE = 5 (05H) INPUT A STRING OF CHARACTERS AND STORE IN THE BASIC INPUT BUFFER. This instruction inputs a line of text from the console device and saves the information in the MCS BASIC-52's input buffer. MCS BASlC-52's input buffer begins at EXTERNAL MEMORY LOCATION 7 (0007H). All of the line editing features available in MCS BASIC-52 are implemented in this instruction. If a control-C is typed during the input process, MCS BASIC-52 will trap back into the command mode. A carriage return (cr) terminates the input procedure. OPBYTE = 6 (06H) OUTPUT THE STRING OF CHARACTERS POINTED TO BY THE REGISTER PAIR R3:R1 TO THE CONSOLE DEVICE.

This instruction is used to OUTPUT a string of characters to the console device. R3:R1 contains the initial address of this string. The string can either be stored in PROGRAM MEMORY or EXTERNAL DATA MEMORY. If BIT 52 (34H) (which is BIT 4 of internal RAM location 38 (26H)) is set, the output will be from PROGRAM MEMORY. If BIT 52 is cleared, the output will be from EXTERNAL DATA MEMORY. The DATA stored in MEMORY is sent out to the console device one byte at a time and the memory pointer is incremented. The output is stopped when a termination character is read. The termination character for PROGRAM MEMORY and EXTERNAL DATA MEMORY are different.

The termination character for EXTERNAL DATA MEMORY is a (cr) 0DH. The termination character for PROGRAM MEMORY is a " or 22H. OPBYTE = 7 (07H) OUTPUT A CARRIAGE RETURN-LINE FEED SEQUENCE TO THE CONSOLE DEVICE. Enough said. OPBYTE = 128 (80H) OUTPUT THE CHARACTER IN R5 (REGISTER BANK 0) TO THE CONSOLE DEVICE. This routine takes the character that is in R5 (register bank 0) and directs it to the console device. Any console device may be selected (i.e. U0 or UI or the software serial port). - 111 -