小编use*_*277的帖子

Y86 编译器中出现“找不到标签”错误

我正在用 Y86 编写一个程序,但我在设置堆栈和基指针的代码行中不断收到错误“找不到标签”。我的代码是:

.pos 0

init: 
    irmovl Stack, %esp  //Set up stack pointer
    irmovl Stack, %ebp  //Set up base pointer
    call main       //call main program
    halt            //Terminate program
Run Code Online (Sandbox Code Playgroud)

这就是我的笔记中的显示方式,但是当我尝试编译时,我得到了

Error on line 8: Can't find label
Line 8, Byte 0x0006:    irmovl stack, %esp  //Set up stack pointer
Error on line 9: Can't find label
Line 9, Byte 0x000c:    irmovl stack, %ebp  //Set up base pointer
Run Code Online (Sandbox Code Playgroud)

我尝试将 .pos 0 行放入 init 函数中(我认为这可能会有所帮助),并简单地取消 init: 行,但我仍然遇到同样的问题。

label compilation init y86

4
推荐指数
1
解决办法
1634
查看次数

标签 统计

compilation ×1

init ×1

label ×1

y86 ×1