Commodore VIC-20 Programmer's Reference Manual page 144

Hide thumbs Also See for VIC-20:
Table of Contents

Advertisement

will give examples in the format that VICMon uses from now on.
Nearly all assembler formats are the same, therefore the machine
language examples shown will almost certainly be compatible with
any assembler other than the one incorporated in VICMon.
Hexadecimal Notation
This is a notation which most machine language programmers
refer to when referring to a number or address in a machine
language program,
Some assemblers let you refer to addresses and numbers in
decimal (base 10), binary (base 2), or even octal (base 8) as well as
hexadecimal (or just "hex" as most people say). These assemblers
do the conversions for you.
Hexadecimal will probably seem a little hard to grasp at first, but
like most things it doesn't take long (with practice) to master it.
By looking at decimal (base 10) numbers, you will see that each
digit in that number ranges between zero and a number equal to the
base less one, i.e., > 9. THIS IS TRUE OF ALL NUMBER BASES.
Binary {base 2} numbers have digits ranging from zero to one
(which is one less than the base). Similarly hexadecimal numbers
should have digits ranging from zero to fifteen, but we do not have
any single digit figures for the numbers ten to fifteen, so the first six
letters of the alphabet are used instead:
DECIMAL
HEXADECIMAL
0
1
2
3
4
5
6
7
B
-
9
10
11
12
-
13
14
15
16
etc.
0
1
2
3
4
5
6
-
7
e
9
A
B
C
D
£
F
10
BINARY
00000000
000O0001
00000010
00000011
00000100
00000101
00000110
OO000111
00001000
00001001
00001010
00001011
000O1100
00001101
000O1110
00001111
00010000
If that's confusing, let's try to look at it another way:
128

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents