Write a program in 8086 assembly Ianguage that converts each character of string to upper case and to the next character 7m Jun2008

By | April 4, 2016

Write a program in 8086 assembly Ianguage that accepts a character string, of maximum 10 characters, from the keyboard, converts each character of string to upper case and converts each character to the next character. i.e. A to B, B to C,and so on. Finally display the string on the screen. 7m Jun2008

 

DATA SEGMENT
MSG1 DB 10,13,’ENTER ANY STRING :- $’
MSG2 DB 10,13,’LENGTH OF STRING IS :- $’
MSG3 DB 10,13,’REVERSE OF ENTERED STRING IS :- $’

P1 LABEL BYTE
M1 DB 0BH
L1 DB ?
P11 DB 0BH DUP (‘$’)

DATA ENDS

DISPLAY MACRO MSG
MOV AH,9
LEA DX,MSG
INT 21H
ENDM

CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX

DISPLAY MSG1

LEA DX,P1
MOV AH,0AH
INT 21H

DISPLAY MSG2

MOV DL,L1
ADD DL,30H
MOV AH,2
INT 21H

DISPLAY MSG3

LEA SI,P11

MOV CL,L1
MOV CH,0

CHECK:
CMP [SI],61H
JB DONE

CMP [SI],5BH

UPR: SUB [SI],20H

DONE: INC [SI]
INC SI
LOOP CHECK

DISPLAY P11

MOV AH,4CH
INT 21H
CODE ENDS
END START

 

DATA SEGMENT
MSG1 DB 10,13,'ENTER ANY STRING :- $'
MSG2 DB 10,13,'LENGTH OF STRING IS :- $'
MSG3 DB 10,13,'REVERSE OF ENTERED STRING IS :- $'
P1 LABEL BYTE
M1 DB 0BH
L1 DB ?
P11 DB 0BH DUP ('$')
DATA ENDS
DISPLAY MACRO MSG
MOV AH,9
LEA DX,MSG
INT 21H
ENDM
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
START:
MOV AX,DATA
MOV DS,AX
DISPLAY MSG1
LEA DX,P1
MOV AH,0AH
INT 21H
DISPLAY MSG2
MOV DL,L1
ADD DL,30H
MOV AH,2
INT 21H
DISPLAY MSG3
LEA SI,P11
MOV CL,L1
MOV CH,0
CHECK:
CMP [SI],61H
JB DONE
CMP [SI],5BH
UPR: SUB [SI],20H
DONE: INC [SI]
INC SI
LOOP CHECK
DISPLAY P11
MOV AH,4CH
INT 21H
CODE ENDS
END START

Screen shots: -

Asm_program_UpperCase_and_next_char

After Execution: -

Asm_program_UpperCase_and_next_char_Out

 

 

5(c) What is the significance of FAT? What are the limitations of FAT 16? 4

Solved program can be found on this link http://cssimplified.com/computer-organisation-and-assembly-language-programming/what-is-the-significance-of-fat-what-are-the-limitations-of-fat-164m-jun2006