OpenGL rebuild project start!
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+19
-21
@@ -1,21 +1,19 @@
|
||||
.code ; 代码段
|
||||
main proc frame
|
||||
mov rax, 1235321532151111
|
||||
mov rax, 0000000000000000
|
||||
mov rax, 1111451111451111
|
||||
sub rsp, 20h ; 分配32字节的栈空间,保证16字节对齐
|
||||
mov rax,rsp
|
||||
mov dword ptr [rax], 25 ; 将25存储在栈顶,作为p的低32位
|
||||
movdqu xmm0, [rax] ; 将栈顶的16字节加载到xmm0,作为p的值
|
||||
movdqu xmm1, [rax]
|
||||
movdqu xmm1, [rsp]
|
||||
sqrtss xmm0, xmm0 ; 计算xmm0的低32位的平方根,并存储在xmm1的低32位
|
||||
movdqu [rax], xmm0
|
||||
movdqu [rax], xmm1
|
||||
movdqu [rsp+16], xmm1 ; 将xmm1的值存储在栈顶+16字节的位置,作为q的值
|
||||
; 此时,q的值就在[rsp+16]处,可以用其他指令进行操作或返回
|
||||
add rsp, 32 ; 恢复栈指针
|
||||
.endprolog
|
||||
ret
|
||||
main endp
|
||||
end
|
||||
extern printf
|
||||
.data
|
||||
msg db "Hello, Asm!",0
|
||||
fmtstr db "This is our string: %s", 10, 0
|
||||
.bss
|
||||
.text
|
||||
global main
|
||||
main:
|
||||
push rbp
|
||||
mov rbp,rsp
|
||||
mov rsi,msg
|
||||
mov rax,0
|
||||
call printf
|
||||
mov rsp,rbp
|
||||
pop rbp
|
||||
mov rax,60
|
||||
mov rdi,0
|
||||
syscall
|
||||
end
|
||||
Binary file not shown.
Binary file not shown.
+134
-1248
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user