Last change
on this file since 323 was
323,
checked in by aitotat@…, 12 years ago
|
Changes to Assembly Library:
- Added Display Library function for printing QWORDs.
- Added couple of function numbers to BiosFunctions.inc
|
File size:
1.4 KB
|
Line | |
---|
1 | ; Project name : Assembly Library |
---|
2 | ; Description : Functions for rebooting computer. |
---|
3 | |
---|
4 | ; Section containing code |
---|
5 | SECTION .text |
---|
6 | |
---|
7 | ;-------------------------------------------------------------------- |
---|
8 | ; Reboot_ComputerWithBootFlagInAX |
---|
9 | ; Parameters: |
---|
10 | ; AX: Boot Flag |
---|
11 | ; Returns: |
---|
12 | ; Nothing, function never returns |
---|
13 | ;-------------------------------------------------------------------- |
---|
14 | Reboot_ComputerWithBootFlagInAX: |
---|
15 | LOAD_BDA_SEGMENT_TO ds, bx |
---|
16 | mov [BDA.wBoot], ax ; Store boot flag |
---|
17 | ; Fall to Reboot_AT |
---|
18 | |
---|
19 | |
---|
20 | ;-------------------------------------------------------------------- |
---|
21 | ; Reboot_AT |
---|
22 | ; Parameters: |
---|
23 | ; Nothing |
---|
24 | ; Returns: |
---|
25 | ; Nothing, function never returns |
---|
26 | ;-------------------------------------------------------------------- |
---|
27 | Reboot_AT: |
---|
28 | mov al, 0FEh ; System reset (AT+ keyboard controller) |
---|
29 | out 64h, al ; Reset computer (AT+) |
---|
30 | %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS |
---|
31 | %ifdef INCLUDE_TIME_LIBRARY |
---|
32 | mov ax, 10 |
---|
33 | call Delay_MicrosecondsFromAX |
---|
34 | %else |
---|
35 | JMP_DELAY |
---|
36 | %endif |
---|
37 | %else |
---|
38 | JMP_DELAY |
---|
39 | %endif |
---|
40 | ; Fall to Reboot_XT |
---|
41 | |
---|
42 | |
---|
43 | ;-------------------------------------------------------------------- |
---|
44 | ; Reboot_XT |
---|
45 | ; Parameters: |
---|
46 | ; Nothing |
---|
47 | ; Returns: |
---|
48 | ; Nothing, function never returns |
---|
49 | ;-------------------------------------------------------------------- |
---|
50 | Reboot_XT: |
---|
51 | xor ax, ax |
---|
52 | push ax |
---|
53 | popf ; Clear FLAGS (disables interrupt) |
---|
54 | mov ds, ax |
---|
55 | mov es, ax |
---|
56 | mov ss, ax |
---|
57 | jmp 0FFFFh:0 ; XT reset |
---|
Note: See
TracBrowser
for help on using the repository browser.