Zero Page

ISSUE 3


* ISSUE 2 : Repair minor bugs, improve device
            parameters for print @106 ($6A)

* ISSUE 3 : Improve memory defs 193-221 ($C1-$DD)
            Valid selections for DSKINIT sides

  0-$FF  0-255
      Dec     Hex     Description

      00      00      BREAK message flag.
                      If negative print BREAK
      01      01      String deliminator
      02      02      Another deliminator
      03      03      General count byte
      04      04      Count of IFs whilst looking
                      for ELSE
      05      05      DIM flag
      06      06      VALTYP - 0=numeric
                             1=string
      07      07      Garbage collection flag
      08      08      Subscript allowed flag
      09      09      INPUT/READ flag
      10      0A      Arithmetic use
      11:12   0B:0C   String pointer - first
                      free temporary
      13:14   0D:0E   String pointer - last
                      used temporary
      15-18   0F-12   Temporary results
      19-22   13-16   RND floating number seed
      23:24   17:18   Temporary results
      25:26   19:1A   Start of BASIC program
      27:28   1B:1C   Start of simple variables
      29:30   1D:1E   Start of array variables
      31:32   1F:20   End of storage in use
      33:34   21:22   Stack base address
      35:36   23:24   Stringspace base address
      37:38   25:26   Temporary pointer to new
                      string
      39:40   27:28   End of RAM used by BASIC
      41:42   29:2A   Last BASIC line number
      43:44   2B:2C   Input line number
      45:46   2D:2E   Old text pointer
      47:48   2F:30   Direct mode command text 
                      pointer
      49:50   31:32   DATA line number
      51:52   33:34   Pointer for DATA item
      53:54   35:36   Keyboard input buffer addr
      55      37      Current BASIC variable
                      name
      56      38      Flag for current BASIC
                      variable 00=Numeric
                               80=String
      57:58   39:3A   Pointer to current 
                      variable
      59:60   3B:3C   Current FOR/NEXT variable
      61:78   3D:4E   Evaluation variables
      79      4F      FLOATING POINT ACCUMULATOR
                       FAC exponent
      80-83   50-53   FAC mantissa
      84      54      Sign of FAC
      85      55      Temporary sign of FAC
      86-91   56-5B   String descriptor 
                      temporaries
      92      5C      FLOATING POINT ARGUMENT
                       ARG exponent
      93-96   5D-60   ARG mantissa
      97      61      Sign of ARG
      98-103  62-67   Miscellaneous use
      104:105 68:69   Current line number
      106-110 6A-6E   Device parameters for 
                      PRINT:
      106     6A      -device width comma field
      107     6B      -start of last comma field
      108     6C      -position in line
      109     6D      -device line length
      110     6E      -0=norm seperaters, -1=EOL 
                       seperator
      111     6F      Device number:
                       0 - console
                      -1 - tape
                      -2 - printer
      112     70      EOF flag
      113     71      Reset flag
                       $55 - warm,other cold
      114:115 72:73   Warm start vector
                       - points to NOP inst.
      116:117 74:75   Top of RAM-1
      118:119 76:77   Not used
      120     78      Tape file status:
                       0 - closed
                       1 - input
                       2 - output
      121     79      Number of characters in
                       cassette buffer
      122:123 7A:7B   Cassette buffer pointer
      124     7C      Block type:
                       0 - header
                       1 - data
                      $FF- EOF
      125     7D      Block length
      126:127 7E:7F   Address of cassette buffer
      128     80      Block checksum
      129     81      CASSERR:
                       0 - ok
                       1 - checksum
                       2 - memory
      130     82      Pulse width counter
      131     83      Sync bits counter
      132     84      Bit phase flag
      133     85      Last sine wave value
      134     86      Used in SET,RESET,POINT
      135     87      Single character keyboard
                      buffer
      136:137 88:89   Current cursor address
      138:139 8A:8B   16 bit zero ($0000)
      140     8C      Sound frequency
      141     8D      Sound timer
      142     8E
      143     8F      Cursor blink rate counter
                         =32
      144:145 90:91   Count of leader bytes
                         =$0080
      146     92      Minimum cycle width of
                      1200Hz   =$12
      147     93      Minimum pulse width at
                      1200Hz   =$0A
      148     94      Maximum pulse width at
                      1200Hz   =$12
      149:150 95:96   Cassette motor delay
      151:152 97:98   Keyboard de-bounce delay
                      value  =$054E
      153     99      Line printer comma field
                      width  =$10
      154     9A      Line printer last comma
                      field  =$74
      155     9B      Line printer width
                       =$84
      156     9C      Line printer head position
      157:158 9D:9E   EXEC vector
      159:160 9F:A0   CHRGET input routine:
                        INC $A7
      161:162 A1:A2     BNE $A5
      163:164 A3:A4     INC $A6
      165-167 A5-A7     LDA xxxx
      168-170 A8-AA     JMP $BB26
      169-174 AB-AE   Used by RND function
      175     AF      Program tracer
                      0 - off
                      other - on
      176:177 B0:B1   Pointer to USR vector base
      178     B2      Foreground colour
      179     B3      Background colour
      180     B4      Active colour (COLOR code)
      181     B5      Active colour (byte code)
      182     B6      Current PMODE
      183:184 B7:B8   End of graphic memory
      185     B9      Number of bytes in graphic
                      row
      186:187 BA:BB   Start of graphic memory
      188     BC      Page number of graphic mem
      189:190 BD:BE   Current hi-res X position
      191:192 BF:C0   Current hi-res Y position
      193     C1      COLOR set in use
      194     C2      Plot flag (0=reset, <>0
                      set)
      195:196 C3:C4   Current X pixel number
      197:198 C5:C6   Current Y pixel number
      199:200 C7:C8   Current X cursor co-ord
      201:202 C9:CA   Current Y cursor co-ord
      203:204 CB:CC   CIRCLE X co-ord
      205:206 CD:CE   CIRCLE Y co-ord
      207:208 CF:D0   RENUM increment value
      208     D0      CIRCLE radius
      209:210 D1:D2   RENUM start line number
      211:212 D3:D4   CLOADM offset number
      213:214 D5:D6   RENUM new line number
      215     D7      Editor line length

      222     DE      PLAY octave
      223     DF      PLAY high volume
      224     E0      PLAY low volume
      225     E1      PLAY note value
      226     E2      PLAY tempo
      227:228 E3      PLAY duration note
      229     E4      PLAY dotted note flag
      230:231 E5:E6   Not used
      232     E7      Current Angle in DRAW
      233     E8      Current scale in DRAW
      234-255 E9-FF   Not used but see below
                      for possible DOS usage:
      ALL DDOS systems...

      234     EA      Disk command byte
      235     EB      Drive unit number
      236     EC      Track number
      237     ED      Sector number
      238:239 EE:EF   Address of disk buffer area
      240     F0      Disk status byte
      241     F1      Current file control block
                         number
      242     F2      Number of bytes in disk
                      buffer area / no of tracks
                      for DSKINIT
      243     F3      Number of bytes to transfer
                      to/from buffer / side 
                      formatting with DSKINIT
      244     F4      Record length flag:
                          00=don't care
                          FF=do care
                      or No. of sides for DSKINIT
                          00 = 1 side, 40 Track
                          01 = 2 side, 40 Track
                          FE = 2 side, 80 Track
                          FF = 1 side, 80 Track
      245     F5      Read/write flag
                          00=read
                          01=write
                          FF=verify
      246     F6      IRQ time out flag
                          00=check for time out
                          non zero=don't check
      247     F7      *DOSPLUS 4 stream value
                        0=stream numbers=drive
                           numbers (def.)
                        1-127=last file mode
                        128-255=stream mode
      247-255 F7-FF   Not used