「NASM」- attempt to reserve non-constant quantity of BSS space

问题描述

在执行 nasm 命令时,产生如下错误:

# nasm ipl.nas
ipl.nas:52: error: attempt to reserve non-constant quantity of BSS space

问题原因

汇编语法错误,参考 NASM 手册。

$,当前位置;$$,当前段位置;$ – $$,当前位置距离段开始的偏移位置

参考文献

assembly – How does $ work in NASM, exactly? – Stack Overflow
Ubuntu 18.04で30日OS自作入門をやりたい[1日目] – free(malloc(sizeof(MRM)));
「30天自制操作系统」Day1 – 从计算机结构到汇编程序入门 | Poeroz’s blog