1
我正在寫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
我如何糾正呢?
大!非常感謝! – sant016