0% found this document useful (0 votes)
15 views3 pages

Lab No 03

The document outlines a lab exercise focused on implementing an assembly language program to identify even and odd numbers using register operations in the Keil u Vision IDE. It includes source code for both even and odd identification, along with a conclusion highlighting the skills enhanced through the exercise. The lab aims to improve understanding of logical operations and conditional branching.

Uploaded by

Zulqurnan Anjum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views3 pages

Lab No 03

The document outlines a lab exercise focused on implementing an assembly language program to identify even and odd numbers using register operations in the Keil u Vision IDE. It includes source code for both even and odd identification, along with a conclusion highlighting the skills enhanced through the exercise. The lab aims to improve understanding of logical operations and conditional branching.

Uploaded by

Zulqurnan Anjum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

LAB NO 03

FIND EVEN AND ODD IN RESISTORS


Objective:
To implement an assembly language program that identifies even and odd numbers using register
operations, enhancing skills in logical operations and conditional branching in the Keil u Vision
IDE.
(Even in Resistors)
Source code.
AREA Mycode,Code,Readonly
ENTRY
EXPORT Reset_Handler
Reset_Handler
MOV R0, #13
MOV R1, #2
UDIV R3,R0,R1
MUL R4,R3,R1
SUB R5,R0,R4
CMP R5,#0
MOVEQ R6,#0
MOVNE R7,#1
END

Fig 3.1

Output:
Fig 3.2
(odd in Resistors)
Source code.
AREA Mycode,Code,Readonly
ENTRY
EXPORT Reset_Handler
Reset_Handler
MOV R0, #13
MOV R1, #3
UDIV R3,R0,R1
MUL R4,R3,R1
SUB R5,R0,R4
CMP R5,#0
MOVEQ R6,#0
MOVNE R7,#1
end

Fig 3.3
Output:
F ig 3.4
Conclusion :
This lab demonstrated the use of assembly language to identify even and odd numbers using
register operations, enhancing skills in logical operations and branching in Keil u Vision IDE.

You might also like