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

int e l 9.6 ADDED LINK ROUTINES TO VERSION 1.1 - 126 - LOC OBJ LINE SOURCE 208F 7440 71 MOV A,#64 ; Get the character after the expression 2091 120030 72 LCALL 30H ; and bump the BASIC text pointer 73 2094 B42C6A 74 CJNE A,#',',C_ERROR; Make sure it is a comma, if not do an 79 ; error 76 2097 7439 77 MOV A,#57 ; Evaluate the next expression (the 2099 120030 78 LCALL 30H ; ending address) and put it on the 79 ; Argument Stack 80 209C 7401 81 MOV A,#1 ; Convert the last expression (the 209E 120030 82 LCALL 30H ; ending address) on the stack to 83 ; an integer and put it in R3:R1 84 20A1 8918 85 MOV 18H,R1 ; Save the ending address in the user 20A3 8B19 86 MOV 19H,R3 ; reserved locations 18H and 19H.

This 87 ; is reserved as register bank 3 88 20A5 7401 89 MOV A,#1 ; Convert the first expression (the 20A7 120030 90 LCALL 30H ; starting address) on the stack to 9l ; an Integer and put it in R3:R1 92 20AA 891A 93 MOV 1AH.R1 ; Save the starting address in the user 20AC 8B1B 94 MOV 1BH.R3 ; reserved locations 1AH and 18H 95 96 ; Now everything is set up to loop 97 20AE C3 98 LOOP1:

CLR C ; Check to make sure that the starting 20AF E518 99 MOV A,18H ; or current address is 20B1 951A 100 SUB8 A,1AH ; address 20B3 E519 101 MOV A,19H 20B5 951B 102 SUBB A,1BH 20B7 5004 103 JNC LOOP2 ; If the carry is set, it's over 20B9 E4 104 CLR A ; Go to the command mode 20BA 020030 105 LJMP 30H ; (if display was a statement instead 106 ; of a command. this routine would 107 ; exit with a RET) 108 20BD 7407 109 LOOP2: MOV A,#7 ; Do a carriage return, line feed 20BF 120030 110 LCALL 30H 111 20C2 A91A 112 MOV R1.1AH ; Output the Starting address 20C4 AB1B 113 MOV R3.18H 114 20C6 C236 115 CLR 36H ; Don't suppress leading zeros