[Coco] 6809 example

Theodore Evans (Alex) alxevans at concentric.net
Mon Jan 19 04:12:41 EST 2004


On Jan 18, 2004, at 9:52 PM, Robert Gault wrote:

>> 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 "catch-22"?

The lowercase line was meant humorously.  Since CoCo1s and some CoCo2s 
don't have lowercase without a hardware upgrade or special software it 
can definitely be said that the CoCo doesn't really have lowercase in 
spite of the fact that you can get to it on some CoCo2s and all CoCo3s 
by writing a specific value to $FF22.  In any case I assumed that 
entered reverse video for the lowercase characters as has been 
generally the habit on CoCos.  If I am looking for maximal efficiency 
avoiding translation at run time if possible is a good idea.

> 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.

Well, you only have to look at the top three bits to determine how the 
mapping needs to be changed.  Do you feel it necessary to implement the 
ASCII control characters while your at it?  How about making sure that 
it works whether or not you have Disk BASIC?  If so will you move the 
start of the screen, or interrogate the hardware to figure out where it 
currently is?  What about 40 and 80 column text screens?  How about 
text to graphical screen modes (which CHROUT doesn't support)?  
Incidentally one of my early programs for the CoCo (which I assembled 
by hand) was a routine to take CHROUT like calls and write text to the 
(then) hi-res (256x192) graphics screen so that I could have a 64x24 
text mode with reasonable performance for some of my BASIC programs.  
The fact that it gave me access to lowercase on the system as well was 
a definite plus.  This was before any CoCos shipped with lowercase 
hardware.

I would say that using the OS hooks hardly requires proficiency in 
assembly language, and there is a whole lot you can do with assembly 
language without knowing a whole lot about the hardware specifics.  You 
can write computational subroutines to be called from BASIC (an 
excellent use of assembly skills) with only the knowledge of where in 
memory you can locate the subroutine,  that you can call it with EXEC, 
and that you end it with rts (or puls ps).  Hardly a great deal of 
system knowledge.  As for the system knowledge beyond that, you mostly 
need to know how to read the appropriate docs.  The hooks for BASIC are 
all clearly documented in the BASIC manuals, and most of the other 
juicy details are available (in admittedly a much more difficult to 
understand form) in the technical reference manual appropriate to the 
model in question.




More information about the Coco mailing list