Mzsmunna
10/16/2019 - 8:52 AM

COA All lab tasks _ performances2


///////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 execution
    MAIN ENDP       ;end of procedure    



END MAIN


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



.MODEL SMALL
.STACK 100H  
.DATA    
    V1 DB 3
    V2 DB ?
M1 DB 'ENTER VALUE: $'
M2 DB 'DEFAULT VALUE IS: $'
M3 DB 'INPUTTED 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,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
    
    LEA DX,M3
    MOV AH,9       ;message print function
    INT 21H 
    
    
    MOV AH,2     ;display function
    MOV DL,V2    ;copy value from V2 to DL
    INT 21H      ;function execution
    
    
    MOV AH,4CH      ;exit function
    INT 21H         ;function execution
    MAIN ENDP       ;end of procedure    



END MAIN



-----------------------------
LAB PERFORMANCE 6-10-2016
----------------------------

.MODEL SMALL
.STACK 100H  
.DATA    
    V1 DB ?
    V2 DB ?
    V3 DB ?
    V4 DB ?
    V5 DB ?
M1 DB 'ENTER YOUR NAME: $'
M2 DB 'YOUR NAME 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 V1,AL  ;copy value from AL to BL
    INT 21H    ;function execution
    MOV V2,AL  ;copy value from AL to BL
    INT 21H    ;function execution
    MOV V3,AL  ;copy value from AL to BL
    INT 21H    ;function execution
    MOV V4,AL  ;copy value from AL to BL
    INT 21H    ;function execution
    MOV V5,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                         
    
    SUB V1,32D     ;ascii code print problem solve!
    SUB V2,32D     ;ascii code print problem solve!
    SUB V3,32D     ;ascii code print problem solve!
    SUB V4,32D     ;ascii code print problem solve!
    SUB V5,32D     ;ascii code print problem solve!
    
    MOV AH,2     ;display function   
    MOV DL,V1    ;copy value from V1 to DL
    INT 21H      ;function execution
    MOV DL,V2    ;copy value from V2 to DL
    INT 21H      ;function execution 
    MOV DL,V3    ;copy value from V1 to DL
    INT 21H      ;function execution
    MOV DL,V4    ;copy value from V2 to DL
    INT 21H      ;function execution 
    MOV DL,V5    ;copy value from V1 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 ?
    V2 DB ?
    V3 DB ?
    V4 DB ?
    V5 DB ?
M1 DB 'ENTER YOUR NAME: $'
M2 DB 'YOUR NAME IS: $'
.CODE         
MAIN PROC     
    
    
    MOV AX, @DATA
    MOV DS,AX
    
    LEA DX,M1
    MOV AH,9    
    INT 21H
    
    MOV AH,1   
    INT 21H     
    MOV V1,AL       
    INT 21H    
    MOV V2,AL  
    INT 21H   
    MOV V3,AL 
    INT 21H    
    MOV V4,AL  
    INT 21H 
    MOV V5,AL  
    
    
    
    MOV AH,2     
    MOV DL,0DH   
    INT 21H     
    MOV DL,0AH   
    INT 21H      
    
    LEA DX,M2
    MOV AH,9    
    INT 21H                         
    
    SUB V1,32D     
    SUB V2,32D     
    SUB V3,32D    
    SUB V4,32D    
    SUB V5,32D     
    
    MOV AH,2      
    MOV DL,V1    
    INT 21H     
    MOV DL,V2   
    INT 21H      
    MOV DL,V3    
    INT 21H      
    MOV DL,V4    
    INT 21H      
    MOV DL,V5    
    INT 21H    

    
    
    MOV AH,4CH      
    INT 21H         
    MAIN ENDP         



END MAIN

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


Sum_Of_2_Values.asm
Details
Activity
LAST MONTH

tanu tanbir shared an item
Sep 26
Text
Sum_Of_2_Values.asm

Can view
You
EARLIER THIS YEAR

tanu tanbir created an item in
Jun 2
Google Drive Folder
COA
Text
Sum_Of_2_Values.asm
No recorded activity before June 2, 2016

.MODEL SMALL
.STACK 100H 
.DATA
MSG1 DB 'ENTER VALUE1: $' 
MSG2 DB 'ENTER VALUE2: $'  
MSG3 DB 'SUM OF  $'
MSG4 DB ' AND  $'  
MSG5 DB ' IS: $'
.CODE
MAIN PROC  
    MOV AX,@DATA
    MOV DS,AX
    
    LEA DX,MSG1
    MOV AH,9
    INT 21H
    
    MOV AH,1
    INT 21H
    MOV BL,AL
    
      
    
    MOV AH,2
    MOV DL,0DH
    INT 21H
    MOV DL,0AH
    INT 21H
    
    LEA DX,MSG2
    MOV AH,9
    INT 21H 
    
    
    MOV AH,1
    INT 21H
    MOV CL,AL 
    
    MOV AH,2
    MOV DL,0DH
    INT 21H
    MOV DL,0AH
    INT 21H  
    
    
    LEA DX,MSG3
    MOV AH,9
    INT 21H  
    
    MOV AH,2
    MOV DL,BL
    INT 21H  
    
    
    LEA DX,MSG4
    MOV AH,9
    INT 21H 
    
    
    MOV AH,2
    MOV DL,CL
    INT 21H 
    
    
    LEA DX,MSG5
    MOV AH,9
    INT 21H 
    
    
    
    
    MOV AH,2 
    ADD BL,CL
    SUB BL,48
    MOV DL,BL
    INT 21H
    
   
    
         
           
    MOV AH,4CH
    INT 21H
    MAIN ENDP
END MAIN


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

----------


.MODEL SMALL
.STACK 200H
.DATA
N1 DB ?
N2 DB ?
N3 DB ?   
N4 DB ?
M1 DB 'Enter 1st number: $'
M2 DB 'Enter 2nd number: $'
M3 DB 'Enter 3rd number: $'   
M4 DB 'Calculation of $'
M5 DB ', $'
M6 DB ' and $'
M7 DB ' is: $'
.CODE                      
MAIN PROC                  
    
    MOV AX,@DATA
    MOV DS,AX
    
    LEA DX,M1   
    MOV AH,9
    INT 21H
    
    MOV AH,1    ;input
    INT 21H
    MOV N1,AL         
    
    MOV AH,2    ;newline
    MOV DL,0DH
    INT 21H   
    MOV DL,0AH
    INT 21H    
    
    LEA DX,M2    
    MOV AH,9
    INT 21H
    
    MOV AH,1    ;input
    INT 21H
    MOV N2,AL         
    
    MOV AH,2    
    MOV DL,0DH
    INT 21H   
    MOV DL,0AH
    INT 21H 
    
    LEA DX,M3  
    MOV AH,9
    INT 21H
    
    MOV AH,1    ;input
    INT 21H
    MOV N3,AL         
    
    MOV AH,2    
    MOV DL,0DH
    INT 21H   
    MOV DL,0AH
    INT 21H     
    
    
    MOV BL,N1
    ADD BL,N2
    SUB BL,N3  
        
      
    LEA DX,M4
    MOV AH,9
    INT 21H 
    
    MOV AH,2
    MOV DL,N1
    INT 21H
    
    LEA DX,M5
    MOV AH,9
    INT 21H
    
    MOV AH,2
    MOV DL,N2
    INT 21H
    
    LEA DX,M6
    MOV AH,9
    INT 21H
    
    MOV AH,2
    MOV DL,N3
    INT 21H

    LEA DX,M7
    MOV AH,9
    INT 21H
    
    MOV AH,2 
    MOV DL,BL
    INT 21H

    MOV AL,0
    MOV AH,4CH
    INT 21H
    MAIN ENDP
END MAIN



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

CMF = compare

JG = jump if greater than

JL = jump if less

JGE = jump if greater than or equal

JNG = jump if not greater than

JE = jump if equal

JNE = jump if not equal

JMP = jump

INC = increase

DEC = decrease