[Coco] Linville's ramblings on assembly vs machine code

Melanie and John Mark Mobley johnmarkmelanie at gmail.com
Mon Jul 10 22:29:24 EDT 2017


From: John Mark Mobley
Sent: Saturday, July 01, 2017 11:09 PM
To: Steve Strowbridge
Subject: CoCo Crew Tech Segment
-------
Steve Strowbride,

The CoCo Crew Tech Segment was on Assembly Language vs. Machine Code.

I just want you to know that I was not suggesting that people need to learn
machine code inside and out, by memorizing every single instruction.  I just
wanted to encourage people to dabble with it enough (say 2-3 days) so that
they can understand how much nicer it is to use an assembler.  And
understand what the assembler does and perhaps somewhat how it does it.  I
think it will give the determination you will need to sick with assembly
until you get how it works.   For you to make it with assembly, you will
need to devote a lot of time to it.

I have never memorized all the 6809 assembly instructions.  I have to use
lookup tables to see what condition code are effected and what addressing
modes are possible.  In some cases you may want to use a debugger in order
to see what is going on.

I got a surprise with I found that the following two instruction did not
work the same:
        CLRA     ; Clear A and the Carry Flag
        LDA #$00 ; Clear A

If you follow the book "TRS-80 Color Computer Assembly Language Programming"
by: William Barden, Jr. then the machine code is to the left of the
assembly.  Like on page 50 the LDA #$55 is encoded in Hex as 86, 55.  This
may be all the machine code you will ever need.

I think that it is important to note that the computer, for the most part,
cannot distinguish between code and data.  Therefore you must jump in a
valid address where the code is that you want to run.

-John Mark Mobley




More information about the Coco mailing list