Quick review,
- 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.
Related Posts:
- What’s the purpose of the LEA instruction?
- Understanding cmp instruction
- What does the MOVZBL instruction do in IA-32 AT&T syntax?
- What’s the purpose of the LEA instruction?
- need help understanding the movzbl call in this function
- How to move ST(0) to EAX?
- Assembly: How does fld st(0) duplicates the top stack value in the following code?
- What does the MOVZBL instruction do in IA-32 AT&T syntax?
- What’s the purpose of the LEA instruction?
- The difference between cmpl and cmp
- x86 cmpl and jne
- What is the function of the push / pop instructions used on registers in x86 assembly?
- Python conditional assignment operator
- C++ identifier is undefined
- What is callq instruction?
- Difference between JA and JG in assembly
- Display value found at given address gdb
- Purpose of ESI & EDI registers?
- What are the ESP and the EBP registers?
- IDIV operation in assembly (understanding)
- What is the PHP syntax to check “is not null” or an empty string?
- explanation about push ebp and pop ebp instruction in assembly
- x86 Assembly pointers
- x86 assembly: How does the ‘subl’ command work in AT&T syntax
- what does the cmpq instruction do?
- ISO C90 forbids mixed declarations and code in C
- Purpose of ESI & EDI registers?
- xorl %eax – Instruction set architecture in IA-32
- When and why do we sign extend and use cdq with mul/div?
- How do AX, AH, AL map onto EAX?
- JNZ & CMP Assembly Instructions
- X86 assembly – Handling the IDIV instruction
- What is the difference between MOV and LEA?
- `testl` eax against eax?
- Difference between JE/JNE and JZ/JNZ
- Printing out a number in assembly language?
- Character constant too long for its type
- Difference between JA and JG in assembly
- what does the the dword operand do in assembly
- error A2022: instruction operands must be the same size
- What is the meaning of @_ in Perl?
- Assembly Language – How to do Modulo?
- [Binary Bomb – Phase 4
- `js` and `jb` instructions in assembly
- Passing a variable to get_template_part
- What are all the Properties of the WordPress Post Object?
- Passing variables from header.php to template and vice verca
- When to use global $post and other global variables?
- WordPress variables and memory
- How to create custom variables in the wp-config
- Set cookie using GET variable
- {{ Double Curly Brace }} data.____ Variable Source in WP_Playlist Template
- What is the best way to store custom variables
- Setting Cookie Using a Variable from the URL
- WordPress filtering utm_ GET variables from url unless logged in as admin, not sure why?
- Using variable in two functions
- What is the $current_screen global variable?
- Print string to footer using wp_footer option
- How do I pass variables into short-code enabled Post Snippets in WordPress 3.0?
- Replacing string with a variable in php
- Why does a variable work on the front page but return NULL on all other pages?
- Variable scope producing undefined variable notices in included files
- Use to track referrals
- Can you keep session data for visitors?
- Result of API Request to global variable?
- Best way to pass variables around a WordPress site?
- How do I share variables between two functions?
- What is the use of $content_width?
- Passing a variable from a FOREACH loop in a link
- What does the Global Variable $s represent?
- Get current page id, title, url, etc
- keep a variable for all pages in memory from the url
- Retrieve custom variable
- Trying to create an edit page link?
- Cron Job variable not accessible
- No access to global variables?
- How to access a variable on all page?
- Not passing correct value to get_post_ancestors?
- Help me edit a variable with php
- Preventing Duplicating Posts from Widgets
- saving variables after redirect
- WP CLI – Pass Query / URL Variable to Cron?
- Use a select box to change a php variable
- Can’t access a variable defined in another template despite using GLOBAL
- How to pass a variable for key/value pairs in an argument?
- Where and how to define variables for URLs etc
- How to get variable from function.php to loop file
- Pass variable to next page
- passing javascript variable into php wordpress
- Remove # from a Variable [closed]
- How to pass post title (which could include &) to Gravity Form
- Variables posting twice
- Passing variables trough 2 pages
- update_option using variable name
- assign the returned value of wordpress function to a variable?
- Pass var into wp function instead of direct string text
- How do I echo saved data outside the function?
- Having problems accessing $_GET values
- How to pass variable to functions.php?
- Creating a Variable Product
whoah this blog is wonderful i really like reading your articles. Keep up the great paintings! You realize, a lot of people are hunting round for this info, you could help them greatly.
Very informative post ! There is a lot of information here that can help any business get started with a successful social networking campaign !