Tuesday, March 24, 2020

Toggle Case program in 8086 Assembly language programming



TITLE CASE_TOGGLE_PROGRAM 
.MODEL SMALL 
.STACK 100H 
.DATA 
        MSG1 DB 0AH, 0DH, "ENTER A CHARACTER $" 
        MSG2 DB 0AH, 0DH, "YOU ENTERED $" 
        MSG3 DB ", CASE TOGGLE IS $" 
        CHAR DB ' ' 
         
.CODE 
    MAIN: 
        MOV AX, @DATA 
        MOV DS, AX 
         
         
        LEA DX, MSG1 
        MOV AH, 09H 
        INT 21H 
         
         
        MOV AH, 01H 
        INT 21H 
         
        MOV BL, AL 
          
        LEA DX,MSG2 
        MOV AH, 09H 
        INT 21H 
         
        MOV DL, BL 
        MOV AH, 02H 
        INT 21H 
         
        LEA DX, MSG3 
        MOV AH, 09H 
        INT 21H            
          
        MOV DL, BL 
        XOR DL, CHAR 
        MOV AH, 02H 
        INT 21H 
         
         
    EXIT: 
        MOV AH, 04CH 
        INT 21H 
         
    END MAIN  
     
    ;-----THE TRICK IS TO XOR-ING INPUT WITH 20H WHICH IS SPACE 
    ;-----THANKS FOR WATCHING, SUBCRIBE FOR MORE PROJECTS :) 

HERE IS THE OUTPUT OF THE PROGRAM



Toggle Case Program In Assembly Language Small To Capital
Toggle Case Program In Assembly Capital To Small

 

No comments:

Complete Video Tutorials