Saturday, May 30, 2009

Write a program in 8086 assembly language that accepts a character string of a maximum size of 10 characters from the keyboard.......

Write a program in 8086 assembly language that accepts a character string of a maximum size of 10 characters from the keyboard; converts each alphabet in the string to upper case and coverts each alphabet to next alphabet, that is, A will be converted to B; B to C, C to D ….and Z to A. The resultant string is output on the monitor. You must run this program.



DATA SEGMENT
STR1 DB 80 DUP (0)
MSG1 DB ‘ENTER A STRIMG $’
CR EQU ODH
PORT DW?

DATA SEGMENT
ASSUME CS: CODE DS: DATA
START:
MOV AX, DATA
MOV DS, AX
MOV DX, OFFSET MSG1
INT 2H ; TO PRINT MSG1
RDCHAR1:
MOV SI, OFFSET STR1 ; READING STRING1
RDCHAR1:
MOV AH, 01
INT 21H
MOV [SI], AL
. INC SI
CMP AL, CR
JNE RDCHAR1
MOV SI, OFFSET STR1
MOV CL, 00
MOV CH, 00

END START

No comments:

Post a Comment