getting started with machine code monitor

General problems and how-to's of running/using the CCS64 emulator.

Moderator: Håkan Sundell

Post Reply
qwanta
Posts: 3
Joined: Fri Jun 16, 2006 7:59 pm

getting started with machine code monitor

Post by qwanta »

Hi,

I owned a C64 back in the day and played a lot of games on it, but never got beyond basic, programming wise... I always wanted to know how demos and games were REALLY written, but never succeeded in finding out (no internet in those days...)
Anyway, I thought I'd have another crack at learning the rudiments of assembly on the C64, and would be very grateful for a little help to get past the 1st hurdle.
Basically, I am trying to enter and run this:

LDA #$07
STA $D021
BRK
to change the screen color to yellow (http://www.c64.ch/programming/move.php)

I think I have figured out how to enter this into CCS64's machine code monitor, by entering this:

A 2000 LDA #$07
STA $D021
BRK

but I cannot find a way to run this. The tutorial says to enter G2000 to "goto" 2000 but ccs64 doesn't seem to have this command. Is there a way to do this from within CCS64's machine code monitor?
-------------------
Alternatively, the tutorial I mentioned is using the Final Cartridge 3's image which allows them to enter "MON" at the C64 'READY' prompt to enter the FC3's machine code monitor. However, when I attach TFC3 to CCS64 I get TFC3's screen and am unable to figure out how to get back to the C64 READY prompt.
How do I exit the TFC3 screen whilst keeping the TFC3 image 'plugged-in'?

Many thanks.
qwanta
Posts: 3
Joined: Fri Jun 16, 2006 7:59 pm

Post by qwanta »

OK, nevermind... I figured out how to navigate the Final Cartridge 3 desktop
(F2,F3,F6,F7,left-ctrl) left-ctrl is 'commodore' key.
K.C.
Posts: 115
Joined: Fri Nov 12, 2004 12:12 pm
Location: The Netherlands

Post by K.C. »

Don't use BRK, but RTS at the last line. So you enter in the CCS monitor:

Code: Select all

A 2000 LDA #$07
STA $D021
RTS
Since the hexadecimal address $2000 is 8192 in decimal (2*16*16*16=8192), you can start it by entering

Code: Select all

SYS 8192
The background color will change.
qwanta
Posts: 3
Joined: Fri Jun 16, 2006 7:59 pm

Post by qwanta »

thanks for the tip K.C.
Post Reply