•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 397,880 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,703 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Assembly advertiser:
Views: 9193 | Replies: 1
![]() |
•
•
Join Date: Mar 2006
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
This is what I have and think it is correct but the result shows up as all spaces... Im lost... Any help would be great. Thanks
0:000> ******************** process_strings.dbg
0:000> da message
*** WARNING: Unable to verify checksum for process_strings.exe
00404000 "You can't always get what you wa"
00404020 "nt"
0:000> da result
00404023 " "
00404043 " "
0:000> q
quit:
Code I have
TITLE process_strings
.586
.MODEL flat,stdcall
ExitProcess PROTO, ExitCode
WORD
.data
message BYTE "you cant always get what you want",0
result BYTE SIZEOF message DUP("?"),0
.code
public fini
loop4 PROC
;----------Copy the string message to result
mov ebx,0
mov ecx,LENGTHOF message
next_char: mov al,message[ebx]
mov result[ebx],al
add al,32h
inc ebx
loop next_char
fini:: push 0
call ExitProcess
loop4 ENDP
END loop4
0:000> ******************** process_strings.dbg
0:000> da message
*** WARNING: Unable to verify checksum for process_strings.exe
00404000 "You can't always get what you wa"
00404020 "nt"
0:000> da result
00404023 " "
00404043 " "
0:000> q
quit:
Code I have
TITLE process_strings
.586
.MODEL flat,stdcall
ExitProcess PROTO, ExitCode
WORD.data
message BYTE "you cant always get what you want",0
result BYTE SIZEOF message DUP("?"),0
.code
public fini
loop4 PROC
;----------Copy the string message to result
mov ebx,0
mov ecx,LENGTHOF message
next_char: mov al,message[ebx]
mov result[ebx],al
add al,32h
inc ebx
loop next_char
fini:: push 0
call ExitProcess
loop4 ENDP
END loop4
next_char: mov al,message[ebx] mov result[ebx],al add al,32h

mov al,message[ebx] sub al,32 mov result[ebx],al
mov al,message[ebx] and al,0DFh mov result[ebx],al
You need to add some sanity checks:next_char: mov al,message[ebx] cmp al,'a' jb no_change cmp al,'z' ja no_change and al,0DFh no_change: mov result[ebx],al inc ebx loop next_char
Member of: Beautiful Code Club.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Assembly Marketplace
- convert lower case letters to uppercase and vice-versa (C++)
- need help with tricky string modyfication (C)
- Edit1->Text (Iterate over text -Rather Urgent (C++)
- Upper Case Letters (Python)
- How DO you count Upper Case letters? (Java)
Other Threads in the Assembly Forum
- Previous Thread: is this code Right and why
- Next Thread: Give a try....



Linear Mode