在文章Say Hello to Assembly - Part 3中,作者想要在堆栈上打印一个字符串(转换后的整数)。 r12包含字符串中的数字个数。 ;;; Find length of string
mov rax, 1
mul r12
mov r12, 8 ; 8 times num digits to get len in bytes
mul r12
mov r
我下面的代码链接时收到以下错误,但我不明白为什么: ld -m elf_i386 shell.o -o test
shell.o: In function `_start':
shell.asm:(.text+0xbc): relocation truncated to fit: R_386_PC8 against `*UND*'
代码: SECTION .text
global _s
我想抓住FreeBSD中的汇编程序。在handbook's code example for a UNIX filter中,寄存器esp会在每次系统调用后重置。有问题的代码是: %include 'system.inc'
section .data
hex db 'ABCDEF'
buffer db 0, 0, ' '
section .text
global _start
_st