LDA 2200H
MOV C,A
XRAA
LXI H,2201H
BACK: CMP M
JNC SKIP
MOVE A,M
SKIP: INX H
DCR C
JNZ BACK
STA 2300H
HLT
the algorithm is as follows
- first initialize counter C= no of numbers in the list
- then assign the maximum value is equal to zero ( thats the minimum possible value we can assign ) A=0
- then initialize the pointer to the list of numbers
- compare the number with A
- if the number is greater the then maximum number that is A then replace A with the new number if not go for the next number
- i.e increment pointer value and decrement count C
- if c reaches 0 then come out of loop
- store the number in A in some memory location
- stop the program
:: Assembly Language Programs to compute an expression
:: Interfacing Analog-to-Digital converter to 8086 using 8255
:: Interfacing Digital-To-Analog converter to 8086 using 8255
:: Temperature Control system using 8086
No comments:
Post a Comment