Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Need advice to write a SBF driver

46 views
Skip to first unread message

Ralf Kiefer

unread,
Nov 22, 2018, 3:39:53 PM11/22/18
to
Hi!

OS-9/68k, v2.4.5 .. v3.1, opened Technical I/O Manual (November 1993),
without any template for a simple sbf driver (written in Assembler), but
I wish I have one :-)

I've got some problems with my own empty framework.

What I've done: there is an empty driver framework, means Init, Read,
Write, PutStat, GetStat, and Terminate each returning carry bit cleared
and d1.w = 0. Init does this:
move.w #1,SBF_NDrv(a2)
and it really does. Nothing else at the moment.

There is a vsect with the driver's code:
vsect
org $0030
SBF_NDrv: do.w 1 number of drives
SBF_Flag: do.w 1 driver flags
SBF_Drvr: do.l 1 driver module ptr
SBF_DPrc: do.l 1 driver process ptr
SBF_IPrc: do.l 1 interrupt process ptr
align
ends

The linker command:
l68 $(LDIR)/sbfstat.r $(LDIR)/sbfdrvtb.r [...]

After loading the modules I set some breakpoints to the six standard
driver entries.

With "iniz /mt0" the first breakpoint is reached. IOMan jumps to "Init"
of my driver. Than my device seems to be active according to the "devs"
command. I can type in "deiniz /mt0", stop at the breakpoint at
"Terminate" in my driver and than my new device disappears from the
"devs" list. That's ok until now.

But that's it. The sbf will never jump to Read, Write, GetStat, or
PutStat: Error: 0:240 (Illegal Unit (drive) number).

In "Init" the driver's static storage seems to be ok, means just
starting with my port address and nothing else except a lot of '0's.

Any idea? I just want to get an unbuffered SBF device, no interrupts, no
additional process to control a tape, no signals, ...


TIA,
Ralf
0 new messages