Answer by Dirk Wolfgang Glomp for Basic use of immediates vs. square brackets...
For all instruction with using immediate values as an operand for to write the value into a ram location (or for calculating within), we have to specify how many bytes we want to access. Because our...
View ArticleAnswer by Alexey Frunze for Basic use of immediates vs. square brackets in...
You are getting the idea. However, there are a few details worth bearing in mind:Addresses can and usually are greater than what 8 bits can hold (cl is 8-bit, cx is 16-bit, ecx is 32-bit, rcx is...
View ArticleAnswer by byrondrossos for Basic use of immediates vs. square brackets in...
Indeed, your thought is correct.That is, bl will contain 5 and cl the memory address of buffer(in fact the label buffer is a memory address itself).Now, let me explain the differences between the...
View ArticleAnswer by mtvec for Basic use of immediates vs. square brackets in YASM/NASM...
The square brackets essentially work like a dereference operator (e.g., like * in C).So, something likemov REG, xmoves the value of x into REG, whereasmov REG, [x]moves the value of the memory location...
View ArticleBasic use of immediates vs. square brackets in YASM/NASM x86 assembly
Suppose I have the following declared:section .bssbuffer resb 1And these instructions follow in section .text:mov al, 5 ; mov-immediatemov [buffer], al ; storemov bl, [buffer] ; loadmov cl, buffer ;...
View Article