beautypg.com

AAEON PFM-535S User Manual

Page 44

background image

P C / 1 0 4 C P U M o d u l e

P F M - 5 3 5 S

Appendix A Programming the Watchdog Timer A-11

mov edx, DWORD PTR addr

in al, dx

and eax, 0xff

pop edx

}

}

void outportb(int addr, unsigned char val)

{

__asm

{

push edx

mov edx, DWORD PTR addr

mov al, BYTE PTR val

out dx, al

pop edx

}

}

void main(void)

{

unsigned char c;

unsigned long lTime;

// 500 mini-second

lTime = 0x20L * 500L;

outp(0x6c, (lTime >> 16) & 0xff);

outp(0x6b, (lTime >> 8) & 0xff);