MOV word, OFFSET text ; Moves the pointer to the address of the text LOOP_START: LODSB ; Loads a byte from the address pointed by SI into AL CMP AL, 0 ; Compares the loaded byte with zero JE END_LOOP ; Jumps to END_LOOP if the byte is zero ; Your byte processing code here JMP LOOP_START ; Jumps to the next byte END_LOOP: ; Your code after loop completion here