相关疑难解决方法(0)

通过USB驱动器启动的自定义引导加载程序在某些计算机上产生错误的输出

我对装配很新,但我正试图深入了解低级计算的世界.我正在尝试学习如何编写将作为引导加载程序代码运行的汇编代码; 所以独立于任何其他操作系统,如Linux或Windows.在阅读了本页和其他几个x86指令集列表之后,我想出了一些汇编代码,它应该在屏幕上打印10 A然后是1 B.

      BITS 16
start: 
    mov ax, 07C0h       ; Set up 4K stack space after this bootloader
    add ax, 288     ; (4096 + 512) / 16 bytes per paragraph
    mov ss, ax
    mov sp, 4096

    mov ax, 07C0h       ; Set data segment to where we're loaded
    mov ds, ax

    mov cl, 10          ; Use this register as our loop counter
    mov ah, 0Eh         ; This register holds our BIOS instruction

.repeat:
    mov al, 41h         ; Put …
Run Code Online (Sandbox Code Playgroud)

x86 assembly usb-drive bios bootloader

6
推荐指数
2
解决办法
758
查看次数

标签 统计

assembly ×1

bios ×1

bootloader ×1

usb-drive ×1

x86 ×1