[comp.os.os9] what are these files for?

roccella@pilot.njin.net (Matthew Roccella) (03/29/91)

Hello,
	I was wondering if somebody out there may help me. I have
bought a copy of OS-9 for my RADIO SHACK TRS-80 COLOR COMPUTER some
time ago. In the SYS directory of my BASIC09 diskette, there are the
files: "stdpats" and "stdptrs." I don't know what these files are for.
The manual, as far as I know, does not mention them All it says is
that "stdpats" contains some kind of "fill" patterns, but it does not
say how to use them.
	Also, I am trying to write a simple communications program.
However, I need to know how to access the built-in serial under OS-9.
If I am writing the program in BASIC09, do I just open a path to the
port and use the SYSCALL I$READ and I$WRITE to communicate with the
modem. I noticed that the /T1 driver does not support two-way
communication through the built-in serial port.
	If anyone has any info they can lend me, please pass it along.

							Matthew
Roccella

* * * My only lady is my TRS-80... for now * * *

jejones@mcrware.UUCP (James Jones) (03/29/91)

In article <Mar.28.13.24.05.1991.2931@pilot.njin.net> roccella@pilot.njin.net (Matthew Roccella) writes:
>In the SYS directory of my BASIC09 diskette, there are the
>files: "stdpats" and "stdptrs." I don't know what these files are for.

These files contain fill patterns and graphics for things such as the pointer
that shows where the mouse is.  What's a fill pattern?  See pages 3-29 et seq.
in the *OS-9 Windowing System* section of the manual.  (If you've seen a paint
program set up so that when you paint an area the color doesn't show up as
solid, but is instead crosshatched or checkerboarded or something like that,
you've seen the effect of a fill pattern.)  How to use them?  Merge them to
a grfint/windint type window.

>	Also, I am trying to write a simple communications program.
>However, I need to know how to access the built-in serial under OS-9.
>If I am writing the program in BASIC09, do I just open a path to the
>port and use the SYSCALL I$READ and I$WRITE to communicate with the
>modem. I noticed that the /T1 driver does not support two-way
>communication through the built-in serial port.

The CoCo's built-in "serial" port is an infamous design shortcut which maybe
sort of made sense in 1980 or so, when perhaps ACIA chips were more expensive
than they are now and when the expected use of said port was for a printer
(so that the traffic was all outbound) and under Color BASIC (no multitasking,
so that the user couldn't do anything else while a PRINT statement was 
executing, and hence couldn't tell that the 6809 was grinding away in delay
loops and busy wait loops emulating serial hardware that the designers didn't
put in.  It makes no sense now.  However, some folks have tried to overcome
the bit-banger port, and on various BBSs and pay systems (e.g. CIS, Delphi)
one can find a file called BITBANG.AR, a device driver that tries to make the
bit-banger port usable.  I've not tried it myself, but folks say that it does
work up to about 1200 baud; other folks have said they've had trouble with it.
(Evidently at device initialization time it mungs the kernel.)  If you really
need to use the bit-banger, I'd suggest you investigate BITBANG.AR (but make
a backup of your boot disk, because cobbler will propagate the kernel mung).

	James Jones

PHDragon@sandv.UUCP.UUCP (Alan Sheltra) (04/02/91)

> roccella@pilot.njin.net (Matthew Roccella) writes:
> 
> Hello,
> 	I was wondering if somebody out there may help me. I have
> bought a copy of OS-9 for my RADIO SHACK TRS-80 COLOR COMPUTER some
> time ago. In the SYS directory of my BASIC09 diskette, there are the
> files: "stdpats" and "stdptrs." I don't know what these files are for.
> The manual, as far as I know, does not mention them All it says is
> that "stdpats" contains some kind of "fill" patterns, but it does not
> say how to use them.

The STDPATS and STDPTRS files are for use in a graphics window... the STDPAT
are indeed fill patterns that are defined and used by the FILL cmd in B09 (or
the FFIL call 1B 4F)... STDPTRS are describe a the mouse cursor pointers...
To make use of the STDPATS and STDPTRS files in a B09 program you must first
"merge" them to any window type screen (This GPloads them into pre-defined
buffers), then it's a matter of calling up the correct GRP #, BUFF # ... B09
has cmds to handle this easily:
       RUN gfx2(path,"pattern",grp,patnum) .... where the GRP # can be
               #203 .... two color patterns
               #204 .... four color patterns
               #205 .... 16 color patterns
       After selection a foreground color with the GFX2 color cmd, select the
pattern # you want to use... then use the FILL cmd to fill in that color and
Pattern...  (always return to Grp #0, Pattern #0 when done!)

Refer to your OS9 manual - OS9 Windowing System for more info...

--
 //////////////////////////////////////////////////////////
 // PHDragon@SandV  -  SysOp@ZOG  (SysOp of Zog's Cavern //
 //                               (818) 761-4721         //
 //////////////////////////////////////////////////////////