[Coco] [CoCo] NitrOS-9 on real CoCo (Was DriveWire 4)
William Astle
lost at l-w.ca
Tue Jan 2 17:17:13 EST 2018
On 2018-01-02 03:01 PM, Allen Huffman wrote:
> When I was getting my CoCo set back up, I recall discussing with William about the possibility of porting lwtools to OS-9. I forget the details, but it did not sound doable.
>
> However, if “ansifront” can turn ANSI-C to K&R C, I wonder if all we need is a front-filter that would change the code back, generating labels that fit the 8 character limit on demand?
Yeah. Porting lwtools to OS9 isn't really doable. Just the code for
lwasm itself compiles to 135K using gcc6809 with optimization enabled.
Obviously that can't work since it's bigger than the CPU's entire
address space. That should give you some idea why porting would be
problematic. That leaves aside completely the runtime data required to
actually assemble anything. In principle, some substantial rewrites of
the code under the hood could make it more practical, the time required
to do that is nontrivial.
In theory, a "filter" that converted source format from what lwasm (and
before that, mamou, etc.) understands to something an assembler running
on OS9 understands can be written. Indeed, it would probably do a much
better job than "ansifront" could possibly do with C since assembly is
much more precise. Such a process would handle things like "include"
directives and the like, as well. Exactly how that process would work
depends on how the OS9 assembler operates.
There are a few cases where you might end up with code that is a byte or
two different in size depending on how well the OS9 assembler chooses
addressing modes. For most modules, that won't matter. For some, it might.
More information about the Coco
mailing list