Mzsmunna
10/16/2019 - 8:52 AM

COA Code


///////coa/////

.MODEL SMALL  
.STACK 100H
.CODE
.MAIN PROC
    
    
    MOV AH,1 
    INT 21H
    MOV BL, AL
    
    MOV AH,2
    ;INT 21H
    MOV DL, 0DH
    INT 21H
    MOV DL, 0AH
    INT 21H  
    
    MOV DL, BL
    INT 21H
    
    MOV AH, 4CH
    INT 21H
    MAIN ENDP

 END MAIN





-------------------------------------------------



 .MODEL SMALL
.STACK 100H
.CODE         ;Start of Coding
MAIN PROC     ;Start of Procedure
    
    MOV AH,1   ;input function
    INT 21H    ;function execution
    MOV BL,AL  ;copy value from AL to BL
    
    
    MOV AH,2     ;display function
    MOV DL,0DH   ;bring cursor to left( <- )
    INT 21H      ;function execution
    MOV DL,0AH   ;New line or Enter
    INT 21H      ;function execution
    
    
    MOV DL, BL       ;copy value from BL to DL
    INT 21H          ;function execution
    
    
    MOV AH,4CH      ;exit function
    INT 21H         ;function execution
    MAIN ENDP       ;end of procedure

END MAIN


------------------------------------------------


.MODEL SMALL
.STACK 100H
.CODE
MAIN PROC
    
    MOV AH,1
    INT 21H
    MOV BL,AL 
    ;MOV DL,BL
    INT 21H
    MOV BH,AL
    ;MOV DH,BL                  
    INT 21H
    MOV CL,AL
    
    
    MOV AH,2
    MOV DL,0DH
    INT 21H
    MOV DL,0AH
    INT 21H
    
    
    MOV AH,2
    MOV DL,BL
    INT 21H 
    
    
    MOV AH,2
    MOV DL,0DH
    INT 21H
    MOV DL,0AH
    INT 21H
    
    MOV DL,BH
    INT 21H 
    
    
    MOV AH,2
    MOV DL,0DH
    INT 21H
    MOV DL,0AH
    INT 21H
    
    
    MOV DL,CL
    INT 21H
    
    MOV AH,4CH
    MAIN ENDP

END MAIN
    

------------------------------------------------------------------------------------

.MODEL SMALL
.STACK 100H  
.DATA
M1 DB 'ENTER VALUE: $'
M2 DB 'VALUE IS: $'
.CODE         ;Start of Coding
MAIN PROC     ;Start of Procedure
    
    
    MOV AX, @DATA
    MOV DS,AX
    
    LEA DX,M1
    MOV AH,9    ;message print function
    INT 21H
    
    MOV AH,1   ;input function
    INT 21H    ;function execution
    MOV BL,AL  ;copy value from AL to BL
    
    
    MOV AH,2     ;display function
    MOV DL,0DH   ;bring cursor to left( <- )
    INT 21H      ;function execution
    MOV DL,0AH   ;New line or Enter
    INT 21H      ;function execution
    
    LEA DX,M2
    MOV AH,9       ;message print function
    INT 21H  
    
    MOV AH,2     ;display function
    MOV DL, BL   ;copy value from BL to DL
    INT 21H      ;function execution
    
    
    MOV AH,4CH      ;exit function
    INT 21H         ;function execution
    MAIN ENDP       ;end of procedure    



END MAIN


----------------------------------------------


.MODEL SMALL
.STACK 100H  
.DATA    
    V1 DB 3
    V2 DB ?
M1 DB 'ENTER VALUE: $'
M2 DB 'VALUE IS: $'
.CODE         ;Start of Coding
MAIN PROC     ;Start of Procedure
    
    
    MOV AX, @DATA
    MOV DS,AX
    
    LEA DX,M1
    MOV AH,9    ;message print function
    INT 21H
    
    MOV AH,1   ;input function
    INT 21H    ;function execution
    MOV V2,AL  ;copy value from AL to BL
    
    
    MOV AH,2     ;display function
    MOV DL,0DH   ;bring cursor to left( <- )
    INT 21H      ;function execution
    MOV DL,0AH   ;New line or Enter
    INT 21H      ;function execution
    
    LEA DX,M2
    MOV AH,9       ;message print function
    INT 21H                         
    
    ADD V1,30H     ;ascii code print problem solve!
    
    MOV AH,2     ;display function   
    MOV DL,0DH   ;bring cursor to left( <- )
    INT 21H      ;function execution
    MOV DL,0AH   ;New line or Enter
    INT 21H      ;function execution
    MOV DL,V1    ;copy value from V1 to DL
    INT 21H      ;function execution 
    MOV DL,0DH   ;bring cursor to left( <- )
    INT 21H      ;function execution
    MOV DL,0AH   ;New line or Enter
    INT 21H      ;function execution
    MOV DL,V2    ;copy value from V2 to DL
    INT 21H      ;function execution
    
    
    MOV AH,4CH      ;exit function
    INT 21H         ;function ex