Intermec 6100 Reference Guide

Page of 328
APPENDIX B
Common PEN*KEY 6000 Series Information
PEN*KEY
R
 6100 Computer Programmer’s Reference Guide    B-7
extern
int  jamindex;
extern
FILE *stdprn;
extern  unsigned page_no;
extern  unsigned line_cnt;
/******************************************************************/
/* Critical error handler routines for the printer follow. ********/
/******************************************************************/
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;
B. Common PEN*KEY
6000 Series Info.