Wednesday, 29 July 2015

Write a program to display the extended ASCII characters (ASCII codes 80h to FFh). Display 10 characters per line, separated by blanks. Stop after the extended characters have been displayed once In Assembly Language Solution.

Write a program to display the extended ASCII characters (ASCII
codes 80h to FFh). Display 10 characters per line, separated by
blanks. Stop after the extended characters have been displayed
once.

/*
    *
    * Prosen Ghosh
    * American International University - Bangladesh (AIUB)
    *
*/
TAG: EASY SOLUTION , 8086 MICROPROCESSOR, ASSEMBLY LANGUAGE CHAPTER 6 , PROGRAMMING EXERCISE ,
ASSEMBLY LANGUAGE PROGRAMMING AND ORGANIZATION OF THE IBM PC - CHAPTER 6 .

Solution:

.MODEL SMALL
.STACK 100H

.CODE

MAIN PROC

    MOV BL,80H
    MOV CL,0
    TOP:
        CMP CL,10
        JE NEWLINE
     
        INC CL
     
        MOV AH,2
        MOV DL,BL
        INT 21H
        INC BL
     
        CMP BL,0FFH
        JE END_
     
        JMP TOP
    NEWLINE:
        MOV AH,2
        MOV DL,0AH
        INT 21H
        MOV DL,0DH
        INT 21H
        MOV CL,0
        JMP TOP
    END_:
 
    MOV AH,4CH
    INT 21H
         
    MAIN ENDP
END MAIN

No comments:

Post a Comment