SlideShare une entreprise Scribd logo
1  sur  16
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

Contenu connexe

Tendances (20)

TMS320C6X Architecture
TMS320C6X ArchitectureTMS320C6X Architecture
TMS320C6X Architecture
 
Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051Interfacing Stepper motor with 8051
Interfacing Stepper motor with 8051
 
8051 full ppt
8051 full ppt8051 full ppt
8051 full ppt
 
Memory & I/O interfacing
Memory & I/O  interfacingMemory & I/O  interfacing
Memory & I/O interfacing
 
8086 micro processor
8086 micro processor8086 micro processor
8086 micro processor
 
8085 instruction set
8085 instruction set8085 instruction set
8085 instruction set
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA Controller
 
Crash course in verilog
Crash course in verilogCrash course in verilog
Crash course in verilog
 
Microcontroller 8051 and its interfacing
Microcontroller 8051 and its interfacingMicrocontroller 8051 and its interfacing
Microcontroller 8051 and its interfacing
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware
 
ARM Processor
ARM ProcessorARM Processor
ARM Processor
 
Pic microcontroller architecture
Pic microcontroller architecturePic microcontroller architecture
Pic microcontroller architecture
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-ppt
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
Shifters
ShiftersShifters
Shifters
 
Unit II arm 7 Instruction Set
Unit II arm 7 Instruction SetUnit II arm 7 Instruction Set
Unit II arm 7 Instruction Set
 
Sensor interfacing in 8051
Sensor interfacing in 8051Sensor interfacing in 8051
Sensor interfacing in 8051
 
I2C Protocol
I2C ProtocolI2C Protocol
I2C Protocol
 
Serial Communication Interfaces
Serial Communication InterfacesSerial Communication Interfaces
Serial Communication Interfaces
 
Fpga
FpgaFpga
Fpga
 

En vedette

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 MICROCONTROLLERsravannunna24
 
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
 
ARM7-ARCHITECTURE
ARM7-ARCHITECTURE ARM7-ARCHITECTURE
ARM7-ARCHITECTURE Dr.YNM
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Aarav Soni
 
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 manualHari 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 GSMDarshak Patel
 
Arm teaching material
Arm teaching materialArm teaching material
Arm teaching materialJohn Williams
 
ARM procedure calling conventions and recursion
ARM procedure calling conventions and recursionARM procedure calling conventions and recursion
ARM procedure calling conventions and recursionStephan Cadene
 
Analog to Digital converter in ARM
Analog to Digital converter in ARMAnalog to Digital converter in ARM
Analog to Digital converter in ARMAarav Soni
 
PIPELINE INTERRUPTS
PIPELINE INTERRUPTSPIPELINE INTERRUPTS
PIPELINE INTERRUPTSM R Karthik
 
Assignment of pseudo code
Assignment of pseudo codeAssignment of pseudo code
Assignment of pseudo codeBurhan Chaudhry
 

En vedette (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
 
ARM7-ARCHITECTURE
ARM7-ARCHITECTURE ARM7-ARCHITECTURE
ARM7-ARCHITECTURE
 
Ppt
PptPpt
Ppt
 
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
 

Similaire à ARM lab programs

Arm instruction set
Arm instruction setArm instruction set
Arm instruction setRavi Babu
 
Lathe Spindle Sensor
Lathe Spindle SensorLathe Spindle Sensor
Lathe Spindle SensorJoeCritt
 
Module 2 PPT of ES.pptx
Module 2 PPT of ES.pptxModule 2 PPT of ES.pptx
Module 2 PPT of ES.pptxshruthi810379
 
15CS44 MP & MC module 5
15CS44 MP & MC  module 515CS44 MP & MC  module 5
15CS44 MP & MC module 5RLJIT
 
Lec2.ppt
Lec2.pptLec2.ppt
Lec2.pptfgjf1
 
커널코드분석 20140621(head.s restart)
커널코드분석 20140621(head.s restart)커널코드분석 20140621(head.s restart)
커널코드분석 20140621(head.s restart)Dongpyo Lee
 
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.pdffcsondhiindia
 
Chapter Eight(3)
Chapter Eight(3)Chapter Eight(3)
Chapter Eight(3)bolovv
 
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 2014Pebble 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.pptxhariharan kalyanaraman
 

Similaire à 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
 
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
 

Dernier

University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfrs7054576148
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Arindam Chakraborty, Ph.D., P.E. (CA, TX)
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 

Dernier (20)

University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Intro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdfIntro To Electric Vehicles PDF Notes.pdf
Intro To Electric Vehicles PDF Notes.pdf
 
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 

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