APPENDIX B
Common PEN*KEY 6000 Series Information
PEN*KEY
R
6200/6300 Hand-Held Computer Programmer’s Reference Guide B-13
/******************************************************************/
struct reqpk {
unsigned char reqlen, unit, cmd;
unsigned status;
long rsrv1, rsrv2;
unsigned char lookahead;
FP(unsigned char) buff;
unsigned int bytes;
};
struct devhdr{
FP(struct devhdr)
next;
unsigned
attribute;
void
(*strategy)();
void
(*interrupt)();
uchar
name[8];
};
struct
faddr{
void *offset;
void *segment;
};
union fncptr {
FAR (void)
(*fnc)();
struct faddr
addr;
FP(struct devhdr) fncx;
};
void set24h(fnc)
FP(void) fnc;
{
#asm
xor
ax,ax
mov
es,ax
mov
bx,24h*4
mov
ax,[bp+4]
mov
dx,[bp+6]
cli
mov
es:[bx],ax
mov
es:[bx+2],dx
sti
#endasm
}
drivercall(fncptr,pak)
FP(void) pak;
FAR (void) (*fncptr)();
{
#asm
les
bx,8[bp]
call dword ptr 4[bp]
#endasm
}
baderr(error,devtype,hdr)
unsigned error,devtype;
FP(struct devhdr) hdr;
{
union fncptr strat;
union fncptr inter;
struct ioargs args;
struct reqpk devpack;
uchar buffer[40];
uchar cmd,exterr;
uchar ch;
uchar jam;
uchar jam2,jam3,jam4;
cmd = pXERROR;
args.ioctl_cmd = &cmd;
args.ioctl_buf = buffer;
B. Common PEN*KEY
6000 Series Info.