C64_Programmer's_Reference_Guide.pdf

(13851 KB) Pobierz
673568152 UNPDF
673568152.004.png
COMMODORE 64[
PROGRAMMER1S
REFERENCE GUIDE
Published by
Commodore Business Machines, Inc.
673568152.005.png 673568152.006.png
First Edition
Eleventh Printing - 1984
Copyright © 1982 by Commodore Business Machines, Inc.
All rights reserved.
This manual is copyrighted and contains proprietary information. No part of this publica­
tion may be reproduced, stored in a retrieval system, or transmitted in any form or by any
means, electronic, mechanical, photocopying, recording, or otherwise, without the prior
written permission of COMMODORE BUSINESS MACHINES, Inc.
ii
673568152.007.png
TABLE OF CONTENTS
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. ix
What ' s Included? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
x
How to Use This Reference Guide . . . . . . . . . . . . . . . . . . . . .. xi
Commodore 64 Applications Guide . . . . . . . . . . . . . . . . . . . .. XII
Commodore Information Network ....................... xvii
1. BASIC PROGRAMMING RULES
1
2
2
2
4
4
7
8
9
10
10
12
J3
15
16
17
18
18
18
22
24
Introduction ....................................... .
Screen Display Codes (BASIC Character Set) ............ .
The Operating System (OS) ........................ .
Programming Numbers and Variables ................. .
Integer, Floating-Point and String Constants .......... .
Integer, Floating-Point and String Variables .......... .
Integer, Floating-Point and String Arrays ............ .
Expressions and Operators ........................... .
Arithmetic Expressions ............................. .
Arithmetic Operations ............................. .
Relational Operators ............................. .
Logical Operators ................................ .
Hierarchy of Operations ........................... .
String Operations ................................ .
String Expressions ................................ .
Programming Techniques ............................ .
Data Conversions ................................. .
Using the INPUT Statement ........................ .
Using the GET Statement ...........................
How to Crunch BASIC Programs .................... .
2. BASIC LANGUAGE VOCABULARY ................. .
Introduction ....................................... .
29
30
31
35
93
94
BASIC Keywords, Abbreviations, and Function Types
Description of BASIC Keywords (Alphabetical) .......... .
The Commodore 64 Keyboard and Features ............ .
Screen Editor ...................................... .
iii
673568152.001.png
3. PROGRAMING GRAPHICS ON THE
COMODORE 64 .................................. 99
Graphics Overview ........ . ......................... 100
Character Display Modes ..................... . ..... 100
Bit Map Modes ................................... 100
Sprites .......................................... 100
Graphics locations .................................. 101
Video Bank Selection ................... . .......... 101
Screen Memory ............................. . ..... 102
Color Memory .................................... 103
Character Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 103
Standard Character Mode ............................ 107
Character Definitions .............................. 107
Programmable Characters ............................ 108
Multi-Color Mode Graphics ........................ .. 115
Multi-Color Mode Bit .............................. 115
Extended Background Color Mode ..................... 120
Bit Mapped Graphics ................................ 121
Standard High-Resolution Bit Map Mode .............. 122
How It Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 122
Multi-Color Bit Map Mode ............... .. ........... 127
Smooth Scrolling .................................. . . 128
Sprites ............................................ 131
Deining a Sprite ................................. 131
Sprite Pointers .......... . ......................... 133
Turning Sprites On ................................ 134
Turning Sprites Off ............... . ..... . .......... 135
Colors .................................... . ...... 135
Multi-Color Mode ................................. 135
Setting a Sprite to Multi-Color Mode ................. 136
Expanded Sprites 136
Sprite Positioning ................................. 137
Sprite Positioning Summary ......................... 143
Sprite Display Priorities ............................ 144
Collision Detects .................................. 144
Other Graphics Features ............................. 150
Screen Blanking .................................. 150
Raster Register .................................... 150
Interrupt Status Register ............................ 151
Suggested Screen and Character Color Combinations ... 152
iv
673568152.002.png 673568152.003.png
Zgłoś jeśli naruszono regulamin