gpt4 book ai didi

assembly - 使用 NASM 在 64 位模式下不支持 pop 指令?

转载 作者:行者123 更新时间:2023-12-02 15:23:35 24 4
gpt4 key购买 nike

我正在使用 NASM following this tutorial 开发一个更深入的 hello world (第 4 节)。本教程主要教您如何处理命令行输入。
这是相关代码的片段:

section .text
global _start

_start:
pop ebx ; arg count
pop ebx ; arg[0] the program name
pop ebx ; arg[1-n] the remainder of the args
; must each be indiviually popped

代码在编译过程中出错,并显示错误:64位模式下不支持指令,引用上面的3条弹出指令。 Upon viewing the docs看来这段代码只适用于32位系统。

是否有 64 位 pop 指令?有谁有使用 pop 的 64 位教程可供我查看吗?

最佳答案

是的,64 位 pop 指令是... POP。 :-) 不过,您需要针对 64 位寄存器使用它(例如 rbx)。

关于assembly - 使用 NASM 在 64 位模式下不支持 pop 指令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10953418/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com