小编ckc*_*ter的帖子

为什么我不能在 C 中使用 `section .data:` 和 `section .text:` 创建一个长度超过 61 个字符的字符数组?

我正在按照本教程制作一个简单的 32 位操作系统。我已经到了第 4 节,我正在写入帧缓冲区。基本上我正在尝试创建自己的 println 函数。这是我的函数的代码:

/** fb_write_cell:
 * Writes a character with the given foreground and background to position i
 * in the framebuffer.
 *
 * @param i The location in the framebuffer
 * @param c The character
 * @param fg The foreground color
 * @param bg The background color
 */
static void fb_write_cell(unsigned int i, char c, unsigned char fg, unsigned bg) {
  fb[i] = c;
  fb[i + 1] = ((fg & 0x0F) << 4) …
Run Code Online (Sandbox Code Playgroud)

x86 assembly gcc nasm osdev

2
推荐指数
1
解决办法
237
查看次数

标签 统计

assembly ×1

gcc ×1

nasm ×1

osdev ×1

x86 ×1