SlideShare a Scribd company logo
1 write an ALP for addition two 64 bit numbers . 
AREA ADDTIN,CODE 
ENTRY 
ldr r0,=value1 
ldr r1,[r0] 
ldr r2,[r0,#4] 
ldr r0,=value2 
ldr r3,[r0] 
ldr r4,[r0,#4] 
adds r6,r2,r4 
adc r5,r1,r3 
ldr r0,=result 
str r5,[r0] 
str r6,[r0,#4] 
swi &11 
value1 dcd &BBBBBBBB,&AAAAAAAA 
value2 dcd &CCCCCCCC,&FFFFFFFF 
result dcd &0
2 write an ALP for addition two 32 bits numbers . 
AREA ADDTIN,CODE 
ENTRY 
ldr r0,=value1 
ldr r1,[r0] 
ldr r0,=value2 
ldr r2,[r0] 
adds r3,r2,r1 
value1 dcd &BBBBBBBB 
value2 dcd &CCCCCCCC 
end
;/*Program to find smallest of N numbers*/ 
AREA arr,code 
ENTRY 
main 
ldr r0,=data1 
ldr r3,=0x40000000 
ldr r4,=0x05 ;//length of loop 
ldr r1,[r0],#04 
sub r4,r4,#01 
back 
ldr r2,[r0] 
cmp r1,r2 
bls less ;// branch on low 
mov r1,r2 
less 
add r0,r0,#04 
sub r4,r4,#01 
cmp r4,#00 
bne back 
str r1,[r3] ;// smallest value stored in memory location 
stop b stop 
AREA data,code 
data1 dcd &64,&05,&96,&10,&65 
END
;/*Program to find largest of N numbers*/ 
AREA arr,code 
ENTRY 
main 
ldr r0,=data1 
ldr r3,=0x40000000 
ldr r4,=0x05 ;//length of loop 
ldr r1,[r0],#04 
sub r4,r4,#01 
back 
ldr r2,[r0] 
cmp r1,r2 
bhs large ;// branch on low 
mov r1,r2 
large 
add r0,r0,#04 
sub r4,r4,#01 
cmp r4,#00 
bne back 
str r1,[r3] ;// smallest value stored in memory location 
stop b stop 
AREA data,code 
data1 dcd &64,&05,&9,&00,&65 
END
;/*Program to convert Hex to ascii*/ 
AREA arr,code 
entry 
main 
ldr r0,=value1 
ldr r1,[r0] 
mov r2,r1 
cmp r1,#0x09 
bhi grt 
add r1,r1,#0x30 ;//add 30 if data <9 
bl nxt1 
grt 
add r1,r1,#0x37 ;//add 37h if data>9 
nxt1 
ldr r4,=0x40000000 
str r1,[r4] 
stop b stop 
AREA data,code 
value1 dcd &07 
END
;/*Program to convert Ascii to hex*/ 
AREA arr,code 
entry 
main 
ldr r0,=value1 
ldr r1,[r0] 
mov r2,r1 
cmp r1,#0x39 
bhi grt 
sub r1,r1,#0x30 ;//SUB 30 if data <39 
bl nxt1 
grt 
sub r1,r1,#0x37 ;//SUB 37h if data>39 
nxt1 
ldr r4,=0x40000000 
str r1,[r4] 
stop b stop 
AREA data,code 
value1 dcd &41 
END
;/*Progarm to generate N Fibonic numbers*/ 
AREA arr,code 
ENTRY 
main 
ldr r0,=value 
ldr r1,[r0] 
ldr r2,=0x40000000 ;/*memory location fibonic series*/ 
ldr r9,=0x02 
ldr r3,=0x00 
mov r6,r2 
str r3,[r2],#04 
add r3,r3,#01 
mov r7,r2 
str r3,[r2],#04 
back 
ldr r4,[r6],#04 
ldr r5,[r7],#04 
add r5,r4,r5 
str r5,[r2],#04 
add r9,r9,#01 
cmp r9,r1 
BNE back 
stopb stop 
AREA data,code
value dcd &0a ;/* here ten fibonic numbers are ganerated*/ 
END
;//* To find the factorial of a given number using subroutine*// 
AREA arr,code 
ENTRY 
main 
ldr r0,=value 
bl fact ;// call subroutine fact 
ldr r1,=0x40000000 
str r5,[r1] 
stop b stop 
AREA data,code 
value dcd &0a 
fact 
mov r6,r14 
ldr r2,[r0] 
cmp r2,#00 
beq END1 
mov r3,r2 
loop 
sub r2,r2,#01 
cmp r2,#00 
mulne r3,r2,r3 
bne loop 
mov r5,r3 
bl END2
END1 
ldr r5,=0x01 
END2 
mov PC,r6 ;// return to main program. 
END
;//* To find the multiplication of two 32 bit number *// 
AREA ADDTIN,CODE 
ENTRY 
ldr r0,value1 
ldr r1,value2 
umull r4,r3,r1,r0 
value1 dcd &BBBBBBBB 
value2 dcd &CCCCCCCC 
end

More Related Content

What's hot

Introduction to ARM LPC2148
Introduction to ARM LPC2148Introduction to ARM LPC2148
Introduction to ARM LPC2148
Veera Kumar
 
18CS44-MODULE3-PPT.pptx
18CS44-MODULE3-PPT.pptx18CS44-MODULE3-PPT.pptx
18CS44-MODULE3-PPT.pptx
Sudeep35
 
Lect 2 ARM processor architecture
Lect 2 ARM processor architectureLect 2 ARM processor architecture
Lect 2 ARM processor architecture
Dr.YNM
 
Serial Communication in 8051
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
Sudhanshu Janwadkar
 
Four way traffic light conrol using Verilog
Four way traffic light conrol using VerilogFour way traffic light conrol using Verilog
Four way traffic light conrol using Verilog
Utkarsh De
 
Code Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorCode Conversion in 8085 Microprocessor
Code Conversion in 8085 Microprocessor
MOHIT AGARWAL
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
Ravi Babu
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051Muthu Manickam
 
ARM
ARMARM
Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Ganesh Ram
 
Introduction to Embedded System I: Chapter 2 (5th portion)
Introduction to Embedded System I: Chapter 2 (5th portion)Introduction to Embedded System I: Chapter 2 (5th portion)
Introduction to Embedded System I: Chapter 2 (5th portion)
Moe Moe Myint
 
Unit II Arm 7 Introduction
Unit II Arm 7 IntroductionUnit II Arm 7 Introduction
Unit II Arm 7 Introduction
Dr. Pankaj Zope
 
Typical Embedded System
Typical Embedded SystemTypical Embedded System
Typical Embedded System
anand hd
 
Switch level modeling
Switch level modelingSwitch level modeling
Switch level modeling
Devi Pradeep Podugu
 
Microcontrollers 8051 MSP430 notes
Microcontrollers 8051 MSP430 notesMicrocontrollers 8051 MSP430 notes
Microcontrollers 8051 MSP430 notes
Niteesh Shanbog
 
Arm7 Interfacing examples
Arm7   Interfacing examples Arm7   Interfacing examples
Arm7 Interfacing examples
Dr.YNM
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
Mathivanan Natarajan
 
Introduction to pic microcontroller
Introduction to pic microcontrollerIntroduction to pic microcontroller
Introduction to pic microcontroller
Siva Kumar
 
Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 MicrocontrollerInterfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
Pantech ProLabs India Pvt Ltd
 
VLSI Lab manual PDF
VLSI Lab manual PDFVLSI Lab manual PDF
VLSI Lab manual PDF
UR11EC098
 

What's hot (20)

Introduction to ARM LPC2148
Introduction to ARM LPC2148Introduction to ARM LPC2148
Introduction to ARM LPC2148
 
18CS44-MODULE3-PPT.pptx
18CS44-MODULE3-PPT.pptx18CS44-MODULE3-PPT.pptx
18CS44-MODULE3-PPT.pptx
 
Lect 2 ARM processor architecture
Lect 2 ARM processor architectureLect 2 ARM processor architecture
Lect 2 ARM processor architecture
 
Serial Communication in 8051
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
 
Four way traffic light conrol using Verilog
Four way traffic light conrol using VerilogFour way traffic light conrol using Verilog
Four way traffic light conrol using Verilog
 
Code Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorCode Conversion in 8085 Microprocessor
Code Conversion in 8085 Microprocessor
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051
 
ARM
ARMARM
ARM
 
Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))
 
Introduction to Embedded System I: Chapter 2 (5th portion)
Introduction to Embedded System I: Chapter 2 (5th portion)Introduction to Embedded System I: Chapter 2 (5th portion)
Introduction to Embedded System I: Chapter 2 (5th portion)
 
Unit II Arm 7 Introduction
Unit II Arm 7 IntroductionUnit II Arm 7 Introduction
Unit II Arm 7 Introduction
 
Typical Embedded System
Typical Embedded SystemTypical Embedded System
Typical Embedded System
 
Switch level modeling
Switch level modelingSwitch level modeling
Switch level modeling
 
Microcontrollers 8051 MSP430 notes
Microcontrollers 8051 MSP430 notesMicrocontrollers 8051 MSP430 notes
Microcontrollers 8051 MSP430 notes
 
Arm7 Interfacing examples
Arm7   Interfacing examples Arm7   Interfacing examples
Arm7 Interfacing examples
 
Arm instruction set
Arm instruction setArm instruction set
Arm instruction set
 
Introduction to pic microcontroller
Introduction to pic microcontrollerIntroduction to pic microcontroller
Introduction to pic microcontroller
 
Interfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 MicrocontrollerInterfacing LCD with 8051 Microcontroller
Interfacing LCD with 8051 Microcontroller
 
VLSI Lab manual PDF
VLSI Lab manual PDFVLSI Lab manual PDF
VLSI Lab manual PDF
 

Viewers also liked

Programming The Arm Microprocessor For Embedded Systems
Programming The Arm Microprocessor For Embedded SystemsProgramming The Arm Microprocessor For Embedded Systems
Programming The Arm Microprocessor For Embedded Systemsjoshparrish13
 
ARM 7 LPC 2148 lecture
ARM 7 LPC 2148 lectureARM 7 LPC 2148 lecture
ARM 7 LPC 2148 lectureanishgoel
 
LPC 2148 ARM MICROCONTROLLER
LPC 2148 ARM MICROCONTROLLERLPC 2148 ARM MICROCONTROLLER
LPC 2148 ARM MICROCONTROLLER
sravannunna24
 
Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming
Dr. Pankaj Zope
 
ARM Processor
ARM ProcessorARM Processor
ARM Processor
Aniket Thakur
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
Aarav Soni
 
ARM Processor Tutorial
ARM Processor Tutorial ARM Processor Tutorial
ARM Processor Tutorial
Embeddedcraft Craft
 
Embedded c lab and keil c manual
Embedded  c  lab  and keil c  manualEmbedded  c  lab  and keil c  manual
Embedded c lab and keil c manual
Hari K
 
Smart Prepaid Energy Meter using ARM7 & and GSM
Smart Prepaid Energy Meter using ARM7 & and GSMSmart Prepaid Energy Meter using ARM7 & and GSM
Smart Prepaid Energy Meter using ARM7 & and GSM
Darshak Patel
 
Arm teaching material
Arm teaching materialArm teaching material
Arm teaching materialJohn Williams
 
Arm architecture
Arm architectureArm architecture
ARM procedure calling conventions and recursion
ARM procedure calling conventions and recursionARM procedure calling conventions and recursion
ARM procedure calling conventions and recursion
Stephan Cadene
 
Analog to Digital converter in ARM
Analog to Digital converter in ARMAnalog to Digital converter in ARM
Analog to Digital converter in ARM
Aarav Soni
 
Introduction to ARM
Introduction to ARMIntroduction to ARM
Introduction to ARM
Puja Pramudya
 
PIPELINE INTERRUPTS
PIPELINE INTERRUPTSPIPELINE INTERRUPTS
PIPELINE INTERRUPTS
M R Karthik
 
Unit ii arm7 thumb
Unit ii arm7 thumbUnit ii arm7 thumb
Unit ii arm7 thumb
Dr. Pankaj Zope
 
Assignment of pseudo code
Assignment of pseudo codeAssignment of pseudo code
Assignment of pseudo codeBurhan Chaudhry
 

Viewers also liked (20)

Programming The Arm Microprocessor For Embedded Systems
Programming The Arm Microprocessor For Embedded SystemsProgramming The Arm Microprocessor For Embedded Systems
Programming The Arm Microprocessor For Embedded Systems
 
ARM 7 LPC 2148 lecture
ARM 7 LPC 2148 lectureARM 7 LPC 2148 lecture
ARM 7 LPC 2148 lecture
 
LPC 2148 ARM MICROCONTROLLER
LPC 2148 ARM MICROCONTROLLERLPC 2148 ARM MICROCONTROLLER
LPC 2148 ARM MICROCONTROLLER
 
Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming Unit III ARM Interface and ARM Programming
Unit III ARM Interface and ARM Programming
 
Ppt
PptPpt
Ppt
 
ARM Processor
ARM ProcessorARM Processor
ARM Processor
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
 
ARM Processor Tutorial
ARM Processor Tutorial ARM Processor Tutorial
ARM Processor Tutorial
 
Embedded c lab and keil c manual
Embedded  c  lab  and keil c  manualEmbedded  c  lab  and keil c  manual
Embedded c lab and keil c manual
 
Smart Prepaid Energy Meter using ARM7 & and GSM
Smart Prepaid Energy Meter using ARM7 & and GSMSmart Prepaid Energy Meter using ARM7 & and GSM
Smart Prepaid Energy Meter using ARM7 & and GSM
 
Arm teaching material
Arm teaching materialArm teaching material
Arm teaching material
 
Arm architecture
Arm architectureArm architecture
Arm architecture
 
ARM procedure calling conventions and recursion
ARM procedure calling conventions and recursionARM procedure calling conventions and recursion
ARM procedure calling conventions and recursion
 
Arm processor
Arm processorArm processor
Arm processor
 
Analog to Digital converter in ARM
Analog to Digital converter in ARMAnalog to Digital converter in ARM
Analog to Digital converter in ARM
 
Introduction to ARM
Introduction to ARMIntroduction to ARM
Introduction to ARM
 
PIPELINE INTERRUPTS
PIPELINE INTERRUPTSPIPELINE INTERRUPTS
PIPELINE INTERRUPTS
 
Arm7 architecture
Arm7 architectureArm7 architecture
Arm7 architecture
 
Unit ii arm7 thumb
Unit ii arm7 thumbUnit ii arm7 thumb
Unit ii arm7 thumb
 
Assignment of pseudo code
Assignment of pseudo codeAssignment of pseudo code
Assignment of pseudo code
 

Similar to ARM lab programs

ARM inst set part 2
ARM inst set part 2ARM inst set part 2
ARM inst set part 2
Karthik Vivek
 
ARM instruction set
ARM instruction  setARM instruction  set
ARM instruction set
Karthik Vivek
 
Unit vi
Unit viUnit vi
ARM instruction set
ARM instruction  setARM instruction  set
ARM instruction set
Karthik Vivek
 
Lathe Spindle Sensor
Lathe Spindle SensorLathe Spindle Sensor
Lathe Spindle Sensor
JoeCritt
 
Module 2 PPT of ES.pptx
Module 2 PPT of ES.pptxModule 2 PPT of ES.pptx
Module 2 PPT of ES.pptx
shruthi810379
 
15CS44 MP & MC module 5
15CS44 MP & MC  module 515CS44 MP & MC  module 5
15CS44 MP & MC module 5
RLJIT
 
Lec2.ppt
Lec2.pptLec2.ppt
Lec2.ppt
fgjf1
 
커널코드분석 20140621(head.s restart)
커널코드분석 20140621(head.s restart)커널코드분석 20140621(head.s restart)
커널코드분석 20140621(head.s restart)
Dongpyo Lee
 
ch2-arm-1.ppt
ch2-arm-1.pptch2-arm-1.ppt
ch2-arm-1.ppt
jerart julus
 
Translate the following CC++ code into MIPS Assembly Codevoid ch.pdf
Translate the following CC++ code into MIPS Assembly Codevoid ch.pdfTranslate the following CC++ code into MIPS Assembly Codevoid ch.pdf
Translate the following CC++ code into MIPS Assembly Codevoid ch.pdf
fcsondhiindia
 
Chapter Eight(3)
Chapter Eight(3)Chapter Eight(3)
Chapter Eight(3)bolovv
 
Arm (2)
Arm (2)Arm (2)
Arm (2)
jrosita
 
Advanced Techniques: Size | Pebble Developer Retreat 2014
Advanced Techniques: Size | Pebble Developer Retreat 2014Advanced Techniques: Size | Pebble Developer Retreat 2014
Advanced Techniques: Size | Pebble Developer Retreat 2014
Pebble Technology
 
L3_Representing Instructions in the Computer.pptx
L3_Representing Instructions in the Computer.pptxL3_Representing Instructions in the Computer.pptx
L3_Representing Instructions in the Computer.pptx
hariharan kalyanaraman
 

Similar to ARM lab programs (20)

ARM inst set part 2
ARM inst set part 2ARM inst set part 2
ARM inst set part 2
 
ARM instruction set
ARM instruction  setARM instruction  set
ARM instruction set
 
Unit vi
Unit viUnit vi
Unit vi
 
ARM instruction set
ARM instruction  setARM instruction  set
ARM instruction set
 
Lathe Spindle Sensor
Lathe Spindle SensorLathe Spindle Sensor
Lathe Spindle Sensor
 
Module 2 PPT of ES.pptx
Module 2 PPT of ES.pptxModule 2 PPT of ES.pptx
Module 2 PPT of ES.pptx
 
15CS44 MP & MC module 5
15CS44 MP & MC  module 515CS44 MP & MC  module 5
15CS44 MP & MC module 5
 
Lec2.ppt
Lec2.pptLec2.ppt
Lec2.ppt
 
커널코드분석 20140621(head.s restart)
커널코드분석 20140621(head.s restart)커널코드분석 20140621(head.s restart)
커널코드분석 20140621(head.s restart)
 
Ch2 arm-1
Ch2 arm-1Ch2 arm-1
Ch2 arm-1
 
ch2-arm-1.ppt
ch2-arm-1.pptch2-arm-1.ppt
ch2-arm-1.ppt
 
Translate the following CC++ code into MIPS Assembly Codevoid ch.pdf
Translate the following CC++ code into MIPS Assembly Codevoid ch.pdfTranslate the following CC++ code into MIPS Assembly Codevoid ch.pdf
Translate the following CC++ code into MIPS Assembly Codevoid ch.pdf
 
Chapter Eight(3)
Chapter Eight(3)Chapter Eight(3)
Chapter Eight(3)
 
assembly
assemblyassembly
assembly
 
Ch9a
Ch9aCh9a
Ch9a
 
Arm (2)
Arm (2)Arm (2)
Arm (2)
 
Avr instruction set
Avr instruction setAvr instruction set
Avr instruction set
 
Advanced Techniques: Size | Pebble Developer Retreat 2014
Advanced Techniques: Size | Pebble Developer Retreat 2014Advanced Techniques: Size | Pebble Developer Retreat 2014
Advanced Techniques: Size | Pebble Developer Retreat 2014
 
L3_Representing Instructions in the Computer.pptx
L3_Representing Instructions in the Computer.pptxL3_Representing Instructions in the Computer.pptx
L3_Representing Instructions in the Computer.pptx
 
S emb t4-arch_cpu
S emb t4-arch_cpuS emb t4-arch_cpu
S emb t4-arch_cpu
 

Recently uploaded

bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
Divyam548318
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
Madan Karki
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
thanhdowork
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Soumen Santra
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
zwunae
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
awadeshbabu
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 

Recently uploaded (20)

bank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdfbank management system in java and mysql report1.pdf
bank management system in java and mysql report1.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
spirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptxspirit beverages ppt without graphics.pptx
spirit beverages ppt without graphics.pptx
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
RAT: Retrieval Augmented Thoughts Elicit Context-Aware Reasoning in Long-Hori...
 
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTSHeap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
Heap Sort (SS).ppt FOR ENGINEERING GRADUATES, BCA, MCA, MTECH, BSC STUDENTS
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单专业办理
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
[JPP-1] - (JEE 3.0) - Kinematics 1D - 14th May..pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 

ARM lab programs

  • 1. 1 write an ALP for addition two 64 bit numbers . AREA ADDTIN,CODE ENTRY ldr r0,=value1 ldr r1,[r0] ldr r2,[r0,#4] ldr r0,=value2 ldr r3,[r0] ldr r4,[r0,#4] adds r6,r2,r4 adc r5,r1,r3 ldr r0,=result str r5,[r0] str r6,[r0,#4] swi &11 value1 dcd &BBBBBBBB,&AAAAAAAA value2 dcd &CCCCCCCC,&FFFFFFFF result dcd &0
  • 2. 2 write an ALP for addition two 32 bits numbers . AREA ADDTIN,CODE ENTRY ldr r0,=value1 ldr r1,[r0] ldr r0,=value2 ldr r2,[r0] adds r3,r2,r1 value1 dcd &BBBBBBBB value2 dcd &CCCCCCCC end
  • 3.
  • 4. ;/*Program to find smallest of N numbers*/ AREA arr,code ENTRY main ldr r0,=data1 ldr r3,=0x40000000 ldr r4,=0x05 ;//length of loop ldr r1,[r0],#04 sub r4,r4,#01 back ldr r2,[r0] cmp r1,r2 bls less ;// branch on low mov r1,r2 less add r0,r0,#04 sub r4,r4,#01 cmp r4,#00 bne back str r1,[r3] ;// smallest value stored in memory location stop b stop AREA data,code data1 dcd &64,&05,&96,&10,&65 END
  • 5.
  • 6. ;/*Program to find largest of N numbers*/ AREA arr,code ENTRY main ldr r0,=data1 ldr r3,=0x40000000 ldr r4,=0x05 ;//length of loop ldr r1,[r0],#04 sub r4,r4,#01 back ldr r2,[r0] cmp r1,r2 bhs large ;// branch on low mov r1,r2 large add r0,r0,#04 sub r4,r4,#01 cmp r4,#00 bne back str r1,[r3] ;// smallest value stored in memory location stop b stop AREA data,code data1 dcd &64,&05,&9,&00,&65 END
  • 7.
  • 8. ;/*Program to convert Hex to ascii*/ AREA arr,code entry main ldr r0,=value1 ldr r1,[r0] mov r2,r1 cmp r1,#0x09 bhi grt add r1,r1,#0x30 ;//add 30 if data <9 bl nxt1 grt add r1,r1,#0x37 ;//add 37h if data>9 nxt1 ldr r4,=0x40000000 str r1,[r4] stop b stop AREA data,code value1 dcd &07 END
  • 9.
  • 10. ;/*Program to convert Ascii to hex*/ AREA arr,code entry main ldr r0,=value1 ldr r1,[r0] mov r2,r1 cmp r1,#0x39 bhi grt sub r1,r1,#0x30 ;//SUB 30 if data <39 bl nxt1 grt sub r1,r1,#0x37 ;//SUB 37h if data>39 nxt1 ldr r4,=0x40000000 str r1,[r4] stop b stop AREA data,code value1 dcd &41 END
  • 11.
  • 12. ;/*Progarm to generate N Fibonic numbers*/ AREA arr,code ENTRY main ldr r0,=value ldr r1,[r0] ldr r2,=0x40000000 ;/*memory location fibonic series*/ ldr r9,=0x02 ldr r3,=0x00 mov r6,r2 str r3,[r2],#04 add r3,r3,#01 mov r7,r2 str r3,[r2],#04 back ldr r4,[r6],#04 ldr r5,[r7],#04 add r5,r4,r5 str r5,[r2],#04 add r9,r9,#01 cmp r9,r1 BNE back stopb stop AREA data,code
  • 13. value dcd &0a ;/* here ten fibonic numbers are ganerated*/ END
  • 14. ;//* To find the factorial of a given number using subroutine*// AREA arr,code ENTRY main ldr r0,=value bl fact ;// call subroutine fact ldr r1,=0x40000000 str r5,[r1] stop b stop AREA data,code value dcd &0a fact mov r6,r14 ldr r2,[r0] cmp r2,#00 beq END1 mov r3,r2 loop sub r2,r2,#01 cmp r2,#00 mulne r3,r2,r3 bne loop mov r5,r3 bl END2
  • 15. END1 ldr r5,=0x01 END2 mov PC,r6 ;// return to main program. END
  • 16. ;//* To find the multiplication of two 32 bit number *// AREA ADDTIN,CODE ENTRY ldr r0,value1 ldr r1,value2 umull r4,r3,r1,r0 value1 dcd &BBBBBBBB value2 dcd &CCCCCCCC end