Cross-referencing can be a powerful tool in program debugging. Cross-referencing listings usually provide a listing of the program, followed by a list of all the variables in the program and the lines on which they occur. This routine shows how to find a single variable and the lines on which it occurs, and is done by searching for the internal representation of the variable within the program. All Basic programs are tokenised, or converted into internal formats, called tokens. On the Amstrad, Basic variables are coded, so that internally they are represented by the ASCII codes preceded by a prefix. This is 040000 for reals, 020000 for strings, and 01000 for integers. The code 0080 (in hex) is added to the code for the last character of the name. The structure of each line internally consists of line length (two bytes), line number (two bytes) and the coded text. A subroutine to find a single variable is given. The strange star character should be typed in as the $ symbol for strings (I assume that the character used is the Czechoslovakian equivalent). This routine could be used as the basis for a complete cross-referencing program. Australian Personal Computer ★ AMSTRAD CPC ★ DOWNLOAD ★ |
|
CPCrulez[Content Management System] v8.7-desktop/c Page créée en 402 millisecondes et consultée 939 foisL'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko. |
|
|