Changeset 139
- Timestamp:
- Apr 8, 2017, 12:27:35 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bootcode/regular/other.asm
r135 r139 176 176 call MBR_TeletypeNL 177 177 178 ;179 178 ; Write MBR back to disk to sync MBR variables. 180 179 ; Otherwise subsequent MBR loads will differ from the RAM stored one, 181 180 ; which is used by MBR protection to validate parts of the MBR. 182 ;183 181 xor bx, bx 184 182 mov cx, 1 … … 194 192 ;! 195 193 196 ; =============================================================================197 198 ; Start with disk at index 0199 xor cx,cx200 201 PRECRAP_Main_next_disk:202 203 ; Get next disk and convert to BIOS disk-number204 mov dl,cl205 or dl,80h206 207 ;208 ; This also setup the size of the i13xbuf.209 ;210 call DriveIO_GatherDiskInfo ; Also used to fill the geo, should be separate function211 212 mov bx,offset [HugeDisk]213 add bx,cx214 mov [bx], al215 216 217 ; CHECKSUM CALCULATION DOES NOT WORK YET HERE218 ; CRC TABLE NOT INITED YET219 ; Returns NC if no valid LVM record found220 call DriveIO_LoadMasterLVMSector221 222 pushf223 224 mov bx, offset [TrueSecs]225 add bx,cx226 add bx,cx227 add bx,cx228 add bx,cx229 230 IFDEF AUX_DEBUG231 IF 0232 pushf233 pusha234 mov al, '#'235 call AuxIO_Teletype236 mov ax, [bx]237 call AuxIO_TeletypeHexWord238 mov al, '#'239 call AuxIO_Teletype240 call AuxIO_TeletypeNL241 popa242 popf243 ENDIF244 ENDIF245 246 popf247 248 ; bx now contains pointer to truesecs for this drive249 250 jnc NoValidMasterLVM251 252 ; ?? 3f bij disk 80h maar 0 bij disk 81h253 mov si,offset [LVMSector]254 mov ax,[si+LocLVM_Secs]255 256 ;~ pusha257 ;~ mov dx,ax258 ;~ mov al,'%'259 ;~ call VideoIO_PrintSingleChar260 ;~ mov ax,dx261 ;~ call VideoIO_PrintHexWord262 ;~ mov al,'%'263 ;~ call VideoIO_PrintSingleChar264 ;~ popa265 266 mov word ptr [bx],ax267 jmp SkipUseBiosSecs268 269 270 NoValidMasterLVM:271 push bx ; push truesecs pointer272 mov bx, offset [BIOS_Secs]273 add bx,cx274 add bx,cx275 add bx,cx276 add bx,cx277 278 mov ax,[bx] ; get biossecs279 pop bx280 mov word ptr [bx],ax ; store bios secs in truesecs281 282 283 SkipUseBiosSecs:284 inc cx285 cmp cl,[TotalHarddiscs]286 jb PRECRAP_Main_next_disk287 288 ; =============================================================================289 194 290 195 IFDEF AUX_DEBUG … … 294 199 ENDIF 295 200 296 ;~ jz NoValidMasterLVM297 ;~298 ;~ ; A valid Master LVM has been found.299 ;~ ; We use the values in here to determine the number of sectors per track,300 ;~ ; since this could be OS/2 extended geometry.301 ;~302 ;~ jmp Continue1303 ;~304 ;~ mov word ptr [LOG_Secs],63305 306 ; mov al,[HugeDisk] ;; fout, moet nog index bij307 ; call AuxIO_TeletypeHexByte308 ; call AuxIO_TeletypeNL309 310 ; mov ax,word ptr [TrueSecs] ;; fout, moet nog index bij311 ; call AuxIO_TeletypeHexWord312 ; call AuxIO_TeletypeNL313 314 ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!315 316 ; Huge Disk indicator317 ;~ mov si, offset [HugeBootDisk]318 ;~ call MBR_Teletype319 ;~ mov al,[HugeDisk]320 ;~ mov si, offset [No]321 ;~ test al,al322 ;~ jz MBR_HugeDriveIndicator323 ;~ mov si, offset [Yes]324 325 MBR_HugeDriveIndicator:326 ;~ call MBR_Teletype327 ;~ xor si,si328 ;~ call MBR_TeletypeNL329 330 201 331 202 ; … … 346 217 call MBR_TeletypeNL 347 218 348 ; =============================================================================349 219 350 220 ; Calculate Cooper-Bar Tables
Note:
See TracChangeset
for help on using the changeset viewer.