小编avc*_*ado的帖子

重新定位截断以适应:16 对“.text”

我希望你们度过了愉快的一天。我有一个关于将程序集编译为.bin. 我正在尝试使用这篇文章来修复它,但即便如此,我还是得到了`relocated truncation to fit: 16 against '.text'。

bootReal.s :

#generate 16-bit code
.code16

#hint the assembler that here is the executable code located
.text
.globl _start;
#boot code entry
_start:
      jmp _boot                           #jump to boot code
      welcome: .asciz "Hello, World\n\r"  #here we define the string

     .macro mWriteString str              #macro which calls a function to print a string
          leaw  \str, %si
          call .writeStringIn
     .endm

     #function to print the string
     .writeStringIn:
          lodsb
          orb  %al, %al
          jz   .writeStringOut …
Run Code Online (Sandbox Code Playgroud)

assembly gnu-assembler ld bootloader x86-16

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

标签 统计

assembly ×1

bootloader ×1

gnu-assembler ×1

ld ×1

x86-16 ×1