Displaying 1 result from an estimated 1 matches for "apm_flags".
Did you mean:
rpm_flags
2005 Sep 17
2
com16/com32 module for APM powerdown
...ction .text
cpu 8086
org 0100h
_start:
; echo (C)
print msg_cpy
; check APM support
apm 0, 0, 0
jnc apm_checkver
; APM not found
noapm:
print msg_noapm
jmp exit
; check bx for PM
apm_checkver:
cmp bx, 0x504d
jne noapm
; save flags and version
mov [apm_flags], cx
mov [apm_version], ax
; show apm version
add ax, 0x3030
mov [apm_ver_maj], ah
mov [apm_ver_min], al
print msg_apmver
; connect to APM
apm 1, 0, 0
jnc apmc
; try to break any other connection
apm 4, 0, 0
; try again
apm 1, 0, 0
jnc apmc
; connection error
print msg_ap...