:0801 0E 08 05 00 99 22 93 11
           :0809 11 11 05 22 00 35 08 0A
           :0811 00 99 22 20 20 20 54 4B
           :0819 49 53 20 49 53 20 41 4E
           :0821 20 45 5B 41 4D 50 4C 45
           :0829 20 4F 46 20 46 4F 57 2D
           :0831 41 20 22 00 5A 08 14 00
           :0839 99 22 20 20 20 42 41 53
           :0841 49 43 20 50 52 4F 47 52
           :0849 41 4D 20 49 53 20 46 4F
           :0851 52 4D 41 54 45 44 20 22
           :0859 00 84 08 1E 00 99 22 2D
           :0861 20 20 49 4E 20 54 48 45
           :0869 20 4D 45 4D 4F 52 59 2D
           :0871 4F 46 20 54 48 45 20 43
           :0879 4F 4D 4D 4F 44 4F 52 45
           :0881 2E 22 00 00 00 FD BD FF
           :0889 D0 FF FF E6 FF FE 00 00
      
         The format of Basic is as follows. Starting at $0801, the bytes
      0E 08 denote the placement of the next line number in memory in
      reverse order ($080E). The next two bytes, 05 00 denote the current
      line number in reverse order ($0005=5).
      
         Follow the bytes from here until you get to the next 00. This
      byte (residing at address $080D) denotes the end of the first line
      in this program. The next four bytes are again the pointers for the
      second line in our Basic program. The address $080E and $080F
      contain the bytes 35 08. These are the address of the next line
      number in our program, again in reverse order ($0835). The next two
      bytes starting at $0810 are 0A 00 which is the current line number
      of our program, again in reverse order (000A=0A in hex or line 10
      in decimal). This format is followed all through any normal Basic
      program and ends only when three hex zeros are encountered (00 00
      00). This tells Basic that the programs end has been found. You'll
      find these bytes in our example starting at $0883.
      
         This means that this program could be saved with your monitor
      using the addresses from $0801-$0885. The $0801 being the beginning
      of Basic and the $0885 the last of the three zero bytes. The actual
      save command would be <> S "FILENAHE",08,0801,0886 <>. We used the
      end address $0886 because all monitor saves need one extra byte
      added to the actual ending address ($0885+1=$0886).
      
         By understanding the structure of Basic, we can now repair any
      damage done to our pointers when we reset out of our program loads.
      Now let's move on to our example programs.

            K.J. REVEALED TRILOGY    PAGE [14]     (C)1990 K.J.P.B.

<<previous page - next page>>