Image Map Image Map
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Using Labels in CBM's C64 ML Monitor$C000 ?

  1. #1

    Default Using Labels in CBM's C64 ML Monitor$C000 ?

    I am writing a number of simple examples in Assembly Language for the C64 using CBM's ML Monitor$C000. However, the Monitor does not appear to accept Labels (e.g."Loop")? Is this true, or am I missing something?

    ML Monitor$C000
    ------
    .A 033C LDX #$04
    .A 033E DEX
    .A 033F BNE $033E
    --------

    CBM C64 Macro Assembler
    ------
    1010 LDX #$04
    1020 LOOP DEX
    1030 BNE LOOP
    -------

    Thanks for any thoughts..!..I am spending too much time calculating the branches!
    AAGDOS

  2. #2

    Default

    Quote Originally Posted by AAGDOS View Post
    I am writing a number of simple examples in Assembly Language for the C64 using CBM's ML Monitor$C000. However, the Monitor does not appear to accept Labels (e.g."Loop")? Is this true, or am I missing something?

    ML Monitor$C000
    ------
    .A 033C LDX #$04
    .A 033E DEX
    .A 033F BNE $033E
    --------

    CBM C64 Macro Assembler
    ------
    1010 LDX #$04
    1020 LOOP DEX
    1030 BNE LOOP
    -------

    Thanks for any thoughts..!..I am spending too much time calculating the branches!
    AAGDOS
    If that's the ML monitor that was commonly used in the 1980's then I am almost sure it never supported labels, it's a direct assembler only. Back in the old days (and I do the same still nowadays when I need to write a small program) there were handy tables that gave the correct branch offset if you counted the skipped bytes (counting from the first byte AFTER the branch instruction) backward or forward. For example I counted 5 bytes less from the next instruction so I looked up the -5 in the table and that gave me the correct hex value to add after the branch instruction.
    I copied my branch calculator sheet from the "6502 programming" book.

    HTH
    Frank IZ8DWF

  3. #3

    Default

    Labels are very difficult (but not impossible) to implement in such a direct assembler.

  4. #4

    Default

    Using no labels and other fancy stuff means you only need a little bit of memory and that will be a fixed amount IMHO. That's why most monitors fit nicely in the $Cxxxx block. Some even tell you what amount of memory the monitor needs and that you can safely use the rest for your own purposes.
    Using labels means you need memory to store the names plus calculated addresses and memory for the routines that have to calculate these address and the offset for the branches. This amount will vary with the amount of used labels. So ask yourself the question: what memory can you use safely w/o corrupting memory used by other programs?
    With kind regards / met vriendelijke groet, Ruud Baltissen

    www.baltissen.org

  5. #5

    Default

    The REU, of course.

  6. #6

    Default

    Quote Originally Posted by KC9UDX View Post
    The REU, of course.
    What is "REU"??

    Thanks, AAGDOS

  7. #7

    Default Labels in C64 Assembly - Thanks for the Info !

    Yes, I was using the ML Monitor$C000 which is in the C64 Macro Assembler Development System (1980s!). I was writing a few simple examples using the ML Monitor directly, as this saves a lot of time in "disk shuffling" in and out of the 1541 drive.

    It does now appear from everything said above that the ML Monitor does not support "labels", much to my dismay. However, for simple codes it is not too big a deal to code directly to the address of the instruction. When branching backwards, the address is already showing in the Monitor after the ".A" for the next line of code. When branching forwards, it is simple enough to "guess" about what the address will be, and then when the correct address shows up (following the ".A") to edit it directly into memory with the ".M" command, and then save the file.

    I do wish the ML Monitor would do labels, but this "work around" is sufficient for now...I am converting many codes from another Assembler into "CBM Standard" symbols and syntax.

    Thanks to all....

    AAGDOS

  8. #8

    Default

    Quote Originally Posted by AAGDOS View Post
    What is "REU"??

    Thanks, AAGDOS
    RAM Expansion Unit. Very amazing piece of hardware that unfortunately isn't very common.

  9. #9

    Default

    And that you can't run code directly out of anyway.

    I think the 1750 clones are rarer than the actual 1750.
    I use my C128 because I am an ornery, stubborn, retro grouch. -- Bob Masse
    Machine room updated for 2019!: http://www.floodgap.com/etc/machines.html

  10. #10

    Default

    Quote Originally Posted by ClassicHasClass View Post
    And that you can't run code directly out of anyway.
    No but you can swap memory in and out of it ridiculously quickly with an ISR, so the difference is moot. That's the beauty of it. The only real restriction is that you still can't store data and code in the same place.

    I wish I had time to design a modern replacement. Every C64 should have one.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •