APPENDIX B
Common PEN*KEY 6000 Series Information
PEN*KEY
R
6200/6300 Hand-Held Computer Programmer’s Reference Guide B-9
in
al,dx
test
al,2
;ibf
loopnz sd
dec
dx
mov
al,c
out
dx,al
}
}
UI GetResp()
{
ASM
{
xor
cx,cx
;Clear any message
mov
dx,201h
gr:
in
al,dx
mov
ah,al
or
ah,80h
test
al,1
loopz
gr
jcxz
grx
and
ah,not 80h
dec
dx
in
al,dx
grx:
}
}
UI GetData()
{
ASM
{
xor
cx,cx
;Clear any message
mov
dx,201h
gd:
in
al,dx
mov
ah,al
or
ah,80h
test
al,1
loopz
gd
jcxz
gdx
test
al,4
jnz
gdx
and
ah,not 80h
dec
dx
in
al,dx
gdx:
}
}
UI MupCom(UC clen, UC _far *cmd, UC rlen, UC _far *str)
{
UI error;
UC I;
SendCmd(*cmd++);
if (TMO & (error = GetResp())) return error;
if (RESP & error )
{
if ((error & 0xff != MUPACK)) return error;
for (i = (UC)(clen – 1); I––;)
{
SendData(*cmd++);
if (TMO & (error = GetResp())) return error;
if (RESP & (~error)) break;
if (error & 0xff != MUPACK) return error;
}
}
if (!rlen) return error;
*str++ = (UC) error;
B. Common PEN*KEY
6000 Series Info.