[Coco] 6809 example
robert.gault at worldnet.att.net
Mon Jan 19 02:52:01 EST 2004
Theodore (Alex) Evans wrote:
> Since the source is not strictly speaking EDTASM+, or any other
> particular assembler there is the question of whether the FCC pseudo-op
> uses ASCII, or a local native character set.
True but we are a Coco group and examples should be based on available
software for the Coco. That means fcc is ascii but the screens are not.
> In reality most assembly language programming has been done in an
> environment where there are at least some library routines present.
True, and in fact there is an environment on the Coco for both Basic and
OS-9. If you are going to program in assembly, you need to be aware that
you can take advantage of built-in code. For example, under Basic there
are Tandy approved links to the ROMs which are listed in detail in the
owner's manual. Here's the list.
BLKIN = [$A006] read block from cassette
BLKOUT = [$A009] write block to cassette
WRITLDR = [$A00C] turn on cassette and write leader
CHROUT = [$A002] output character to device
CSRDON = [$A004] starts and syncs cassette for reading
JOYIN = [$A00A] sample joysticks
POLCAT = [$A000] get character from keyboard
There are many more non-approved links given in the Unravelled series.
>> When I copied Theodore's program, I accidentally made the FCC statement
>> HELLO, WORLD. The program cleared the screen to black and then printed
>> black letters on a green background. When I corrected the FCC statement
>> to "Hello, world" as written, only the H and W printed correctly.
> I bet you found that challenging when there are no lowercase letters on
> the system :-)
> Would you prefer fcb $48,$05,$0c,$0c,$0f,$60,$17,$0f,$12,%0c,$04,$00 ?
No, as I've been implying, it does not make sense to change the fcc
statement. And yes, there are lowercase letters on the Coco. Some Coco2
units have true lowercase in low res and the Coco3 has true lowercase in
low res. To take advantage of true lowercase you need to learn something
about the Coco hardware in addition to learning assembly language as
there is not direct support in the ROMs. To take advantage of the
built-in OS, Basic or OS-9, you need to learn the specifics of the OS
which is hard to do before you are proficient in assembly. Can you say
Even without using the CHROUT ROM hook, only a few lines are needed to
change your code loop to a generic form that will handle some
punctuation, numbers, and both upper and lowercase letters. If I don't
see an answer in a day or so, I'll post a version.
More information about the Coco