gardos@kodak.UUCP (tom gardos) (04/09/86)
SYSTEM: IBM XENIX V1.0 running on the IBM AT, iAPX 286 microprocessor As some of you might have read earlier, I am trying to write an I/O routine in assembler using the IN and OUT assembler instructions. I have written this as a device driver and loaded it into the kernel. However, upon execution, I crash the system with a TRAP type (13) or hex D - which essentially states that the process doesn't have high enough priority level (I think). Shouldn't the priority be high enough since it is a device driver? Perhaps I am assembling my assembler source file wrong. I know for C source files, one must strip the stack probes and other such things. Could someone who has actually written a device driver in assembler or one in C that called an assembler function please let me know how they wrote it and compiled it? This is beginning to get frustrating! P.S. This isn't relevant but is there a way to read articles that have already been read? -- Tom Gardos
gemini@homxb.UUCP (Rick Richardson) (04/11/86)
[Trying to use in/out in assembler from a XENIX device driver, stills gets TRAP] I don't know for sure about XENIX, but VENIX/286 provides C callable (from the driver) routines that do IN/OUT for you. They are io_in[bw](port) and io_out[bw](port, val). I would be surprised if XENIX didn't also provide the same sort of thing. As for directly using the IN/OUT instructions from assembler in a driver, that also works under VENIX/286, with no extra shenanigans. BTW, the only driver in VENIX/286 that has a portion written in assembler is the console driver. All the rest are completly C. Rick Richardson, PC Research, Inc. (201) 922-1134, (201) 834-1378 @ AT&T-CP ..!ihnp4!castor!{rer,pcrat!rer} <--Replies to here, not to homxb!gemini, please.