[Coco] Basic 09 text display question. & Re: Other recent Basic09 questions

Robert Gault robert.gault at att.net
Wed Jul 24 17:12:56 EDT 2019


The answer below from Curtis is perfect.

However, it seems from some of the recent questions on CoCoList, that more attention should be paid 
to the Tandy "OS-9 Level 2 Manual" which can be obtained at
http://www.colorcomputerarchive.com/coco/Documents/Manuals/Operating%20Systems/#
specifically
http://www.colorcomputerarchive.com/coco/Documents/Manuals/Operating%20Systems/OS-9%20Level%202%20Manual%20(Tandy).pdf

There are many detailed examples of Basic09 programs including Syscall and the Technical Reference 
section describes among much more the use of SS.Palet.

L. Curtis Boyle wrote:
> That is a little more complicated; there is no display code (or gfx2 function) for that. For that, you have to do a GetStat system call, which will need the following code:
>
> TYPE registers=cc,a,b,dp:BYTE;x,y,u:INTEGER
> DIM regs:registers
> DIM curpalette(16):BYTE
>
> (* Standard output path we are using
> regs.a=1
> (* SS.Palet GetStat call #
> regs.b=$91
> (* Point to place to hold all 16 current palette register settings
> regs.x=ADDR(curpalette)
> RUN syscall($8d,regs)
>
> At this point curpallette(1) contains the current color in palette 0, curpallette(2) has color 1, etc. up to curpalette(16) has color 15.
> As Wayne Campbell mentioned before, if you do a BASE 0 at the beginning of your program, than arrays will be 0 to n-1 (vs. the default 1 to n), so you could then use curpalette(0) for palette 0. But be aware that all arrays in your program become base 0 if you do that).
>
> L. Curtis Boyle
> curtisboyle at sasktel.net
>
>
>
><snip>


More information about the Coco mailing list