
linux – 什么是汇编中的%gs
void return_input (void){ char array[30]; gets (array); printf(%sn, array); } 在gcc中编译之后,此函数将转换为以下程序集代码: push %ebpmov %esp,%ebpsub $0x28,%espmov %gs:0x14,%eaxmov %

如何从Linux上的汇编代码调用c库?
我正在尝试在英特尔架构上的 Linux程序集中编译一个小程序.我想使用C库的一些功能,但它没有链接. 这是我的装配程序: .text.globl mainmain: pushl $512 call malloc addl $4, %esp mov $1, %eax mov $0, %ebx int $0x80 我正在编译 as –32 -o

linux – 与nasm和ld的汇编/链接问题
我有一个用nasm编译的示例程序集文件: nasm -f elf syscall.asm 这会生成一个syscall.o文件.我尝试将它与ld链接: ld -o syscall syscall.o ld命令失败,并显示以下错误: ld: i386 architecture of input file `syscall.o is incompatible with i386:x86-64

汇编 – 我的.exe程序不是我的预期
我的masm源文件如下: qq.asm assume cs:codesegmentcodesegment segmentmov ax, 0ffffhmov ds, axmov al, 00ffhmov bx, 0006hmov [bx], almov al, [0006]mov ah, 0mov dx, 0mov cx, 3s: add dx, axloop smov a