酒鬼z

我自将心向明月,独卧沙场醉圆缺

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

1.

down vote accepted

DB - Define Byte. 8 bits

DW - Define Word. Generally 2 bytes on a typical x86 32-bit system

DD - Define double word. Generally 4 bytes on a typical x86 32-bit system

From x86 assembly tutorial,

The pop instruction removes the 4-byte data element from the top of the hardware-supported stack into the specified operand (i.e. register or memory location). It first moves the 4 bytes located at memory location [SP] into the specified register or memory location, and then increments SP by 4.

Your num is 1 byte. Try declaring it with DD so that it becomes 4 bytes and matches with pop semantics.

posted on 2013-08-26 09:37  酒鬼z  阅读(93)  评论(0)    收藏  举报