home *** CD-ROM | disk | FTP | other *** search
- PEEKs, POKEs, & SYSes - Part 7
- --------------------------------
-
- by: Joel Ellis Rea
-
-
- ======================================
- Location: 11 Hexadecimal: $000B
- Official Label: COUNT Type: RAM
- Useful BASIC Commands: PEEK, POKE
-
-
- This location serves two purposes.
-
- It is used when BASIC is dissecting
-
- a line you have just typed in. After
-
- hitting the RETURN key, BASIC tries
-
- to make sense of the line you just en-
-
- tered. The line is copied to a place
-
- in memory called the Input Buffer.
-
- This buffer takes up 88 bytes starting
-
- at 512 ($0200). To keep track of just
-
- where in the buffer it is, BASIC puts
-
- the low byte of the current location
-
- within the buffer in COUNT.
-
- The second purpose occurs when BA-
-
- SIC needs to access an array. The rou-
-
- tine which processes arrays uses COUNT
-
- to store the number of dimensions. For
-
- example, suppose you execute:
-
-
- X = AR(2,5,X+3,Y/2)
-
-
- As BASIC evaluates the array reference
-
- of AR, it stores a 4 in COUNT, because
-
- there are 4 dimensions (subscripts) in
-
- AR.
-
-
- ======================================
- Location: 12 Hexadecimal: $000C
- Official Label: DIMFLG Type: RAM
- Useful BASIC commands: PEEK, POKE
-
-
- DIMFLG is used when an array is
-
- created. An array can be created in 2
-
- ways: by the DIM statement, or by de-
-
- fault first reference. If an array is
-
- referenced without being DIMmed, the
-
- size of each dimension defaults to 11
-
- (ranging from 0 to 10). The DIMFLG is
-
- zero if an array is created without a
-
- DIM statement, or non-zero if DIM was
-
- used.
-
-
- ======================================
- Location: 13 Hexadecimal: $000D
- Official Label: VALTYP Type: RAM
- Useful BASIC commands: PEEK, POKE
-
-
- This is an important flag for BASIC
-
- expression evaluations. VALTYP=0 when
-
- a referenced variable, constant or ex-
-
- pression is numeric, or 255 ($FF) when
-
- it is a character string.
-
-
- ======================================
- Location: 14 Hexadecimal: $000E
- Official Label: INTFLG Type: RAM
- Useful BASIC commands: PEEK, POKE
-
-
- Sometimes it is not enough to know
-
- if a variable or expression is numeric
-
- since there are two kinds of numerics:
-
- real and integer. INTFLG is set to 0
-
- if it is real (floating-point), or 128
-
- ($80) if it is an integer.
-
-
- ======================================
- Location: 15 Hexadecimal: $000F
- Official Label: GARBFL Type: RAM
- Useful BASIC commands: PEEK, POKE
-
-
- This flag is used by BASIC for 3
-
- things: it has something to do with
-
- the scanning of DATA statements (but I
-
- couldn't figure out what), it is used
-
- by the LIST command to see if it is
-
- currently LISTing between quotes (so
-
- it won't print out cursor controls as
-
- tokens), and it is used by the 'gar-
-
- bage collection' routine (the routine
-
- that throws-away old strings to make
-
- room for new stuff) to see if a gar-
-
- bage collect has already been done.
-
-
- --------- continued in PART 8 --------
- X to exit
-