int e l 4.2 DESCRIPTION OF STATEMENTS STATEMENT: CALL [integer] MODE: COMMAND AND/OR RUN TYPE: CONTROL The CALL [integer] STATEMENT is used to call an assembly language program. The integer following CALL is the address where the user must provide the assembly language routine. To return to BASIC the user must execute an assembly language RET instruction. Examples of how to use the CALL [integer] instruction are given in the ASSEMBLY LANGUAGE LINKAGE section of this manual. EXAMPLE: CALL 9000H Will cause the 8052AH to execute the assembly language program beginning at location 9000H (i.e. the program counter will be loaded with 9000H). VARIATIONS:
(VERSION 1.1 ONLY) If the integer following the CALL statement is between 0 and 127 (7FH), Version 1.1 of MCS BASIC- 52 will multiply the user integer by two, then add 4100H and vector to that location. This means that CALL 0 will call location 4100H, CALL 1 will call 4102H, CALL 2 -- 4104H and so on. This permits the user to generate a simple table of assembly language routines without having to enter 4 digit hex integers after the CALL statement from the user supplied RESET routine. - 29 -