File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,12 +49,13 @@ section .text:
4949 _stop:
5050 push msg2
5151 call _printform at
52- jmp $ ; Stops the processor
52+ call _shutdown
5353
5454
5555; Data Section
5656%include "functions/io.asm"
5757%include "functions/disk_mng.asm"
58+ %include "functions/shutdown.asm"
5859
5960 msg1: db "Hello, There!\nDo You want to enter 32 bit mode?[Y]/[N](default=Y) \0" ; Printable string
6061 msg2: db "Goodby!\0"
Original file line number Diff line number Diff line change 1+ global _shutdown
2+
3+ section .text:
4+ _shutdown:
5+ mov al , 0x01 ; Connect to real mode interface
6+ mov ah , 0x53 ; Use APM control
7+ xor bx , bx ; BX is BIOS id so it set to 0
8+ int 15h ; Use BIOS interruption for additional functions
9+
10+ mov al , 0x0e ; Set APM version function
11+ mov ah , 0x53 ; Use APM control
12+ xor bx , bx ; BX is BIOS id so it set to 0
13+ mov ch , 0x01 ; Set major APM version to 1
14+ mov cl , 0x02 ; Set minor APM version to 2
15+ int 15h ; Use BIOS interruption for additional functions
16+
17+ mov al , 0x07 ; Set device state function
18+ mov ah , 0x53 ; Use APM control
19+ mov bx , 0x0001 ; Select all devices
20+ mov cx , 0x03 ; Set shutdown mode
21+ int 15h ; Use BIOS interruption for additional functions
You can’t perform that action at this time.
0 commit comments