小编mdx*_*x97的帖子

无法从引导加载程序(NASM + GCC 工具链)调用实模式 C 函数

我正在尝试编写自己的操作系统内核,但在引导加载程序和(即将成为)我的内核(用 C 编写的)之间正确连接时遇到了一些问题。

我有以下代码...

src/bootloader.asm

; Allows our code to be run in real mode.
BITS 16
extern kmain

section .text
global _start
_start:
        jmp Start

; Moves the cursor to row dl, col dh.
MoveCursor:
    mov ah, 2
    mov bh, 0
    int 10h
    ret

; Prints the character in al to the screen.
PrintChar:
    mov ah, 10
    mov bh, 0
    mov cx, 1
    int 10h
    ret

; Set cursor position to 0, 0.
ResetCursor:
    mov dh, 0
    mov dl, …
Run Code Online (Sandbox Code Playgroud)

x86 assembly gcc osdev bootloader

5
推荐指数
1
解决办法
465
查看次数

标签 统计

assembly ×1

bootloader ×1

gcc ×1

osdev ×1

x86 ×1