【发布时间】:2016-02-28 18:20:06
【问题描述】:
我正在编写一个 nasm 程序,它使用预处理器的指令和宏简单地打印一个字符串。代码如下:
%define hello "Hello, world!"
%strlen size_h hello
%macro print 2
mov eax, 4
mov ebx, 1
mov ecx, %1
mov edx, %2
int 80h
%endmacro
section .text
global _start
_start:
print hello, size_h
mov eax, 1
mov ebx, 0
int 80h ;exit
我正在使用 ld 链接器。
它向我显示了两个警告:
character constant too long
dword data exceeds bounds
我该如何纠正这个问题?
【问题讨论】:
标签: linux string macros nasm 32-bit