- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在使用 Bochs 2.4.5 编写引导扇区代码。我使用 INT 13H 从软盘读取扇区。但我发现如果要读取的扇区计数 > 72,则 INT13 将失败。返回码为 AH=1。下面是代码,这里是 INT13 .返回码为 AH=1。
为什么 INT 13H 不能读取超过 72 个扇区?
xorb %ah, %ah
xorb %dl, %dl
int $0x13 # reset the floppy
movw $0x8000, %ax
movw %ax,%es
movw $0, %bx # ES:BX is the buffer
movb $0x02, %ah
movb $73, %al # how many sectors to read. 72 is ok, but >=73 is wrong.
movb $0, %ch
movb $1, %cl
movb $0, %dh
movb $0, %dl
int $0x13
感谢您的帮助。
正在关注 Matthew Slattery 的指令,找到了对应的代码。我把它列在这里是为了和我一样困惑的人。完整代码位于 here .
7220 if ((drive > 1) || (head > 1) || (sector == 0) ||
7221 (num_sectors == 0) || (num_sectors > 72)) {
7222 BX_INFO("int13_diskette: read/write/verify: parameter out of range\n");
7223 SET_AH(1);
7224 set_diskette_ret_status(1);
7225 SET_AL(0); // no sectors read
7226 SET_CF(); // error occurred
7227 return;
7228 }
最佳答案
您正在使用 Bochs,因此可以在 Bochs BIOS source 中找到答案: BIOS 正在对扇区数执行显式范围检查,如果大于 72(或等于 0)则拒绝检查。
关于c - AH=2的BIOS INT 13H每次只能读取72个扇区。为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3645803/
在进行 BIOS 开发时,我看到了对英特尔 BIOS 引用设计和英特尔固件支持包 (FSP) 的引用。英特尔是否积极支持两者,或者引用设计正在逐步淘汰以支持 FSP。 最佳答案 为了创建 FSP,引用
我知道有一些程序,比如 lojack 用于安装在 BIOS 上的笔记本电脑,但我仍然有点困惑。在阅读有关 lojack 的信息时,在我看来,在用户登录并尝试访问互联网之前,他们无法完全定位笔记本电脑的
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 8年前关闭。 Improve thi
我对 BIO 例程 BIO_read()/BIO_write() 和 SSL_read()/ 之间的区别感到困惑SSL_write() 当 BIO 是内存 BIO 而不是套接字 BIO 时。 我正在尝
我想知道什么样的序列号wmic bios get serialnumber Windows命令实际上给了你什么? 是你主板的序列号吗?文档对此不清楚。 最佳答案 wmic bios get seria
我正在尝试使用 OpenSSL 在 C++ 中创建一个简单的 FTP/FTPS 客户端实现。我已经设法使用 BIO API 与普通 FTP 一起工作。现在的问题是:一旦我有一个不安全的连接和 BIO
pe启动acpl bios error是一个非常简单解决的问题,一般都是主板不支持支持ACPI造成的,只要禁用一下就可以解决了,想要解决的用户可以来看看详细的内容。 pe启动acpl b
这里是代码的上下文: void THREAD_CC server_thread(void *arg) { BIO *client = (BIO *)arg; ... } 表达式
我正在使用 UEFI EDK2 创建 BIOS。我修改了 FDF 以将驱动程序(UEFI 和旧版本)从主固件卷移动到我严格创建的单独固件卷 (FV) 以保存驱动程序。 在我从主 FV 移动驱动程序之前
我们正在运行 32 位和 64 位的 windows xp pro service pack 3。我们正在使用 WMI 来获取 BIOS 制造商和型号,但我们确实更喜欢使用 Win32 API 或汇编
OpenSSL 中的 BIO 对到底是什么?它的用途是什么?我已经检查过 OpenSSL 文档,但任何细节都很少。 最佳答案 OpenSSL 中的 BIO 类似于文件句柄。您可以使用一对它们来安全地相
在此示例代码中: BIO *bio1 = BIO_new(BIO_s_mem()); BIO *bio2 = BIO_new(BIO_s_mem()); SSL_set_bio(ssl, bio1,
我试图将 QEMU 与我正在构建的内核 ISO 一起使用,但我无法运行测试。 我使用的是 Windows 10 64 位,并添加了 pc-bios如果这很重要,请将文件夹添加到 PATH。 到目前为止
我处于不幸的情况,我需要使用 BIOS 未在 ia32 功能控制 MSR 寄存器中启用的 CPU 功能。 BIOS 确实设置了锁定位,因此我无法自己设置该位。 BIOS (Asus UEFI BIOS
我升级了我的 mac 安装,Mountain Lion 10.8.4,但现在每次我尝试加载 Android AVD 时“Eclipse”都会出错。返回的错误是这样的: qemu: 无法加载 PC BI
下面是一些示例代码,展示了我如何使用 OpenSSL: BIO *CreateMemoryBIO() { if (BIO *bio = BIO_new(BIO_s_mem())) {
BIOS 是用汇编语言编写的,机器只能理解二进制文件。 BIOS 是系统启动时加载到内存中的第一个程序。什么编译BIOS生成二进制文件? 最佳答案 BIOS 工程师用 x86 汇编语言编写 BIOS,
使用 OpenGL VBO 时,您可以交错数据 例如,您甚至可以将顶点数据与供 CPU 而不是 GPU 使用的其他数据交错。 交错是有助于还是阻碍主流独立显卡和集成显卡的性能? 最佳答案 一般的答案是
我目前正在编写一个引导加载程序,旨在加载一个比引导扇区允许的时间更长的程序。但是,每次运行程序(我在Virtualbox和QEMU中都测试过),磁盘读取失败,磁盘重置也失败。 bootloader 被
我正在开发一个操作系统项目,使用 isolinux (syslinux 4.5) 作为引导加载程序,加载我的内核与组织在 0x200000 的多重引导头文件。 据我所知,内核已经处于 32 位保护模式
我是一名优秀的程序员,十分优秀!