
C64 BASIC V2
A Detailed Guide from the First Command to Complete Programs on the Commodore 64
On Amazon
The Amazon link for this book is coming soon.
The code
The code will be published here together with the book.
From the READY. prompt to complete programs
C64 BASIC V2 is a detailed, independent guide for readers approaching the Commodore 64 for the first time, and for experienced users who need a dependable reference. Every subject is introduced step by step, with the machine’s actual syntax, output, limits and common error messages explained in clear English.
The book begins with startup, the keyboard and the full-screen editor, then builds a complete working knowledge of variables, expressions, formatted output, input, decisions, loops, subroutines, DATA statements, arrays, strings, mathematical functions and random numbers. It then connects BASIC to the computer itself: screen and colour memory, PETSCII and screen codes, PEEK and POKE, registers, files, disks, cassette storage, error diagnosis, memory use and performance.
Advanced chapters cover text graphics, custom characters, bitmap graphics, sprites, the SID sound chip, keyboard and joystick input, timing, animation, SYS, USR, and controlled interaction with machine-language routines. Hardware-dependent behaviour and PAL/NTSC differences are identified where they affect results.
Five substantial projects bring it all together: an in-memory address book, a text adventure, a SID music sequencer, a sprite-based arcade game, and a 1541 disk catalog and file checker — developed in stages so that you can understand, enter, test, diagnose and extend them.
Inside the book
- BASIC V2 fundamentals, variables, operators, and control flow
- Input, output, strings, arrays, DATA, and file handling
- Screen and color memory, PETSCII, custom characters, and bitmap graphics
- Sprites, SID sound, keyboard, joystick, timing, and animation
- PEEK, POKE, registers, debugging, disk and cassette storage
- Five complete projects, 328 exercises, solutions, glossary, and index
What makes this book different
Starts at READY.
No previous programming experience is required: every concept is explained before it is used, with the machine’s actual syntax, output, limits and error messages.
Genuine machine output
Important examples are backed by documented execution tests and genuine Commodore 64 screen results.
328 exercises
Every chapter has exercises, with answers or acceptance criteria in the appendices.
A complete reference
BASIC V2 statements, functions, operators, error messages and 1541 DOS status codes, plus practical tables for colours, memory, VIC-II, sprites and SID.
Contents
5 parts, 33 chapters
Part I Start, type, and save
- 01Meet the Commodore 64 and BASIC V2
- 02The keyboard and full-screen editor
- 03Your first BASIC programs
- 04Keep your work: tape and disk basics
Part II Learn to program
- 05How a BASIC program is written
- 06Values, variables, and assignment
- 07Expressions and operators
- 08Print clear and well-spaced output
- 09Ask the user for input
- 10Make decisions and branch
- 11Repeat work with loops
- 12Build programs from smaller pieces
- 13Work with DATA and arrays
- 14Work confidently with strings
Part III Connect BASIC to the machine
- 15Mathematics, functions, and randomness
- 16The text screen, color, and character codes
- 17What BASIC keeps in memory
- 18PEEK, POKE, bytes, and registers
- 19Files and logical devices
- 20Disk and cassette in practice
- 21Diagnose and improve a BASIC program
Part IV Use the C64 hardware from BASIC
- 22Text graphics and custom characters
- 23Bitmap graphics
- 24Sprites
- 25Sound and music with the SID
- 26Keyboard, joystick, and interaction
- 27Time, animation, and synchronization
- 28The edge of BASIC: SYS and USR
Part V Five complete programs
- 29An in-memory address book
- 30A text adventure: The Lantern of Greywatch
- 31A SID music sequencer
- 32A sprite arcade game
- 33A 1541 disk catalog and file checker
Appendices
- ABASIC V2 commands and statements
- BFunctions, operators, and system variables
- CBASIC and disk error messages
- DPractical tables
- EExercise solutions
- FGlossary, test baseline, and sources
- GAnalytical index
Errata
Corrections
No errors have been reported for this edition yet.
Found a mistake? Write to [email protected], with the page number and what it should say.