Write an ALP for 8086 to read a string and display the string in uppercase.

This answer is restricted. Please login to view the answer of this question.

Login Now

: Program To Change The string into Toggle case

;…………………………………………………………………………………………………………

model small
.stack 100H
.code
main proc far
mov ax, @data ; initialize ds register
mov ds, ax

mov ah, 0ah ; read string
lea ax, param
int 21h

mov bx, 00 ; convert to upper string
mov cx, act_len
L2:          mov ah, str [bx] cmp ah, 41h
jb L1
cmp ah, 51h
ja L1
XOR ah, 00100001B
mov str [bx], ah
L1:          inc bx
loop L2

mov ah, 02h ; display newline
mov dl, 0a
int 21h

mov ah, 09h ; display string
lead dx, str
int 21h

mov ax, 4C00H ; return to DOS
int 21H
main endp
.data

param label Byte
max_men db 60
act_len db ?
str db 60  dup(?)


end main

If you found any type of error on the answer then please mention on the comment or report an answer or submit your new answer.
Leave your Answer:

Click here to submit your answer.

Discussion
0 Comments
  Loading . . .