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

int e l 7.3 SYSTEM CONTROL VALUES The SYSTEM CONTROL VALUES determine or reveal how memory is allocated by MCS BASIC-52. MTOP After reset, MCS BASIC-52 sizes the external memory and assigns the last valid memory address to the SYSTEM CONTROL VALUE, MTOP. MCS BASIC-52 will not use any external RAM memory beyond the value assigned to MTOP. If the user wishes to allocate some external memory for an assembly language routine the LET statement can be used (e.g. MTOP = USER ADDRESS). If the user assigns a value to MTOP that is greater than the last valid memory address, a MEMORY ALLOCATION ERROR will be generated. EXAMPLES:

>PRINT MTOP 2047 >MTOP=2000 >PRINT MTOP 2000 LEN The SYSTEM CONTROL VALUE, LEN. tells the user how many bytes of memory the current selected program occupies. Obviously, LEN cannot be assigned a value, it can only be read. A NULL program (i.e. no program) will return a LEN of 1. The 1 represents the end of program file character. FREE The SYSTEM CONTROL VALUE, FREE, tells the user how many bytes of RAM memory are available to the user. When the current selected is in RAM memory, the following relationship will always hold true. FREE = MTOP -- LEN -- 511 NOTE: Unlike some BASICS, MCS BASIC-52 does not require any "dummy" arguments for the SYSTEM CONTROL VALUES. - 95 -