这是我目前与NASM的问题。我一直在这里编译这段代码,但它只显示错误:
carry.asm:10: error: instruction not supported in 64-bit mode
这是我的代码:
section .text
global main
main:
mov rsi, 4
mov rcx, 5
clc
add_loop:
mov al, [num1 + rsi]
mov al, [num2 + rsi]
aaa
pushf
or al, 30h
popf
mov [sum + rsi], al
dec rsi
loop add_loop
mov rdx, len
mov rcx, msg
mov rbx, 1
mov rax, 4
int 0x80
mov rdx, 5
mov rcx, sum
mov rbx, 1
mov rax, 4
int 0x80
mov rax, 1
int 0x80
section .data
msg db 'The sum is:', 0xa
len equ $- msg
num1 db '12345'
num2 db '23456'
sum db ' '
我似乎无法弄清楚该做些什么。