【发布时间】:2015-03-15 09:13:15
【问题描述】:
我有以下代码:
.global _launchProgram
_launchProgram:
push bp
mov bp, sp
push cs
mov bx, [bp + 4]
mov cs, bx
mov es, bx
eseg
call #0x0
pop bx
mov cs, bx
pop bp
ret
在这段代码中,我试图让它跳转到另一段代码并执行它。这段代码是从 C 中调用的,如下所示:
launchProgram(segment) //Here segment is an integer which holds the
//memory segment where I have loaded my code
因此,在这个函数中,我使 cs 寄存器等于段变量,并使用call 0x0 跳转到该段的开头。但是当我使用它运行它时:
as86 launchProgram.asm -o launchProgram.o
我收到以下错误:
00010 000C E8 0000 call #0x0
***** relocation impossible.................................^
为什么会出现这个错误?
【问题讨论】: