Lab No 03
Lab No 03
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.