Monday, May 28, 2018


A near procedure in 8086 assembly language that accepts an ASCII value as a parameter in AL register and displays this value on the output screen

DATA SEGMENT
MSG1 DB 10,13,"ENTER ANY ASCII VALUE : $"
MSG2 DB 10,13,"PRINTING AL VALUE : $"
DATA ENDS
CODE SEGMENT
ASSUME DS:DATA,CS:CODE
START:
MOV AX,DATA
MOV DS,AX
LEA DX,MSG1
MOV AH,9
INT 21H
CALL PRINT_AL
MOV AH,4CH
INT 21H
CODE ENDS
PRINT_AL PROC NEAR
MOV AH,1
INT 21H
MOV BL,AL
LEA DX,MSG2
MOV AH,9
INT 21H
MOV DL,BL
MOV AH,2
INT 21H
RET
PRINT_AL ENDP
END START

x86 alp: Sum of array

An 8086 assembly language program to find sum of 10 consecutive byte values stored in an array in the memory. The result should be stored in AX register.

DATA SEGMENT
ARR DB 5,3,7,1,9,2,6,8,4,10
LEN DW $-ARR
DB '$'
SUM DW ?
DATA ENDS
CODE SEGMENT
ASSUME DS:DATA CS:CODE
START:
MOV AX,DATA
MOV DS,AX
LEA SI,ARR
MOV AX,0
MOV CX,LEN
REPEAT:
MOV BL,ARR[SI]
MOV BH,0
ADD AX,BX
INC SI
LOOP REPEAT
MOV SUM,AX
MOV AH,4CH
INT 21H
CODE ENDS
END START

8086 :Packed BCD to Binary

 

DATA SEGMENT
PACKEDBCD DB 52H
BINARY DB ?
DATA ENDS
CODE SEGMENT
ASSUME DS:DATA CS:CODE
START:
MOV AX,DATA
MOV DS,AX
MOV AH,0
MOV AL,PACKEDBCD
CALL TOBINARY
MOV BINARY,AL
MOV AH,4CH
INT 21H
CODE ENDS
TOBINARY PROC NEAR
MOV BL,AL
AND AL,0F0H
AND BL,0FH
MOV CL,04H
ROL AL,CL
MOV CL,10
MUL CL
ADD AL,BL
RET
TOBINARY ENDP
END START
 

System Analysis & Design > Process Modelling

Android Developer: How to start

इश्क में ग़ैरत-ए-जज़्बात ने रोने ना दिया - सुदर्शन फ़ाकिर

 इश्क में ग़ैरत-ए-जज़्बात ने रोने ना दिया वरना क्या बात थी किस बात ने रोने ना दिया आप कहते थे कि रोने से ना बदलेंगे नसीब उमर भर आप की इस बात...