aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/apm/apm.asm
diff options
context:
space:
mode:
authorMarvin Borner2019-09-19 21:28:25 +0200
committerMarvin Borner2019-09-19 21:28:25 +0200
commit8fd9eaf2d582893e6b3117d0dbeb1d368ca61d7a (patch)
tree2926ef26a93fc1b449833f62cd63015a24f0a366 /src/kernel/apm/apm.asm
parent05e1fedcc9cd30d1a34a65e640da45e980b4f859 (diff)
Added sleep command/action
Diffstat (limited to 'src/kernel/apm/apm.asm')
-rw-r--r--src/kernel/apm/apm.asm37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/kernel/apm/apm.asm b/src/kernel/apm/apm.asm
new file mode 100644
index 0000000..e39cc84
--- /dev/null
+++ b/src/kernel/apm/apm.asm
@@ -0,0 +1,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 \ No newline at end of file