I am using the YASM assembler.
If I have a variable declared as such
segment .bss
number resb 100
and I perform a logical right shift like so
shr byte [number], 8
and if for example 123 is stored in there so that the memory looks like such 0x333231 then I expect the result to be 0x3332 but the result is instead 0x333200. This problem does not occur if I have the data stored in a register, could anyone explain to me why this occurs and how to fix it (I would like to use memory and not a register).