Changeset 104
- Timestamp:
- Apr 8, 2017, 12:27:01 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bootcode/regular/driveio.asm
r103 r104 257 257 adc bx,0 ; and high part of LBA address 258 258 or cl,63 ; Adjust CHS part !FIX ME for > 63! !! FIX HUGE DRIVE !! 259 ret 260 261 262 ;;jmp bliep 263 ;; pusha 264 265 ;; push dx 266 ;; push bx 267 ;; xor dh,dh 268 ;; and dl,01111111b 269 ;; shl dx,1 270 ;; shl dx,1 271 ;; mov bx, offset [TrueSecs] 272 ;; add bx,dx 273 ;; mov ax,word ptr [bx] 274 ;; pop bx 275 ;; pop dx 276 277 278 ; 279 ; AX now contains LVM secs 280 ; 281 282 283 ;; pusha 284 ;; push dx 285 ;; ; Location of extended position 286 ;; mov dx,word ptr [ExtendedAbsPos+02] 287 ;; mov ax,word ptr [ExtendedAbsPos+00] 288 ;; ;call AuxIO_TeletypeHexDWord 289 ;; ;call AuxIO_TeletypeNL 290 ;; pop dx 291 292 ;; xor dh,dh 293 ;; and dl,01111111b 294 ;; shl dx,1 295 ;; shl dx,1 296 ;; mov bx, offset [TrueSecs] 297 ;; add bx,dx 298 ;; mov ax, word ptr[bx] 299 300 ;call AuxIO_TeletypeHexWord 301 ;call AuxIO_TeletypeNL 302 ;; mov al,[ExtendedAbsPosSet] ; if true -> 1st sector of extpart (EBR), not logpart(BPB) 303 ;call AuxIO_TeletypeHexByte 304 ;call AuxIO_TeletypeNL 305 ;mov si,offset PartitionSector 306 ;call AuxIO_DumpSector 307 ;; popa 308 309 ; LBA 310 ;mov si,offset before_lvm_adjust 311 ;call AuxIO_Print 312 313 ;xchg dx,bx 314 ;call AuxIO_TeletypeHexDWord 315 ;call AuxIO_TeletypeNL 316 ;xchg bx,dx 317 ;; popa 318 319 320 ;;bliep: 321 322 ;or bx,ax 323 ;; test byte ptr [ExtendedAbsPosSet],1 324 ;; jz pri 325 326 327 ;; push dx 328 ;; push bx 329 330 ;; xor dh,dh 331 ;; and dl,01111111b ; Strip high bit from disk 332 ;; shl dx,1 ; Convert to index 333 ;; shl dx,1 ; into TrueSecs table 334 ;; mov bx,offset [TrueSecs] ; Base of table 335 ;; add bx,dx ; Point to entry for disk 336 ;; mov dx,[bx] ; Get TrueSecs (LVM) 337 ;; dec dx 338 ;; add ax,dx 339 340 ;; pop bx 341 ;; pop dx 342 ;; adc bx,0 343 344 345 ;; jmp done 346 347 348 349 ;; pri: 350 351 352 ;; push ax 353 ;; push cx 354 ;; xor ch, ch ; Zero out upper-byte 355 356 ;; push dx 357 ;; xor dh,dh 358 ;; and dl,01111111b 359 ;; shl dx,1 360 ;; shl dx,1 361 362 ;; push bx 363 ;; mov bx,offset [TrueSecs] 364 ;; add bx,dx 365 ;; mov ax,[bx] 366 ;mov [ts2],ax 367 ;; pop bx 368 ;; pop dx 369 370 371 372 ;~ mov al, 63 373 ;~ call VideoIO_PrintByteDynamicNumber 374 ;~ self: jmp self 375 376 377 378 ; DEZE WERKT SOMS NIET GOED 379 ; ROMMELT MET CYLINDERS 380 ; ALLEEN TOEPASSEN ALS INT13X NIET ACTIEF ! 381 382 ;; and cl, al ; Isolate lower bits, because upper 383 ;; mov ah, 0 384 ;; mov si, ax ; ones may be used for cylinder 385 ;; sub si, cx 386 387 ;; pop cx 388 ;; pop ax 389 390 ;; or cl, al ; Set sector to last sector 391 ;; add ax, si ; Adjust lower LBA 392 ;; adc bx, 0 ; Adjust LBA Sector (BX:AX) 393 394 395 396 ;~ push ax 397 ;~ call AuxIO_TeletypeHexWord 398 ;~ call AuxIO_TeletypeNL 399 ;~ mov ax,[ts] 400 ;~ call AuxIO_TeletypeHexWord 401 ;~ call AuxIO_TeletypeNL 402 ;~ mov ax,[ts2] 403 ;~ call AuxIO_TeletypeHexWord 404 ;~ call AuxIO_TeletypeNL 405 ;~ pop ax 406 407 ;~ and ax,[ts] 408 409 ;; jmp done 410 411 412 413 ;; done: 414 415 ;pusha 416 ;mov si,offset after_lvm_adjust 417 ;~ call AuxIO_Print 418 ; LBA 419 ;xchg dx,bx 420 ;~ call AuxIO_TeletypeHexDWord 421 ;~ call AuxIO_TeletypeNL 422 ;xchg bx,dx 423 ;popa 424 425 ;~ pusha 426 ;~ call AuxIO_TeletypeNL 427 ;~ 428 ;~ ; CYL 429 ;~ mov al,ch 430 ;~ call AuxIO_TeletypeHexByte 431 ;~ call AuxIO_TeletypeNL 432 ;~ 433 ;~ ; HEAD 434 ;~ mov al,dh 435 ;~ call AuxIO_TeletypeHexByte 436 ;~ call AuxIO_TeletypeNL 437 ;~ 438 ;~ ; SEC 439 ;~ mov al,cl 440 ;~ call AuxIO_TeletypeHexByte 441 ;~ call AuxIO_TeletypeNL 442 ;~ 443 ;~ ; DRIVE 444 ;~ mov al,dl 445 ;~ call AuxIO_TeletypeHexByte 446 ;~ call AuxIO_TeletypeNL 447 ;~ popa 448 449 ;; ret 259 260 261 ret 262 450 263 DriveIO_LVMAdjustToInfoSector EndP 451 264
Note:
See TracChangeset
for help on using the changeset viewer.