Commodore Basic Differences

From: William Levak (wlevak_at_cyberspace.org)
Date: 2000-06-16 06:42:13

The descriptions of the differences between various versions of Commodore
Basic that I have seen have not been very complete.  I therefore decided
to make my own list of differences (see below).

This is a list of Basic differences, not hardware or memory differences.
I am missing some information on the CBM-II(B series).  The missing
information is indicated by question marks.  I am also missing the
intensity information on the C128 80 column mode.

If anyone has this information or any other, please add it to the list.

-------------------------------------------------------------------------

                         Commodore Basic Differences

Original PET
  Arrays are limited to 256 elements. 
  GOTO cannot have a space. 
  RND(0) repeats the same number, use RND(TI). 
  Text mode upper and lower case letters are exchanged. 
  The zero at 1024 is saved as part of the program.  Other versions cannot
    relocate these programs, they must be loaded at 1024.  If that is not
    possible, replace the "00 04 00" at the beginning of the program file
    with "01 04". 

PET/CBM
  CHR$(14) and CHR$(142) are only supported in Basic 4.0. 
    To change the character set, POKE 59468,14 for text mode,
                                 POKE 59468,12 for graphic mode. 
  PET's with a CRTC usually have extra space between lines in text mode. 
    To remove the extra space: PRINT CHR$(142);:POKE 59468,14. 
  Character 92 is a backslash. 
  Characters 96-127 are the same as 32-63. 
  Programs are loaded only at their saved address, but Basic only runs
    programs loaded at 1025. 

CBM-II
  BANK can be done as POKE 599,bank. 
  TI is not the jiffy clock, use VAL(TI$). 
  Load address???  Relocate while loading??? 
  Characters 96-127 are the same as ???? 

4064
  Sprites are disabled. 
    To enable, OR location 646 (current character color) with 128. 

C128
  BANK can be done as POKE 981,bank. 
  SYS m,a,x,y,s is only in C128, use SYS m. 

General
  To avoid differences in line wrap and blank line insertion,
    do not print to or past the last column on the screen. 
  Basic 4.0 and above can set a screen window. 
    To cancel, print two consecutive HOME characters. 
  Colors of the same intensity are not distinguishable on a monochrome
    monitor. 

Commands that reference memory locations: 
  PEEK     POKE       SYS       USR      WAIT

Commands not in all versions (do not use as variables): 
  APPEND   CIRCLE     DO        FAST     LOOP     RECORD    SCRATCH   TROFF
  AUTO     COLLECT    DOPEN     FETCH    MONITOR  RENAME    SLEEP     TRON
  BACKUP   COLLISION  DRAW      FILTER   MOVSPR   RENUMBER  SLOW      UNTIL
  BANK     COLOR      DS        GO TO    OFF      RESUME    SOUND     USING
  BEGIN    CONCAT     DS$       GRAPHIC  PAINT    RGR       SPRCOLOR  VOL
  BEND     COPY       DSAVE     GSHAPE   PEN      RLUM      SPRDEF    WHILE
  BLOAD    DCLEAR     DVERIFY   HEADER   PLAY     RREG      SPRITE    WIDTH
  BOOT     DCLOSE     EL        HELP     POINTER  RSPCOLOR  SPRSAV    WINDOW
  BOX      DEC        ELSE      HEX$     POT      RSPPOS    SSHAPE    XOR
  BSAVE    DELETE     ENVELOPE  INSTR    PUDEF    RSPRITE   STASH
  BUMP     DIRECTORY  ER        JOY      QUIT     RWINDOW   SWAP
  CATALOG  DISPOSE    ERR$      KEY      RCLR     SCALE     TEMPO
  CHAR     DLOAD      EXIT      LOCATE   RDOT     SCNCLR    TRAP

Control codes not in all versions: 
   2 underline        129 orange/d purple
   5 white            130 flash/underline off
   7 bell             132 bottom right/flash off
   8 lock             133 F1
   9 tab/unlock       134 F3               149 insert line/brown/d yellow
  14 text             135 bell/F5          150 erase end/l red/yl-grn
  15 top left/flash   136 F7               151 d gray/pink/d cyan
  21 delete line      137 set tab/F2       152 m gray/bl-grn
  22 erase start      138 F4               153 l green/l blue
  24 set tab          139 F6               154 l blue/d blue
  27 escape           140 F8               155 escape/l gray/l green
  28 red              142 graphics         156 purple
  30 green            143 flash off        158 yellow
  31 blue             144 black            159 cyan

Colors arranged by intensity with (default background color): 
  VIC20       C64/C128 40 Column   Plus4/C16
  ---------   ------------------   -----------------------
  black       black(4064)          black
  blue, red   brown, blue(C64)     brown, d blue
              red, d gray(C128)    red, green
  purple      purple, orange       purple, orange, blue
              m gray, l blue
  green       green, l red         yl-grn, bl-grn, l green
  cyan        cyan, l gray         cyan, pink, l blue
  yellow      yellow, l green
  (white)     white(SX64)          yellow, (white) 

Line draw characters to use for uniform line thickness: 
                          PET/CBM-II/VIC20    Plus4/C16/C64/C128
                          ----------------    ------------------
     left vertical bar          165               165 or 180
   center vertical bar          221               221 or 194
    right vertical bar          167               167 or 170
     top horizontal bar         163                  183
  center horizontal bar         192               192 or 195
  bottom horizontal bar         164                  175

Memory available for Basic programs: 
  C16             12287 bytes
  VIC 20     3583-28159 bytes
  PET/CBM    3071-31743 bytes
  C64             38911 bytes
  Plus4           60671 bytes
  C128           122365 bytes
  CBM-II    ?????-????? bytes


-
This message was sent through the cbm-hackers mailing list.
To unsubscribe: echo unsubscribe | mail cbm-hackers-request@dot.tcm.hut.fi.

Archive generated by hypermail 2.1.1.