-
Notifications
You must be signed in to change notification settings - Fork 0
/
reboot.a86
35 lines (31 loc) · 895 Bytes
/
reboot.a86
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
;
; Licensed under the MIT license. See LICENSE file in the project root for details.
;
title 'Reboot'
reset_flag equ 1234h
rombios_seg equ 40h
rombios_offs equ 72h
cseg
mov bx,5dh
mov ch,0bh
mov al,[bx]
cmp al,'W'
jz warmboot
cmp al,'w'
jz warmboot
mov ax,rombios_seg
mov ds,ax
mov ax,0
jmp boot
warmboot:
mov ax,rombios_seg
mov ds,ax
mov ax,reset_flag
boot:
mov bx,rombios_offs
mov ax,cs
mov ds,ax
mov bx,offset reboot_vec
jmpf dword ptr [bx]
reboot_vec db 0,0,0ffh,0ffh
end