Intermec PENKEY 6100 Programmer's Reference Manual page 290

Hide thumbs Also See for PENKEY 6100:
Table of Contents

Advertisement

Common PEN*KEY 6000 Series Information
; pusha
push ax
push bx
push cx
push dx
push si
push di
mov
mov
mov
push dx
push si
push ax
push di
call baderr_
add
mov
; popa
pop
pop
pop
pop
pop
pop
pop
pop
mov
pop
iret
#endasm
}
IDLE.CPP
//
// CPU Idle call sample source code
//
#include <dos.h>
#include <stdio.h> // printf, etc
//
// CPU Idle calls cause the processor to halt (via HLT instruction) until the
// next hardware interrupt.
// input polling loops, or other low activity points in an application.
// MS-Intel APM 1.1 specification or Ralf Brown's interrupt list, for info.
//
unsigned char APMCPUIdle(void) {
union REGS regs;
regs.x.ax= 0x5305;
int86(0x15, &regs, &regs); // makes actual function call being tested
if (regs.x.cflag==0) {
// CPU Idle successful
return (0);
}
else {
// An error occurred, check error code.
switch (regs.h.ah) {
case (0x03);
case (0x0B);
default:
}
return ((unsigned carh)regs.h.ah);
R
B-10
PEN*KEY
6100 Computer Programmer's Reference Guide
dx,dataseg
ds,dx
dx,[bp]
sp,8
–6[bp],al ;set return code
di
si
dx
cx
bx
ax
es
ds
sp,bp
bp
// int86
This causes good power savings if used during
// Interface not connected
break;
// Interface not engaged
// Unrecognized Return code
break;
// return the error code
APPENDIX B
See

Advertisement

Table of Contents
loading

Table of Contents