Hello, Guest the thread was called509 times and contains 5 replays

last post from KSimcomal at the

Learning Assembly

  • Hi there, I am using the book "Commodore 64 Assembly Language Programming" by Derek Bush and Holmes. In the beginning of the book, the authors are using the Cassette buffer (*=828). I was wondering if using the C-128 and the Mega65, what would be the best way to write the example programs:


    LDA #0

    STA 1024

    STA 55296







    LDA #1

    STA 1024

    STA 55296

    LDA #2

    ADC 1024

    STA 1026

    STA 55298



    I know the start address would be different for the C-128 and Mega65 and the screen and color addresses. Would like to use this book with either the C64C / U64, C-128 or the Mega65. Really like "Mega Assembler". Take care.

  • You should very likely stick to the book's intended target machine.

    Porting the naturally very low-level example programs sounds like a lot more trouble than it's worth.

    Dedicated books for assembly beginners targeting the C-128 exist (e.g., https://commodore.bombjack.org…re/books-commodore128.htm), but there are probably not (yet) any for Mega65.

  • KSimcomal

    When you‘re in BASIC mode you can use the area $1600-17FF without thinking to much about memory banks or the complete memory mapping.

    The C65 uses very special technics to handle memory.

    See BASIC command SYS and BANK, etc.

    Screen memory starts at $0800 (2048).

    Maybe many C64 routines work, if you adapt them to this new Mega65 areas.

    C64 cassette buffer -> $16000
    C64 screen -> $0800

    So if you assemble your program to start adress $1600 you can start the programs with BASIC command SYS $1600.

    As far as I know there is no official documentation for the first 8k of RAM for the actual Mega65 ROM.

    Here you‘ll find the first 8k documentet for the old C65 (ROM 911001).

    Wide areas should match the actual Mega65 ROM.

    Except $1800-1FFFF. This area is used by BASIC65 for graphic routines.


    (Click on ‚152 „C65 MEMORY MAP“ PDF‘)

    Have a look here in chapter 1.5

    After reading you may have an idea about how memory is handeld in Mega65 (C65).

    Handling memory is to 90% the same than in the C65.


  • With the C-128, all i had to do was replace *=$828 (C64) with *=$0b00. On the C-128, I am using Buddy 128 and use Buddy 64 for the C64C or U64. Now I try the problems using Mega Assembler on the Mega65 (Xemu). Thanks igel65 for the info., it would taken me awhile to find this info. Really new as far as the Mega65 is concern. I just recently got the C-128 from a friend, so this is also a learning experience. Can't wait for the real Mega65. Take care.

  • So far I have used *=$1800 for the start address, and haven't had any errors in Pass 1 or Pass 2. Just need to figure out why, when the program is run, it isn't show up on the screen. Withy Buddy 64/128, after you assemble (type "AS"), clear the screen, then sys (address), the characters show up on the screen. This is using Xemu / Mega Assembler v1.1.