小编Wol*_*der的帖子

BIOS INT 13H 问题(从驱动器读取扇区)

描述:

在我努力创建一个简单的独立程序的过程中,我在第一个扇区中编写了一个简单的引导加载程序。它的目的是将程序加载到内存中。为此,我使用了 AH=2 的 INT 13h。代码是:

disk_load:
  push dx           ; Store DX on stack so later we can recall how many sectors were requested to be read,
                    ; even if it is altered in the meantime.
  mov ah, 0x02        ; BIOS read sector.
  mov al, dh          ; Read DH sectors.
  mov ch, 0x00        ; Select cylinder 0.
  mov dh, 0x00        ; Select head 0.
  mov cl, 0x02        ; Start reading from second sector (i.e. after the boot sector).
  int 0x13 …
Run Code Online (Sandbox Code Playgroud)

x86 assembly virtualbox bios bootloader

3
推荐指数
1
解决办法
556
查看次数

标签 统计

assembly ×1

bios ×1

bootloader ×1

virtualbox ×1

x86 ×1