Access Millions of academic & study documents

Aditya mangotra 42a mca lab 3

Content type
User Generated
Showing Page:
1/3
Experiment No.3
Name of Student:
Aditya
Mangotra
Registration No:
19010176
Roll No:
42
Date of Performance:
05/05/2021
Aim: Find the maximum data type from a block of 05 data bytes. The length of the
block is at 40H. The block starts at 41H. Place maximum data byte at 30H.
Apparatus Required: Keil Software /RIDE Software
Program:

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/3
Memory
address
Hex.
code
Assembly Codes
Comments
$MOD51 MOV
R0, #41H
;ptr=41h to r0
MOV R1, #05H
MOV B,#00H
;count=5,r1
;max=0,move 00H
To B
MOV A,@R0
CJNEA,B,NOTEQUAL
JCNOCHANGE MOV
B,A
INC R0
DJNZ R1,BACK
MOV A,B
MOV 30H,A
SJMP $
END
;max>(ptr).
;nochange
;max=(ptr)
;ptr=ptr+1
;count=count-1,if
Count not equal to
0,go back
;Store the max at
30H
SOURCE MEMORY DESTINATIONMEMORY
Program Output:

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/3

Sign up to view the full document!

lock_open Sign Up
Unformatted Attachment Preview
Experiment No.3 Name of Student: Aditya Mangotra 42 Roll No: Registration No: 19010176 Date of Performance: 05/05/2021 Aim: Find the maximum data type from a block of 05 data bytes. The length of the block is at 40H. The block starts at 41H. Place maximum data byte at 30H. Apparatus Required: Keil Software /RIDE Software Program: Memory Hex. Label address code Assembly Codes $MOD51 MOV R0, #41H MOV R1, #05H MOV B,#00H BACK: MOV A,@R0 CJNEA,B,NOTEQUAL NOTEQUAL: JCNOCHANGE MOV B,A NOCHANGE: INC R0 DJNZ R1,BACK MOV A,B MOV 30H,A SJMP $ END SOURCE MEMORY Program Output: Comments ;ptr=41h to r0 ;count=5,r1 ;max=0,move 00H To B ;max>(ptr). ;nochange ;max=(ptr) ;ptr=ptr+1 ;count=count-1,if Count not equal to 0,go back ;Store the max at 30H DESTINATIONMEMORY Result:- Maximum data bytes is stored in m.1.30H Name: Description: ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Studypool
4.7
Indeed
4.5
Sitejabber
4.4