Changeset 397 in xtideuniversalbios for trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
- Timestamp:
- Apr 19, 2012, 11:11:41 AM (13 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/BootVars.asm
r395 r397 33 33 BootVars_Initialize: 34 34 ; Clear to zero 35 mov al, BOOTMENUINFO_size35 mov al, DRVDETECTINFO_size 36 36 mul BYTE [cs:ROMVARS.bIdeCnt] 37 mov di, BOOTVARS. hotkeyVars; We must not initialize anything before this!37 mov di, BOOTVARS.clearToZeroFromThisPoint ; We must not initialize anything before this! 38 38 add ax, BOOTVARS_size 39 39 sub ax, di -
trunk/XTIDE_Universal_BIOS/Src/VariablesAndDPTs/DrvDetectInfo.asm
r395 r397 23 23 24 24 ;-------------------------------------------------------------------- 25 ; Creates new BOOTMENUINFO struct for detected hard disk.25 ; Creates new DRVDETECTINFO struct for detected hard disk. 26 26 ; 27 ; BootMenuInfo_CreateForHardDisk27 ; DriveDetectInfo_CreateForHardDisk 28 28 ; Parameters: 29 29 ; DL: Drive number … … 31 31 ; ES:SI: Ptr to 512-byte ATA information read from the drive 32 32 ; Returns: 33 ; ES:BX: Ptr to BOOTMENUINFO (if successful)33 ; ES:BX: Ptr to DRVDETECTINFO (if successful) 34 34 ; Corrupts registers: 35 35 ; AX, BX, CX, DX, DI 36 36 ;-------------------------------------------------------------------- 37 BootMenuInfo_CreateForHardDisk:38 call BootMenuInfo_ConvertDPTtoBX ; ES:BX now points to new BOOTMENUINFO37 DriveDetectInfo_CreateForHardDisk: 38 call DriveDetectInfo_ConvertDPTtoBX ; ES:BX now points to new DRVDETECTINFO 39 39 40 40 ; Store Drive Name … … 46 46 47 47 add si, BYTE ATA1.strModel ; DS:SI now points drive name 48 lea di, [bx+ BOOTMENUINFO.szDrvName] ; ES:DI now points to name destination48 lea di, [bx+DRVDETECTINFO.szDrvName] ; ES:DI now points to name destination 49 49 mov cx, MAX_HARD_DISK_NAME_LENGTH / 2 ; Max number of WORDs allowed 50 50 .CopyNextWord: … … 63 63 64 64 ;-------------------------------------------------------------------- 65 ; BootMenuInfo_GetTotalSectorCount 66 ; Parameters: 67 ; DS:DI: DPT Pointer 68 ; Returns: 69 ; BX:DX:AX: 48-bit sector count 70 ; Corrupts registers: 71 ; CX 72 ;-------------------------------------------------------------------- 73 %ifdef MODULE_BOOT_MENU 74 BootMenuInfo_GetTotalSectorCount: 75 test BYTE [di+DPT.bFlagsLow], FLG_DRVNHEAD_LBA 76 jnz SHORT .ReturnFullCapacity 77 jmp AH15h_GetSectorCountToBXDXAX 78 .ReturnFullCapacity: 79 jmp AccessDPT_GetLbaSectorCountToBXDXAX 80 %endif 81 82 83 ;-------------------------------------------------------------------- 84 ; Returns offset to BOOTMENUINFO based on DPT pointer. 65 ; Returns offset to DRVDETECTINFO based on DPT pointer. 85 66 ; 86 ; BootMenuInfo_ConvertDPTtoBX67 ; DriveDetectInfo_ConvertDPTtoBX 87 68 ; Parameters: 88 69 ; DS:DI: DPT Pointer 89 70 ; Returns: 90 ; BX: Offset to BOOTMENUINFO struct71 ; BX: Offset to DRVDETECTINFO struct 91 72 ; Corrupts registers: 92 73 ; AX 93 74 ;-------------------------------------------------------------------- 94 BootMenuInfo_ConvertDPTtoBX:75 DriveDetectInfo_ConvertDPTtoBX: 95 76 mov ax, di 96 77 sub ax, BYTE RAMVARS_size ; subtract off base of DPTs 97 mov bl, DPT_ BOOTMENUINFO_SIZE_MULTIPLIER ; BOOTMENUINFO'sare a whole number multiple of DPT size78 mov bl, DPT_DRVDETECTINFO_SIZE_MULTIPLIER ; DRVDETECTINFO are a whole number multiple of DPT size 98 79 mul bl 99 add ax, BOOTVARS.rg BootNfo ; add base of BOOTMENUINFO80 add ax, BOOTVARS.rgDrvDetectInfo ; add base of DRVDETECTINFO 100 81 xchg ax, bx 101 82 ret
Note:
See TracChangeset
for help on using the changeset viewer.