- Timestamp:
- Oct 28, 2012, 12:42:26 PM (12 years ago)
- google:author:
- aitotat@gmail.com
- Location:
- trunk/XTIDE_Universal_BIOS_Configurator_v2/Src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/BiosFile.asm
r376 r484 167 167 call Buffers_GenerateChecksum 168 168 call Buffers_GetFileBufferToESDI 169 mov ax, [cs:g_cfgVars+CFGVARS.wImageSizeInWords] 170 call EEPROM_GetSmallestEepromSizeInWordsToCXforImageWithWordSizeInAX 171 xor dx, dx 172 shl cx, 1 173 rcl dx, 1 ; WORDs to BYTEs 169 call EEPROM_GetXtideUniversalBiosSizeFromESDItoDXCX 174 170 175 171 mov al, FILE_ACCESS.WriteOnly -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/Buffers.asm
r457 r484 210 210 Buffers_GenerateChecksum: 211 211 push es 212 213 call Buffers_GetFileBufferToESDI 214 mov ax, [cs:g_cfgVars+CFGVARS.wImageSizeInWords] 215 call EEPROM_GetSmallestEepromSizeInWordsToCXforImageWithWordSizeInAX 216 shl cx, 1 ; Words to bytes 212 push dx 213 214 call Buffers_GetFileBufferToESDI 215 call EEPROM_GetXtideUniversalBiosSizeFromESDItoDXCX 217 216 dec cx ; Leave space for checksum byte 218 217 xor ax, ax … … 225 224 mov [es:di], al 226 225 226 pop dx 227 227 pop es 228 228 ret -
trunk/XTIDE_Universal_BIOS_Configurator_v2/Src/EEPROM.asm
r376 r484 44 44 45 45 ;-------------------------------------------------------------------- 46 ; EEPROM_GetSmallestEepromSizeInWordsToCXforImageWithWordSizeInAX47 ; Parameters:48 ; AX: Image size in WORDs49 ; Returns:50 ; CX: Required EEPROM size in WORDs51 ; CF: Set if EEPROM size found52 ; Cleared if no valid EEPROM found53 ; Corrupts registers:54 ; BX55 ;--------------------------------------------------------------------56 ALIGN JUMP_ALIGN57 EEPROM_GetSmallestEepromSizeInWordsToCXforImageWithWordSizeInAX:58 mov bx, g_rgwEepromTypeToSizeInWords59 mov cx, NUMBER_OF_EEPROM_TYPES60 ALIGN JUMP_ALIGN61 .CheckNextEepromSize:62 cmp ax, [cs:bx]63 jbe SHORT .ReturnEepromSizeInCX64 inc bx65 inc bx66 loop .CheckNextEepromSize67 ret ; Return with CF cleared (none of the supported EEPROMs are large enough)68 ALIGN JUMP_ALIGN69 .ReturnEepromSizeInCX:70 mov cx, [cs:bx]71 stc72 ret73 74 75 ;--------------------------------------------------------------------76 46 ; EEPROM_LoadXtideUniversalBiosFromRomToRamBufferAndReturnSizeInDXCX 77 47 ; Parameters: … … 87 57 88 58 call EEPROM_FindXtideUniversalBiosROMtoESDI 89 call .GetXtideUniversalBiosSizeFromEStoDXCX59 call EEPROM_GetXtideUniversalBiosSizeFromESDItoDXCX 90 60 xor si, si ; Load from beginning of ROM 91 61 call LoadBytesFromRomToRamBuffer 92 62 93 call .GetXtideUniversalBiosSizeFromEStoDXCX63 call EEPROM_GetXtideUniversalBiosSizeFromESDItoDXCX 94 64 pop es 95 65 ret 96 66 67 97 68 ;-------------------------------------------------------------------- 98 ; .GetXtideUniversalBiosSizeFromEStoDXCX69 ; EEPROM_GetXtideUniversalBiosSizeFromESDItoDXCX 99 70 ; Parameters: 100 ; Nothing71 ; ES:DI: Ptr to XTIDE Universal BIOS 101 72 ; Returns: 102 73 ; DX:CX: Bios size in bytes … … 105 76 ;-------------------------------------------------------------------- 106 77 ALIGN JUMP_ALIGN 107 .GetXtideUniversalBiosSizeFromEStoDXCX:78 EEPROM_GetXtideUniversalBiosSizeFromESDItoDXCX: 108 79 xor dx, dx 109 eMOVZX cx, [es: ROMVARS.bRomSize]80 eMOVZX cx, [es:di+ROMVARS.bRomSize] 110 81 eSHL_IM cx, 9 ; *= 512 for byte count 111 82 ret
Note:
See TracChangeset
for help on using the changeset viewer.