-
Dec 9th, 2005, 02:17 PM
#1
Thread Starter
Junior Member
need help with assembly program
hi, does anyone know how to write an assembly language program that accepts uppercase user input and converts it to lowercase in debug.exe?
-
Dec 12th, 2005, 05:26 PM
#2
Thread Starter
Junior Member
Re: need help with assembly program
here i find out how to get user input. i need to find out how i can convert A-Z into a-z. if you know anything, please let me know.
c:\>debug
-a100
178E:0100 mov ah,01;
178E:0102 int 21;
178E:0102 cmp al,0d;
178E:0106 jnz 0100;
178E:0108 mov ah,02;
178E:010A mov dl,al;
178E:010C int 21;
178E:010E int 20;
178E:0110
-w
(W)rite error, no destination defined
-h 0110 - 0100
^ Error
-h 0110-0100
^ Error
-h0110-0100
^ Error
-h
^ Error
-rcx 0010
^ Error
-rcx
CX 0000
:0010
-n text.com
-w
Writing 00010 bytes
-g
-
Dec 13th, 2005, 04:03 PM
#3
Re: need help with assembly program
Code:
.MODEL tiny
.STACK 256
.386
.CODE
main PROC
mov cx, 10 ; read 10 characters
L1:
mov ah, 7 ; wait for a character
int 21h
mov dl, al ; move the user's character into the output register
or dl, 00100000b ; to lowercase
mov ah, 6
int 21h ; display the lowercase version
Loop L1
mov ah, 4Ch ; exit
mov al, 0
int 21h
main ENDP
END main
I threw this together just now... the red bit is what you are interested in. This whole program lets you type in 10 characters but filters out all UPPERCASE chars
Rep it if its useful.
I don't live here any more.
-
Dec 13th, 2005, 09:42 PM
#4
Thread Starter
Junior Member
Re: need help with assembly program
is it somthing like this?
a100
mov ah,01
int 21
cmp al,0d
jnz 0100
mov ah,02
mov dl,al
int 21
mov ah,7
int 21h
mov dl,al
mov ah,6
int 21h
int 21
int 20
rcx
18
w
q
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|