[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]

The Commodore 64 will prompt you with:

   .A 1400 A9 01      LDA #$01
   .A 1402
   .A 1402 STA $0400
(The STA instruction stores the contents of the accumulator in a specified memory location.)
The Commodore 64 will prompt you with:
   .A 1405
Now type in:
   .A 1405 LDA #$0E
   .A 1407 STA $D800
   .A 140A BRK
Clear the screen, and type:
   G 1400

The G should turn into an "A" if you've done everything correctly. You have now written your first machine language program. Its purpose is to store one character ("A") at the first location in the screen memory. Having achieved this, we must now explore some of the other instructions, and principles.



As shown earlier, absolute addresses are expressed in terms of a high and a low order byte. The high order byte is often referred to as the page of memory. For example, the address $1637 is in page $16 (22), and $0277 is in page $02 (2). There is, however, a special mode of addressing known as zero page addressing and is, as the name implies, associated

[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]
This page has been created by Sami Rautiainen.
Read the small print. Last updated July 10, 2002.