Question: ( a ) Learn about the various bit operators: AND, OR , XOR, NOT Type the examples as shown in class. Usage: Convert Uppercase letters

(a) Learn about the various bit operators: AND, OR, XOR, NOT
Type the examples as shown in class.
Usage: Convert Uppercase letters to LowerCase and vice versa.
ToDo: Do the LowerCase procedure on your own.(similar to the way its shown in class).(4 points)
**Here is my work so far but im having trouble converting the letters to lower case. i thought it would be as simple as inserting 0FDh but i was wrong. please help :)
Include Irvine32.inc
;Uppercase to lowercase
.386
.model flat,stdcall
.stack 4096
ExitProcess proto,dwExitCode:dword
.data
source byte "Hello JJDDH222 me OPASH kHHHHsdf!!",0
target byte SIZEOF source DUP(0)
sz dword ?
.code
main proc
mov edx, offset source
call writestring ;displays original msg
call converttoUC
call crlf
call crlf
mov edx, offset source
call writestring ;displays new version of msg
invoke ExitProcess,0
converttoUC proc
mov ecx, sizeof source
dec ecx ;do one less because of null 0
mov esi, 0
LP:
mov AL, source[esi] ;initialize esi to 0
OR AL,20h ;used 20h because its equal to 00100000b
mov source[esi], AL
inc esi ;increase esi to move to the next letter
loop LP
ret
converttoUC endp
invoke ExitProcess,0
main ENDP
END main

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!