[Coco] Machine Code

James Jones jejones3141 at gmail.com
Wed May 31 22:38:14 EDT 2017


OS-9/6809, if memory serves, didn't do anything special with tab (aka ASCII
0x09, HT (horizontal tab)), and it didn't help that for some bizarre
reason, the CoCo was set up so that the up arrow key generated ASCII HT and
expected it to have the effect of a reverse line feed (if memory
serves--the other character that got misused, if I remember rightly, is the
grave accent, 0x60). OS-9/68000 had  a field in SCF device descriptors to
indicate tab positions, but I don't recall whether backspacing over a tab
was done right. This was also before the days of bothering to handle other
OS's end of line conventions (or, in the case of CP/M files, where length
wasn't kept to any finer resolution than # of sectors, the ctrl-Z as EOF
for text files). That said, one could rewrite text editors, assemblers, and
compilers to accommodate the various alternatives--though it will take some
testing to find out where assumptions like "one character corresponds to
one byte in the file" occur in code (which are violated by Windows text
files with CRLF, two bytes, for end of line).

On Wed, May 31, 2017 at 3:30 PM, Dave Philipsen <dave at davebiz.com> wrote:

> While I'm thinking about it...this is not intended to be a slam on all of
> the good people who organized the source tree for NitrOS9 but it would be
> nice sometime if all of the files were converted in some way to be
> universal.  Because of issues with linefeeds, tabs, and even end-of-file
> characters, not all sources will easily compile or edit on all platforms.
>
> I realize that a lot of this is caused by the fact that building the code
> on a real CoCo 3 was prohibitively slow and a lot of people desired a more
> modern alternative.  But now that we have very fast versions of NitrOS9
> running under emulators and the CoCo3FPGA I think it would be in everyone's
> best interest to be able to assemble the code natively under NitrOS9.
>
> I know others may not necessarily agree but this is just my personal
> opinion.
>
> Dave
>
>
>
> On 5/31/2017 3:17 PM, Dave Philipsen wrote:
>
>> David,
>>
>> I'm right with you on that.  I really like to use tabs when coding.
>> Unfortunately, even in OS9, the tab characters are not supported real
>> well.  I would like to sometime fix the 'list' command to properly display
>> tab characters in text files.  Using tabs instead of spaces in a text file
>> can, among other things, drastically reduce the size of an assembler source
>> code file.
>>
>> It's also too bad we don't have a dedicated tab key on the CoCo 3
>> keyboard.
>>
>> Dave
>>
>>
>> On 5/31/2017 3:09 PM, David Ladd wrote:
>>
>>> Dave,
>>>
>>> You are right.  Robert Guault does have a nice patch for the Disk
>>> EDTASM+.
>>> It will add support for the 6309 as well as 40 or 80 column text screen
>>> editing.
>>>
>>> I myself am not a fan of the EDTASM's editor, but wish there was a Disk
>>> Basic text editor that preserved the TAB(s) in the assembly file.  If
>>> anyone knows of a Disk Basic text editor that preserves the TAB(s)
>>> character code would be great :D
>>>
>>> +-----------------------------------------------------------------------+
>>>
>>> | David Ladd a.k.a. PacoOtaktay a.k.a. Drencor                          |
>>> | YouTube: http://www.youtube.com/user/PacoOtaktay
>>> |
>>> | YouTube Gaming Live: https://gaming.youtube.com/user/PacoOtaktay/live
>>> |
>>> | Websites: http://dwladd.com     & http://www.theterrorzone.com    |
>>> | G+: https://plus.google.com/113262444659438038657 |
>>> | G+: https://plus.google.com/+DavidLaddPacoOtaktay |
>>> | |
>>> | Do you have your CoCo 3 yet?                                          |
>>> +-----------------------------------------------------------------------+
>>>
>>>
>>>
>>> On Wed, May 31, 2017 at 3:04 PM, Dave Philipsen <dave at davebiz.com>
>>> wrote:
>>>
>>> You should get in touch with Robert Gault as I believe he has a nice
>>>> version of EDTASM+ that is patched for disk access and should work for
>>>> you.
>>>>
>>>> Dave
>>>>
>>>>
>>>>
>>>> On 5/31/2017 2:35 PM, Salvador Garcia via Coco wrote:
>>>>
>>>> I agree with you Dave. Way back in the mid 80s I was deep into 8088
>>>>> assembler and got to the point where I could recognize certain
>>>>> sequences
>>>>> just by looking at the machine code. This came in handy when doing
>>>>> dumps
>>>>> using DEBUG without having to disassemble.
>>>>>
>>>>> Getting back into the 6809 vibe. If I have VCC and would like to use
>>>>> EDTASM+, how would I go about doing this? I assume that I need to get
>>>>> a DSK
>>>>> image, but any pointers would be helpful;.
>>>>>
>>>>> Salvador
>>>>>
>>>>>         From: Dave Philipsen <dave at davebiz.com>
>>>>>    To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
>>>>>    Sent: Wednesday, May 31, 2017 1:57 PM
>>>>>    Subject: Re: [Coco] Machine Code
>>>>>      Actually, understanding 'machine code' can be very beneficial.  If
>>>>> you're going to write code in assembler, why not understand exactly
>>>>> what's going on under the hood?  I can't tell you how many times I've
>>>>> just done a quick dump of memory and seen certain combinations like "7E
>>>>> 80 00" or "1A 50" or "20 8D" or "12" or "39" and recognized what was
>>>>> happening even without using a disassembler.  It's true that virtually
>>>>> no one writes in "native machine code" but I have, on many occasions,
>>>>> patched code for purposes of experimentation/testing with machine code.
>>>>> And, in some very rare cases where I was working from a monitor that
>>>>> did
>>>>> not include an assembler or disassembler on a platform (usually an
>>>>> embedded controller) where it wasn't necessarily easy import and test
>>>>> new code, I have actually written a bit of "machine code" or
>>>>> cross-assembled on another machine and manually entered the code
>>>>> byte-by-byte on the target machine.
>>>>>
>>>>> And I do agree that starting out with EDTASM+ and a good tutorial is
>>>>> the
>>>>> best...
>>>>>
>>>>> Dave
>>>>>
>>>>>
>>>>> On 5/31/2017 12:36 PM, tim franklinlabs.com wrote:
>>>>>
>>>>>       I'm curious what you consider "Machine Code"? Assembly and
>>>>>> Machine
>>>>>> Code
>>>>>>       are, for all practical purposes, the same thing. Machine Code by
>>>>>>       definition is the actual numbers put into RAM/ROM locations. I
>>>>>> don't
>>>>>>       know anyone who actually writes in native machine code. They
>>>>>> always
>>>>>> use
>>>>>>       assemblers to create the machine code.
>>>>>>       As mentioned by another poster, it's best to start with EDTASM
>>>>>> and a
>>>>>>       good Assemblers "How To" book.
>>>>>>
>>>>>>         On May 31, 2017 at 11:53 AM John Mark Mobley
>>>>>>         <johnmarkmelanie at gmail.com> wrote:
>>>>>>
>>>>>>         How do you practice simple machine code on a CoCo. This is
>>>>>> just to
>>>>>>         teach
>>>>>>         the basics of machine code as an introduction to assembly.
>>>>>>
>>>>>>         What steps should one follow to practise machine code.
>>>>>>
>>>>>>         -John Mark Mobley
>>>>>>
>>>>>>         --
>>>>>>         Coco mailing list
>>>>>>         Coco at maltedmedia.com
>>>>>> [1]https://pairlist5.pair.net/mailman/listinfo/coco
>>>>>>
>>>>>> References
>>>>>>
>>>>>>       1. https://pairlist5.pair.net/mailman/listinfo/coco
>>>>>>
>>>>>>
>>>>>> --
>>>> Coco mailing list
>>>> Coco at maltedmedia.com
>>>> https://pairlist5.pair.net/mailman/listinfo/coco
>>>>
>>>>
>>
>>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>


More information about the Coco mailing list