hello, i need help writing an assembly language program that accepts uppercase user input and converts it to lowercase in debug.exe
here i code written so far
-a100
13C8:0100 mov cx,ff
13C8:0103 mov dl,00
13C8:0105 mov ah,02
13C8:0107 int 21
13C8:0109 inc dl
13C8:010B dec cx
13C8:010C jcxz 110
13C8:010E jmp 107
13C8:0110 int 20
13C8:0112
-rcx
CX 0000
:12
-n input.com
-w
Writing 00012 bytes
-g
let me know if you know anything
here i code written so far
-a100
13C8:0100 mov cx,ff
13C8:0103 mov dl,00
13C8:0105 mov ah,02
13C8:0107 int 21
13C8:0109 inc dl
13C8:010B dec cx
13C8:010C jcxz 110
13C8:010E jmp 107
13C8:0110 int 20
13C8:0112
-rcx
CX 0000
:12
-n input.com
-w
Writing 00012 bytes
-g
let me know if you know anything
; program I---Use DOS ah=0ah int 21h
; Read and convert a string
dseg segment
buflen db 255
buf db 255 dup(?)
dseg ends
cseg sengment
assume cs:cseg,ds:dseg
start:
mov ax, dseg
mov ds, ax
;read a string
;--------------------
mov dx, offset buflen
mov ah, 0ah
int 21h
mov cx, buflen
mov bx, offset buf
@cmp:
mov dl, byte ptr
cmp dl, 'A'
jl @next
cmp dl, 'Z'
jg @next
add dl, 20h
mov byte ptr , dl
@next:
inc bx
loop @cmp
int 20h
cseg ends
end start
; program II---Use DOS ah=02h int 21h
; Read and convert a key
dseg segment
buf db 255 dup(?)
dseg ends
cseg sengment
assume cs:cseg,ds:dseg
start:
mov ax, dseg
mov ds, ax
mov cx, 255
mov bx, offset buf
@read:
;read a key
;--------------------
mov ah, 02h
int 21h
@cmp:
cmp dl, 'A'
jl @next
cmp dl, 'Z'
jg @next
add dl, 20h
@next:
mov byte ptr , dl
inc bx
loop @read
int 20h
cseg ends
end start
; Read and convert a string
dseg segment
buflen db 255
buf db 255 dup(?)
dseg ends
cseg sengment
assume cs:cseg,ds:dseg
start:
mov ax, dseg
mov ds, ax
;read a string
;--------------------
mov dx, offset buflen
mov ah, 0ah
int 21h
mov cx, buflen
mov bx, offset buf
@cmp:
mov dl, byte ptr
cmp dl, 'A'
jl @next
cmp dl, 'Z'
jg @next
add dl, 20h
mov byte ptr , dl
@next:
inc bx
loop @cmp
int 20h
cseg ends
end start
; program II---Use DOS ah=02h int 21h
; Read and convert a key
dseg segment
buf db 255 dup(?)
dseg ends
cseg sengment
assume cs:cseg,ds:dseg
start:
mov ax, dseg
mov ds, ax
mov cx, 255
mov bx, offset buf
@read:
;read a key
;--------------------
mov ah, 02h
int 21h
@cmp:
cmp dl, 'A'
jl @next
cmp dl, 'Z'
jg @next
add dl, 20h
@next:
mov byte ptr , dl
inc bx
loop @read
int 20h
cseg ends
end start
doesn't understand, but thanks for tying it.