LODSB
Usage: LODSB Modifies flags: None
Transfers string byte addressed by ESI (even if an operand is supplied) to the accumulator. ESI is incremented based on the size of the operand or based on the instruction used. Use with REP prefixes.
Load from String
LODSB ; AC [8086]
LODSW ; o16 AD [8086]
LODSD ; o32 AD [386]
LODSB loads a byte from ESI into AL. It then increments or decrements (depending on the direction flag: increments if the flag is clear, decrements if it is set) ESI.
LODSW and LODSD work in the same way, but they load a word or a doubleword instead of a byte, and increment or decrement the addressing registers by 2 or 4 instead of 1.
EXAMPLE:
L0: cmp ecx D$CaretLine | je L2
On ecx > D$LineNumber, ret
L1: lodsb | cmp al LF | jne L1<
inc ecx | jmp L0<