the C64 coming back in different forms. For example The C64 Reloaded,
theC64 Mini and the Ultimate 64 or maybe you own just just the
Commodore 64 or C128 with a 1541Ultimate 2 or just want to code C64
programs for additional emulators. You have come to the right place. I
have also decided to expand things a bit further in 2018, just for fun and hopefully it should be even more interesting.
main purpose for this web site is to produce legal future reference for
those of you who would like to be involved with the assembly
of the C64. There have been many books that details about subroutines,
mathematics, etc. However I won't go through all of those as that would
just take ages, and I don't have the time for that!. After all
this tutorial is supposed to be fun, not boring.
web site differs through various assembly
techniques, commands, etc. by reading through this documentation, you
soon end up creating cool, exciting and possibly crazy programs in no
Later on in this documentation, you will learn how to create your own
that involve moving sprites, animating background objects, playing SID
music, adding scores, etc. Hopefully you should be able to make your
first ever demo, intro or have a go at making a C64 game in no time.
The assembler I will be using for each example will be ACME / C64STUDIO
BACK TO TOP
What is an Assembler?
is an application, or tool that allows you to program a computer by
calling out several commands. We are programmed to do things by
instructions/programming from our brains. You could always say that our
own lives are controlled by a program through our brain. Computer
programs work a similar kind of way, but are given different
instructions by a programmer (yourself) to do amazing things.
Assemblers are completely different compared to BASIC programs. The
listings are completely LDA, STA and all that jazz. For example. In
BASIC we could command a computer to type in commands such as print the
message "I WOULD LIKE A PINT OF CARLING AND A PACKET OF CRISPS
PLEASE!". That can simply be performed by using the command:
10 PRINT "I WOULD LIKE A PINT OF LAGER"
20 PRINT "AND A PACKET OF CRISPS PLEASE!"
In ACME/C64Studio cross assembly, the instructions are completely different, and a whole lot faster.
!TEXT "I WOULD LIKE A PINT OF LAGER "
!TEXT "AND A PACKET OF CRISPS PLEASE "
What type of
Assemblers are there?
may differ, as different commands are used, but they all do build up
routines when assembled to your Commodore 64 or emulator. You write a program
listing in an assembler, and then you
to assemble it before you create a runnable file and test your file.
The most common native C64 assembler which was used was Omicron's Turbo
Assembler. You can find this assembler quite easily on the Internet
from the Turbo Assembler
home page. However, the most practical way to code and debug your own
program would be to use a cross-assembler and WinVice. This is due to
the additional features, and user friendly options they take.
BACK TO TOP
Assemblers for the Commodore 64
BACK TO TOPWhat is a
Assembler by Dave Weaver (A little bit like BASIC, except that you can
assemble your own programs as well, also has its own M/C monitor) (PUBLIC DOMAIN)
Suck Monitor by Polonus/Science 541 (M/C Montor based assembler) (PUBLIC DOMAIN, can be used with Turbo Assembler))
Replay MK 6 Cartridge by Datel Electronics (M/C Monitor) (COMMERCIAL)
- Retro Replay by Cyberpunx (Built in Turbo Assembler + M/C Monitor) (PUBLIC DOMAIN!?!?!?)
Assembler by Masters Design Group (Assembler) (PUBLIC DOMAIN?!?!)
V3.0 by Zeldin/Cascade (An advanced assembler with a user-friendly
interface) (PUBLIC DOMAIN)
Assembler by Omicron (Assembler) (PUBLIC DOMAIN)
Monitor by Raistlin/Excess (Oldie, and like 6510+) (COMMERCIAL ?!?!?!)
(M/C Monitor) (UNKNOWN)
(Assembler and M/C monitor by JC/Xakk) (PUBLIC DOMAIN)
- Zeus Assembler (Assembler + M/C Monitor) (COMMERCIAL)
- Assembler 64 by CBM (COMMERCIAL)
A cross assembler is a PC version of a normal 6502
assembler. It is a small executable compiler / application program, which will
assemble and compile text files (which use the assembly instruction
code) into a chosen assembled program. Basically a cross assembler can
convert all text assembly commands to a 6502 program for any machine
that supports this level of programming. Unlike normal Commodore 64
assemblers, a cross assembler has better limitations than a normal
Commodore 64 assembler, like Turbo Assembler. Cross assemblers can also
import source binary files, i.e. additional C64 graphics, music, data,
etc. Usually by using a command like .INCBIN
or .BINARY or !BIN. You can
also link more than one source file to your assembled production. Every
cross assembler normally comes with its own documentation on line. As
mentioned before the all new ASSEMBLE IT is going to be using
ACME/C64STUDIO for its tutorials.
assemblers/compilers for the PC to the Commodore 64 (Links to original sources)
BACK TO TOP
- KickAssembler by Soci/Singular
- ACME by Smorbord Software
by Georg Rottensteiner (A full design+development suite, with ACME
assembler related instructions, but slightly different commands).
Features char editor, sprite editor, screen editor, graphics editor and
dir master, plus much more
- X-SLANG (completely
different to assemblers, but does accept
- CCC65 Assembler
- CBMPRG Studio by Arthur Jordison (A full design+development suite with built in assembler / BASIC tokenizer)
recommended PC-cross platform software to use for developing all kinds
This part gives you
recommended cross platform software for use on your PC for developing
all kinds of things, from graphics to music, and also for linking and
BACK TO TOP
- CharPad V2.0 -
Charset and game
background building software by Subchrist Software
- Cuneiform - Charset
editor by Scrapdog
- SpritePad V2.0 -
Sprite Editor by Subchrist Software
- 7Up Editor - Sprite
Editor by Mirage
- Converts graphics from PC to
Commodore 64 by The Gang
- CONGO - Converts graphics
from PC to
Commodore 64 by ????
- Timanthes -
Bitmap Graphics (Painting
Program) by Focus
- 0xPaint - Bitmap Graphics
program) by Fairlight
- Project One -
Bitmap Graphics by Resource
- Goat Tracker V2.7 - C64
music composing utility on your PC by Lasse
- CheeseCutter V2.8 - C64 music composing utility on your PC by Abadon/Fairlight
- MG Tracker - Matt Gray C64 music composing utility on your PC by Samar Productions
- CBMCombine - Linking utility
by Albert Pasi Ojala, updated by iAN CooG/Hokuto Force
- PuCrunch -
High speed cruncher. Fast
decrunching by Albert Pasi Ojala
- Exomizer V2.09 -
Cruncher, but has
more capable abilities compared to PuCrunch by Magnus Lind
- ALZ64 -
Cruncher, compresses better
than Exomizer but extra programming knowledge is required. Very slow
decompression and messy as well. By Kabuto
- D64 Editor -
Transfer your .prg file
into a .D64 by Almighty64
- DIR Master - Similar to C64 editor (by Style)
be outside windows to use this program for converting .D64/.PRG files
to your commodore 64 disk drive. (XE1541 required). By Joe Forster/STA
(Very old software - Not supported by modern PCs or Windows 7+
C64 Studio and Setting Things Up
Studio is probably the most common C64 IDE with built in toolkit, which
is used today. I have chosen this particular assembler for the ASSEMBLE
IT tutorials, due to the amount of ease it has on creating and
developing software. It sort of uses the ACME cross assembler module
(Which I originally used to create Woolly Jumper and Sheepoid DX).
There may be some differences with some of the pseudo code, but it is
pretty much straightforward if you are used to ACME :)
Studio also has a few additional editors, which you can use to create
and develop your own sprites and graphics. Although I tend prefer to
use Charpad for designing background graphics, logos, etc. As it eases
designing graphics slightly.
You can grab the editor from THE C64 STUDIO page.
set up C64Studio, you'll want to choose a version of VICE which you
find to be much useful. I find X64SC from WinVice V2.4 to be very
handy. I own a C64C and would like to use that version of VICE for
testing for raster dots. On an older C64 these tend to no be noticed,
but on newer C64 hardware like the Commodore 64C back in the late
1980's it was different.
How is C64Studio set up to call VICE?
Select from the drop down menu:
- SETUP WIZARD
- then select the path where X64SC.EXE is placed
assembling, simply click on the BUILD icon or press F5 to build your
program. Should there be any errors in the code, the compiler results
will show the errors and which lines these errors are located at.
is a trick known to reducing file sizes by packing/crunching files.
After assembling your own programs you can choose whether or not you
would like to pack/crunch your own productions. If you want to
pack/crunch, the old slow C64 way, using one or two of a variety of
packers/crunchers, etc. You can do exactly that. However, an
alternative choice would be to use EXOMIZER.
IMPLEMENTING EXOMIZER INTO YOUR OWN SOURCE:
of all, if you don't want to crunch your program with a standard C64
cruncher. You can easily enough use Exomizer. A fast-compression PC
based tool with a variety of functions. You can disable or program your
very own depack effects, to suit your needs. Although - playing with
depack effects are least important, but may look cool or weird :)
First of all you will need to GET Exomizer from the EXOMIZER HOME PAGE
say you were to write your own program in C64Studio and you wanted to
compress your own program. You can call EXOMIZER to your source code to
compress your assembled program. To implement EXOMIZER compression into
your own programs:
- In the project explorer tab, select the source file to be assembled
- RIGHT CLICK on the source file and select PROPERTIES
- Click on the tab BUILD EVENTS
- Ensure build event is set up as POST BUILD
- Enter the correct path and command to where Exomizer is located ... for example
C:\Exomizer\Win32\Exomizer.exe sfx $(JUMP_ADDRESS) SOURCE.PRG -o SOURCE.PRG
then click on CLOSE.
Say for example:
write a game called SpaceBlaster, the source code file is
SpaceBlaster.asm and you use $4000 as the start address of your program
(*=$4000). You can call Exomizer in post build to do exactly this
C:\Exomizer\Win32\Exomizer.exe sfx $4000 SpaceBlaster.GRAB -o SpaceBlaster.prg
Basically That's it for this chapter :)
BACK TO TOP