[Coco] os9/drivewire driver: success!

Aaron Wolfe aawolfe at gmail.com
Tue Nov 10 12:59:07 EST 2009


Ah very nice way to do some debugging.  I actually added a temporary op to dw just to get some test values out, this works much better.  Thanks again!


-----Original Message-----
From: Boisy G. Pitre <boisy at tee-boy.com>
Sent: Tuesday, November 10, 2009 12:41 PM
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Subject: Re: [Coco] os9/drivewire driver: success!

Aaron,

Check out vrn.asm for an example of how to setup the VIRQ call.  You still need to call F$IRQ as well as F$VIRQ when setting up the virtual interrupt, and call both to tear them down at Term time.

If I were you I would start out by adding the code to install the ISR, do the F$IRQ and F$VIRQ call, and in your ISR just increment a value in a byte in the system map (say address $1E) then use dmem/dump to see if it's changing at offset $1E:

dmem 0 0 ! dump

That way you have some confidence that your driver is properly bringing up the ISR when you do an iniz /t2.

Then do a deiniz /t2 to make sure you are tearing things down correctly.

Boisy

On Nov 10, 2009, at 11:32 AM, Aaron Wolfe wrote:

> Thanks for the advice.  I kind of suspected i was doing things wrong with the way i was trying to sleep.  Between your walk through and the examples in other modules, I might be able to pull this off.  I will give it a shot and see how far I get :)
> 
> 
> -----Original Message-----
> From: Boisy G. Pitre <boisy at tee-boy.com>
> Sent: Tuesday, November 10, 2009 7:05 AM
> To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
> Subject: Re: [Coco] os9/drivewire driver: success!
> 
> Aaron,
> 
> Again, fantastic work.  It is great to see someone taking the bull by the horns, learning the tools and expanding on the existing work in the NitrOS-9 project.
> 
> I downloaded the source to the scdwt driver and looked over it.  I have a few suggestions that I think you may want to look at.
> 
> Typically in an OS-9 SCF driver, the read routine uses the V.BUSY/V.WAKE SCF variables to handhshake with an interrupt service routine (ISR) to coordinate obtaining data from an input buffer that is filled by the ISR itself.  There is no real interrupt in this particular case, but OS-9 provide something called a Virtual Interrupt (VIRQ) that you can use for situations just like this.  Here's how it works:
> 
> You can set up the VIRQ through the F$VIRQ system call to call an ISR that you provi

[The entire original message is not included]



More information about the Coco mailing list