Atharv 1100
Atharv 1100
Introduction:-
Microprocessor:
A microprocessor is a controlling unit of a micro-computer
fabricated on a small chip capable of performing ALU
(Arithmetic Logic Unit) operations and communicating with
other devices connected to it. Microprocessor consists of
register, control array, and control unit.
DX: - DX is data register. The two parts are DH and DL. This
register can be used in Multiplication, Input/output addressing
etc.
1) START
2)In the program the integer ‘n’ value is fixed as 5 number,
3) Put AL to stored operand size for multiplication.
4) Also, BL to use for indexed address .
5) Read the integer as AL register and assign it to a variable .
6) Copy the AL value as BL register (that is 5).
7) And take BL value by subtracting 1 from the value(i.e.: BL =
BL -1).
8) For the next value, create the CL to create loop for
updated value.
9) Now multiply the AL and BL value up to 1
(E.g. :5*4*3*2*1).
10) The final value at the end of all the multiplication till 1 is
the factorial (i.e.: 120).
11) END.
FLOWCHART:-
SOURCE CODE:-
DATA SEGMENT
msg1 db 10,13,"The water level is: $"
msg2 db 10,13,"Switch ON motor. $"
msg3 db 10,13,"Switch OFF motor. $"
msg4 db 10,13,"Water overflow! $"
DATA ENDS
CODE SEGMENT
ASSUME DS:DATA,CS:CODE
START: mov AX,@data ;intialize data segment
mov DS,AX
mov CL,1H
L1: lea DX,msg1 ;displaying water level message
mov AH,9H
int 21H
jmp exit
CODE ENDS
END START.
OUTPUT:-
CONCLUSION:-
This Program stores an info into the int data type. After the
successful execution the code will find the accurate level of the
water.
The water level indicator represents a pivotal advancement in
water management technology. By providing accurate and real-
time data on water levels, this innovative solution offers tangible
benefits for communities, industries, and individuals alike. From
optimizing water usage and preventing wastage to enhancing
infrastructure resilience and promoting conservation efforts, the
impact of the water level indicator extends far beyond its
technical specifications. As we continue to confront global
challenges related to water scarcity and quality, embracing such
tools is essential in safeguarding this vital resource for future
generations.
References:-