0

これは 16 ビット、リアル モード、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

4

2 に答える 2

1

cursorRowは値であり、[cursorRow]はロケーションcursorRowの値です。cursorRowのアドレスをスタックに配置する必要がある場合は、bp+1または変数の実際のアドレスをプッシュする必要があります。

于 2011-07-12T05:19:32.650 に答える