這是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不同。 –