Last change
on this file since 320 was 277, checked in by gregli@…, 13 years ago |
Moved the bulk of the serial code to the assembly library, for inclusion in other utilities. Fixed a bug in int13h.asm when floppy support was not enabled that was preventing foreign drives from working properly.
|
File size:
1.1 KB
|
Rev | Line | |
---|
[150] | 1 | ; Project name : XTIDE Universal BIOS
|
---|
| 2 | ; Description : Sets Serial Device specific parameters to DPT.
|
---|
| 3 |
|
---|
| 4 | ; Section containing code
|
---|
| 5 | SECTION .text
|
---|
| 6 |
|
---|
| 7 | ;--------------------------------------------------------------------
|
---|
| 8 | ; SerialDPT_Finalize
|
---|
| 9 | ; Parameters:
|
---|
| 10 | ; DS:DI: Ptr to Disk Parameter Table
|
---|
| 11 | ; ES:SI: Ptr to 512-byte ATA information read from the drive
|
---|
| 12 | ; Returns:
|
---|
[258] | 13 | ; CF: Set, indicates that this is a floppy disk
|
---|
| 14 | ; Clear, indicates that this is a hard disk
|
---|
[150] | 15 | ; Corrupts registers:
|
---|
[242] | 16 | ; AX
|
---|
[150] | 17 | ;--------------------------------------------------------------------
|
---|
[179] | 18 | SerialDPT_Finalize:
|
---|
[277] | 19 | mov ax, [es:si+SerialServer_ATA_wPortAndBaud]
|
---|
[242] | 20 | mov [di+DPT_SERIAL.wSerialPortAndBaud], ax
|
---|
[258] | 21 |
|
---|
| 22 | ;
|
---|
| 23 | ; Note that this section is not under %ifdef MODULE_SERIAL_FLOPPY. It is important to
|
---|
[277] | 24 | ; distinguish floppy disks presented by the server and not treat them as hard disks, even
|
---|
[258] | 25 | ; if the floppy support is disabled.
|
---|
| 26 | ;
|
---|
[277] | 27 | mov al, [es:si+SerialServer_ATA_wFloppyFlagAndType]
|
---|
[258] | 28 | or al, FLGH_DPT_SERIAL_DEVICE
|
---|
| 29 | or byte [di+DPT.bFlagsHigh], al
|
---|
| 30 |
|
---|
| 31 | test al, FLGH_DPT_SERIAL_FLOPPY ; clears CF
|
---|
| 32 | jz .notfloppy
|
---|
| 33 | stc
|
---|
| 34 | .notfloppy:
|
---|
| 35 |
|
---|
[179] | 36 | ret
|
---|
| 37 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.