aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/apm/apm.asm
blob: e39cc84675d9b6ee7f74ccbba04938662d967a71 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
global apm_check
global apm_connect
global apm_poweroff
global apm_sleep

extern apm_error

apm_check:
    mov ah,53h
    mov al,00h
    xor bx,bx
    int 15h
    jc apm_error
    ret

apm_connect:
    mov ah, 53h
    mov al, 03h
    xor bx, bx
    int 15h
    jc apm_error

apm_poweroff:
    mov ah, 53h
    mov al, 07h
    mov bx, 0001h
    mov cx, 03h
    int 15h
    jc apm_error

apm_sleep:
    mov ah, 53h
    mov al, 07h
    mov bx, 0001h
    mov cx, 01h
    int 15h
    jc apm_error