0

I am writing an assembly code on visual studios that takes the input of a users name and is suppose to covert the name to upper case and display it. Could you please help me. Here is what I got so far. Unfortunately the assembly code must stay in 32 or 64 bit and a 16 bit linker is unauthorized.

Include Irvine32.inc

.data

askName1    BYTE 32 DUP (0)
AskName  BYTE "Please enter your name: " ,0dh,0ah,0

.code
main PROC

mov     edx, OFFSET AskName
call        WriteString

lea     edx, AskName1
mov     ecx, Sizeof AskName1
Call    ReadString
Call    WriteString


push 0
call ExitProcess

main ENDP

END main
  • Does your program verbatim echo of the name which you have entered? If so, you're almost done. Just write code between `Call ReadString` and `Call WriteString` which will load each character from `askName1`, and if it is in the range **a..z**, convert the character to **A..Z** and store it back. – vitsoft Apr 26 '21 at 19:21
  • @vitsoft yes, the program does write out the inputed name verbatim. I'm just having trouble with the bit of trying to convert the name to uppercase. – WInslow11b Apr 26 '21 at 21:15
  • What's "unfortunate" about 32-bit or 64-bit mode? Do you know how you'd write the code for 16-bit mode? Fun fact, you could do all 32 bytes with one AVX2 vector, with only a couple operations. ([Convert a String In C++ To Upper Case](https://stackoverflow.com/q/735204)) – Peter Cordes Apr 27 '21 at 01:46
  • @PeterCordes nothings unfortunate about that. I'm just a scrub when it comes to MASM and some other sources gave me pointers to write it in 16 bit with a linker which I am not authorized to use. Thank you by the way I'll look into the link you sent. – WInslow11b Apr 27 '21 at 02:01

0 Answers0