Changeset View
Changeset View
Standalone View
Standalone View
stand/i386/boot0/boot0.S
Show First 20 Lines • Show All 210 Lines • ▼ Show 20 Lines | |||||
#if defined(SIO) && COMSPEED != 0 | #if defined(SIO) && COMSPEED != 0 | ||||
/* | /* | ||||
* Init the serial port. bioscom preserves the driver number in DX. | * Init the serial port. bioscom preserves the driver number in DX. | ||||
*/ | */ | ||||
movw $COMSPEED,%ax # defined by Makefile | movw $COMSPEED,%ax # defined by Makefile | ||||
callw bioscom | callw bioscom | ||||
#endif | #endif | ||||
#if defined(SIO) && defined(RESET_TERM) | |||||
/* | /* | ||||
* ANSI / VT100 command to reset all terminal attributes | |||||
*/ | |||||
movw $resetterm,%si # Reset | |||||
callw putstr # terminal | |||||
#endif | |||||
/* | |||||
* If the 'setdrv' flag is set in the boot sector, use the drive | * If the 'setdrv' flag is set in the boot sector, use the drive | ||||
* number from the boot sector at 'setdrv_num'. | * number from the boot sector at 'setdrv_num'. | ||||
* Optionally, do the same if the BIOS gives us an invalid number | * Optionally, do the same if the BIOS gives us an invalid number | ||||
* (note though that the override prevents booting from a floppy | * (note though that the override prevents booting from a floppy | ||||
* or a ZIP/flash drive in floppy emulation). | * or a ZIP/flash drive in floppy emulation). | ||||
* The test costs 4 bytes of code so it is disabled by default. | * The test costs 4 bytes of code so it is disabled by default. | ||||
*/ | */ | ||||
testb $SETDRV,_FLAGS(%bp) # Set drive number? | testb $SETDRV,_FLAGS(%bp) # Set drive number? | ||||
▲ Show 20 Lines • Show All 350 Lines • ▼ Show 20 Lines | #endif | ||||
push $0x10 # Packet size | push $0x10 # Packet size | ||||
movw %sp,%si # Packet pointer | movw %sp,%si # Packet pointer | ||||
decw %ax # Verify off | decw %ax # Verify off | ||||
orb $0x40,%ah # Use disk packet | orb $0x40,%ah # Use disk packet | ||||
1: int $0x13 # BIOS: Disk I/O | 1: int $0x13 # BIOS: Disk I/O | ||||
movw %di,%sp # Restore | movw %di,%sp # Restore | ||||
popw %si # Restore | popw %si # Restore | ||||
retw # To caller | retw # To caller | ||||
#if defined(SIO) && defined(RESET_TERM) | |||||
/* | |||||
* Reset terminal ANSI/VT100 sequence | |||||
freqlabs: s/teminal/terminal/ | |||||
*/ | |||||
resetterm: | |||||
.byte 0x1b; .byte 'c'|0x80 | |||||
#endif | |||||
/* | /* | ||||
* Various menu strings. 'item' goes after 'prompt' to save space. | * Various menu strings. 'item' goes after 'prompt' to save space. | ||||
* Also use shorter versions to make room for the PXE/INT18 code. | * Also use shorter versions to make room for the PXE/INT18 code. | ||||
*/ | */ | ||||
prompt: | prompt: | ||||
#ifdef PXE | #ifdef PXE | ||||
.ascii "\nF6 PXE\r" | .ascii "\nF6 PXE\r" | ||||
▲ Show 20 Lines • Show All 89 Lines • Show Last 20 Lines |
s/teminal/terminal/