[Coco] a not very important drivewire question

William Astle lost at l-w.ca
Thu Jul 17 15:05:10 EDT 2014


On 14-07-17 11:36 AM, Aaron Wolfe wrote:
> The flush command is a low level DW op code, as is the "here's some data to
> print".  I'm not sure how HDBDOS would know when to send the flush op, do
> programs actually open and close #-2?  I seem to recall its just always
> there.  In os9 I think flush is sent when the handle to /p closes, not sure
> if there is a good equivalent in basic.

#-2 is always there so there's no close to do on it. HDBDOS would have 
to do something like the following:

1. Flush when there has been some defined length of time with no data to 
send to the printer. This is probably the best overall solution.

2. Flush when it encounters FF or some other character.

3. Flush after X characters have been sent.

4. Some combination of the above.


Overall, it's fairly trivial to hook the #-2 handler and redirect it 
through a routine supplied by drivewire. The flush handling bit is the 
most complex part. It would be fairly easy to trigger the flush based on 
character count or a specific character being sent. A time triggered 
flush would require an IRQ handler of some sort, but also not horribly 
difficult. The real problem is whether there is room in the ROM to 
actually do it.


More information about the Coco mailing list