我正在寻找总和用户输入的整数。我通过使用比较和跳转设置了一个循环。这是我接近它的方式,但我无法让它工作。
;====Display message asking user========
mov qword rdi, stringformat
mov qword rsi, promptfloatnumber
mov qword rax, 0
call printf
;====Input number========
push qword 0
mov qword rdi, floatinputformat
mov qword rsi, rsp
mov qword rax, 0
call scanf
pop r14
;===== Copy input to SSE======
push r14
movsd xmm1, [rsp]
pop rax
;=== Keeps a total count throughout the loops? =====
addsd xmm0,xmm1 ;xmm0 = xmm0 + xmm1
;Then it jumps back up if user wants to input more values
那我只需要显示 xmm0 总对吗?我不知道该怎么做。我尝试过这样的事情。
mov rdi, formatfloatdecimaloutput
mov qword rax, 1
call printf