这是16位,实模式下,NASM。这些nasm堆栈推动之间有什么区别?
; ---- variables ------
cursorRow db 1
.
.
.
; what are the differences between these two pushes?
push cursorRow ; is this the address of?
push [cursorRow] ; is this the value of?
我无法改变这个变量在函数中cursorRow是一个参数。 我发布的问题是相关的:Updating variable that lives in the data segment from the stack and its segment
我认为这些都将取决于你的汇编推cursorRow的*值*(你可以随时拆卸文件肯定知道)。 'mov ax,offset cursorRow;推斧头应至少推送地址。 'lds si,[cursorRow];推动ds;推si'应该推远指针,但是我做了多段的16位程序已经有一段时间了。 – user786653
我使用NASM,它没有关键字作为据我所知偏移。昨晚我得到了我的程序通过下面的指令推cursorRow的地址工作:'推cursorRow' – TheFuzz
你看过nasmdoc?我记得有一段专门描述这部分与其他汇编器如MASM和TASM不同。 –