/  216
 
VIC20PrgRefGuide.txt--------------------------Version 1.1, 15 March 1999Here you have the complete VIC 20 Programmer's Reference Guide. I wanted tohave this book as an etext, but couldn't find more than a few sections onthe Internet. That is why I typed it in myself. I have (of course) used thesections that already were available, but I proofread them and changed thelayout to match the rest of the book. The 6502 instruction set descriptionwas taken from the C64PrgRefGuide etext, because it with only a fewmodifications were identical with the one in this book.Sections not typed by me:- Working With Graphics p.82-94 (unknown)- Sound and Music p.95-106 (unknown)- 6502 instructions p.140-167 (from C64PrgRefGuide.txt, Ville Muikkula,vmuikku@yrttis.ratol.fi or vmuikku@raahenet.ratol.fi)- Memory map p.170-181 (Sam Laur, slaur@utu.fi, posted to comp.sys.cbm,2. March 1994)- 6522 Versatile Interface Adapter p.218-226 (unknown)Centered and right-justified text assumes a line-width of 75. Some lines arelonger than that because I wanted to keep the lines the same as theoriginal book (not true everywhere). I have not bothered to make the pagesthe same length.Some special signs and comments:~ means new page{sign} are placed where a non-ASCII sign should be present^ are placed where an up-arrow should be present<- are placed where a left-arrow should be present{key} are placed where a picture of that special key should be present{sym} are placed where a VIC graphics character should be present{picture missing} are placed where there should be a pictureThis text is hand-typed, so there are probably some errors in it. If youfind some, please report them to me so I can correct them. That includeserrors in the original book.You should read this text using a non-proportional font.Asbjorn Djupdaldjupdal@stud.ntnu.no----------------------------------------------------------------------------~VIC= 20 +------------------------------------------------An all-purpose reference /guide for first-time / PROGRAMMER'Scomputerists as well / REFERENCEas experienced / GUIDEprogrammers! /--------------------+{picture missing}C= commodoreCOMPUTER VM110
 
~~TABLE OF CONTENTSINTRODUCING THE PROGRAMMER'S REFERENCEGUIDE.....................................................................vVIC 20 APPLICATIONS GUIDE...............................................vii1 BASIC PROGRAMMING REFERENCE GUIDE......................................1o VIC BASIC: The Language of the VIC...................................3o Commands.............................................................5o Statements..........................................................14o I/O Statements......................................................35o BASIC Functions.....................................................40o Numbers and Variables...............................................54o Operators...........................................................62o Logical Operators...................................................682 PROGRAMMING TIPS..................................................... 71o Editing Programs....................................................73o Using the GET Statement.............................................77o How to Crunch BASIC Programs........................................79o Working With Graphics...............................................82Character Memory................................................82Programmable Characters.........................................82High Resolution Graphics........................................88Multi-Color Mode Graphics.......................................92Superexpander Cartridge.........................................94o Sound and Music.....................................................953 MACHINE LANGUAGE PROGRAMMING GUIDE...................................107o System Overview....................................................109o Introduction to Machine Language...................................123o Writing Your First Program.........................................132iii~o Special Tips for Beginners.........................................168o Memory Maps........................................................170o Useful Memory Locations............................................178o The KERNAL.........................................................182o KERNAL Power Up Activities.........................................211o VIC Chips..........................................................2126560 (Video Interface Chip)....................................2126522 (Versatile Interface Adapter).............................2184 INPUT/OUTPUT GUIDE...................................................227o User Port..........................................................229o The Serial Bus.....................................................234o Using the VIC Graphic Printer......................................236o VIC Expansion Port.................................................241o Game Controllers...................................................246Joysticks......................................................246Paddles........................................................248Light Pen......................................................250o RS-232 Interface Description.......................................251APPENDICES..............................................................261
 
A. Abbreviations for BASIC Keywords..................................263B. Screen & Border Color Combinations................................265C. Table of Musical Notes............................................266D. Screen Display Codes..............................................267E. Screen Memory Maps................................................270F. ASCII and CHR$ Codes..............................................272G. Deriving Mathematical Functions...................................275H. Error Messages....................................................276I. Converting Programs to VIC 20 BASIC...............................278J. Pinouts for Input/Output Devices..................................280K. VIC Peripherals & Accessories.....................................284INDEX...................................................................285SCHEMATIC...............................................................291iv~------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------INTRODUCING...THE PROGRAMMER'SREFERENCE GUIDE!The Friendly Computer deserves a Friendly Reference Book.That's why we wrote the VIC 20 PROGRAMMERS REFER-ENCE GUIDE...a book that gives you more information aboutyour VIC 20 Personal Computer than any other source. This guidewas compiled from the experience of Commodore's internationalProgramming staffs in more than half a dozen countries, and isdesigned to be used by first-time computerists as well asexperienced programmers.To cover the areas VIC 20 programmers are most interested in,we divided the book into four sections: BASIC Programming,Machine Language Programming, Input/Output Interfacing andProgramming Graphics & Sound.Here are just a few of the ways the VIC 20 Programmer'sReference Guide helps meet your programming needs:--Our complete "dictionary" includes not only BASIC com-mands but also sample programs to show you how they work.--Need an introduction to Machine Level Programming? Ourlaymen's overview gets you started.--The exclusive KERNAL helps assure the programs you writetoday won't be outdated tomorrow.--The VIC's Interface section lets you expand your computer...from RS232 for telecommunications to joysticks, game paddlesand lightpens.--You'll have fun learning about the VIC's graphic, sound andmusic capabilities...including the unique "multicolor" mode.--You'll discover POKE's you never knew about, and probablyPEEK into some memory locations you never knew existed.v~There are lots of fascinating hours ahead of you. Let theProgrammer's Reference Guide be your companion as you

Share & Embed

More from this user

Add a Comment

Characters: ...

ALibraryleft a comment

Love Your little colleciton of VIC-documents. I am actually making use of this one... trying to learn to program hi-resolution graphics on the Vic-20.

jm000left a comment

Thanks!