Last change
on this file since 254 was 251, checked in by krille_n_@…, 13 years ago |
Changes:
- Simplified the bug fix I did in r242.
- Fixed a couple of new bugs in Reboot.asm
|
File size:
1.4 KB
|
Rev | Line | |
---|
[245] | 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:
|
---|
[251] | 15 | LOAD_BDA_SEGMENT_TO ds, bx
|
---|
[245] | 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+)
|
---|
[247] | 30 | %ifndef EXCLUDE_FROM_XTIDE_UNIVERSAL_BIOS
|
---|
[251] | 31 | mov ax, 10
|
---|
[245] | 32 | call Delay_MicrosecondsFromAX
|
---|
[247] | 33 | %else
|
---|
| 34 | JMP_DELAY
|
---|
| 35 | %endif
|
---|
[245] | 36 | ; Fall to Reboot_XT
|
---|
| 37 |
|
---|
| 38 |
|
---|
| 39 | ;--------------------------------------------------------------------
|
---|
| 40 | ; Reboot_XT
|
---|
| 41 | ; Parameters:
|
---|
| 42 | ; Nothing
|
---|
| 43 | ; Returns:
|
---|
| 44 | ; Nothing, function never returns
|
---|
| 45 | ;--------------------------------------------------------------------
|
---|
| 46 | Reboot_XT:
|
---|
| 47 | xor ax, ax
|
---|
| 48 | push ax
|
---|
| 49 | popf ; Clear FLAGS (disables interrupt)
|
---|
| 50 | mov ds, ax
|
---|
| 51 | mov es, ax
|
---|
| 52 | mov ss, ax
|
---|
[251] | 53 | jmp 0FFFFh:0 ; XT reset
|
---|
Note:
See
TracBrowser
for help on using the repository browser.