I am writing a program in which the requirements are as follows:
Has a string variable called Name that is set to your full name, including spaces.
Clears the AL register only, NOT the rest of the EAX register.
Loops through each character in the Name variable.
Combines each character using the XOR command.
Stores the final XOR result in the AL register.
Includes a DumpRegs command at the end of the program.
I've been trying to get this correct and have been trying to use examples in the book, however, I just keep getting errors. Here is what I have:
INCLUDE Irvine32.inc
.data
name BYTE "Joe Smith" , 0 ;
temp BYTE SIZEOF name DUP(0)
.code
main PROC
mov al,0
mov esi,0
mov ecx,SIZEOF name
Combine:
xor al,name[esi]
inc esi
loop Combine
Call DumpRegs
exit ; exit to operating system
main ENDP
END main
And I am getting the errors: