On 2/26/10, Mark Tapley <mtapley at swri.edu> wrote:
At 17:20 -0600 2/25/10, Mike L. wrote:
"More TRS-80 Assembly Language
Programming", by Bill Barden
A comment and a question: I found on eBay the CoCo Assembly
book by the same author. It's clear, an enjoyable read, and does a
good job of introducing programming, the debugger/assembler
implemented on the cartridge, and 6809 assembly language in a simple,
easy-to-understand progression.
I may have to keep my eyes out for that one. I'm much less informed
about the 6809 than any of the other contemporary processors.
However, it seems to me to give really short shrift
to what
the 6809 designers considered to be very important features of the
processor. Position independent code is barely touched on, there are
a lot of what looks to me like kludgy programming techniques, the
most advanced software-management tool discussed is a flowchart (and
then there's no useful example of how to use them), the multiple
pointer registers are abused as 16-bit counters rather than as
indexing pointers, and there are many similar examples.
Hmm... I haven't read anything by Barden, so I'm merely commenting on
your comments, but I do remember that back in the day, besides a
"better" register scheme, the one thing that really made the 6809
stand out (from my 6502 world) was its ability to render
position-independent code. I didn't need it often when I was
programming the 6502 daily, but occasionally, I did wish for it.
Perhaps the lack of attention to that in the book is due to a lack of
perceived utility for it? When the 6502 and Z80 and 6809 ruled the
earth (or at least the hobbyist corner of it), multitasking operating
systems weren't the norm. I know OS/9 stands out, but until you jump
up to early UNIX super-micros, there's not much else in the field that
was commonly available (the PDP-8 had RTS-8, but compared to a basic
OS/8 setup, RTS/8 was strange and rare). The vast majority of micros
had "operating systems" (by a very wide definition) with
fixed-position memory maps. There was little need to be able to
shuffle your code from one spot in memory to another. Even on larger
systems, like the PDP-11, MMU hardware did that sort of mapping for
you (despite the fact that PIC is easy to write for the -11).
As for the lack of "advanced software-management tool[s]", most of the
books that I've read from the late 1970s and early 1980s fall into
that category. I don't think I learned anything "better" than
flowcharts and coding sheets until I hit the minicomputer world in the
mid-1980s (it sure wasn't any different when I took my first
programming course in college in 1984 - flowcharts were a mandatory
part of the homework and were graded quite rigorously).
Does anybody else have the same take on this? I was
thinking
about using it to teach programming to one or more of the kids, but
it seems to me that I'd rather find something a bit more
structure-oriented, and less likely to use "tricks".
By the late 1980s, I remember a change in the weather with articles in
Amiga-centric magazines on programming the 68000. See if you can find
Transactor magazines (or PDFs of them). Those might be "modern"
enough in their approach to feel more friendly. The instruction set's
not the same, but code organization and concepts are analogous.
Am I just spoiled from having read the 6809
programmer's
guide and the (somewhat snooty-sounding) Byte article on 6809 design
and introduction?
Perhaps. With 1970s docs, my feeling of remembering those days is
that 8080 and Z80 tutorials and guides were "stiffer" than
6502-related material, but I'll easily admit those memories are
somewhat biased because I spent lots more time seeking out and reading
6502 publications in depth. The 6809 stuff, though, kinda went by
unexplored by me since I had no hardware to tie to it.
-ethan