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

int e l COMMAND/STATEMENT EXTENSIONS (VERSION 1.1 ONLY) STEP 4 Step 3 tokenizes the user keyword, this means that MC BASIC-52 translates the user keyword into the user token. So, in the preceding example, the keyword TRANSFER would be replaced with the token 11H. When MCS BASIC-52 attempts to execute the user token, it first makes sure that the user expansion option BIT is set (BIT 45), then CALLS location 2070H to get the address of the user vector table. This address is placed in the DPTR. The user vector table consist of series of Data Words that define the address of the user assembly language routines. EXAMPLE:

ORG 2070H ; LOCATION BASIC CALLS TO ; GET USER LOOKUP ; MOV DPTR,#VECTOR_TABLE RET ; VECTOR_TABLE: ; DW RUN_DISPLAY ; ADDRESS OF DISPLAY ; ROUTINE, TOKEN (10H) DW RUN_TRANSFER ; ADDRESS OF TRANSFER ; ROUTINE, TOKEN (11H) DW RUN_ROTATE ; ADDRESS OF ROTATE ; ROUTINE, TOKEN (12H) ; ORG 2300H ; AGAIN, THESE ROUTINES ; MAY BE PLACED ANYWHERE ; RUN DISPLAY: ; ; USER ASM CODE FOR DISPLAY GOES HERE ; RUN TRANSFER: ; ; USER ASM CODE FOR TRANSFER GOES HERE ; RUN_ROTATE: ; ; USER ASM CODE FOR ROTATE GOES HERE ; - 155 -