SlideShare a Scribd company logo
1 of 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

More Related Content

What's hot

Overlap Add, Overlap Save(digital signal processing)
Overlap Add, Overlap Save(digital signal processing)Overlap Add, Overlap Save(digital signal processing)
Overlap Add, Overlap Save(digital signal processing)Gourab Ghosh
 
Pic 18 microcontroller
Pic 18 microcontrollerPic 18 microcontroller
Pic 18 microcontrollerAshish Ranjan
 
Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerSudhanshu Janwadkar
 
Digital signal processor architecture
Digital signal processor architectureDigital signal processor architecture
Digital signal processor architecturekomal mistry
 
General Purpose Input Output - Brief Introduction
General Purpose Input Output - Brief IntroductionGeneral Purpose Input Output - Brief Introduction
General Purpose Input Output - Brief IntroductionNEEVEE Technologies
 
Code Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorCode Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorMOHIT AGARWAL
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-pptjemimajerome
 
Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Ganesh Ram
 
Verilog Tasks & Functions
Verilog Tasks & FunctionsVerilog Tasks & Functions
Verilog Tasks & Functionsanand hd
 
Verilog presentation final
Verilog presentation finalVerilog presentation final
Verilog presentation finalAnkur Gupta
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor Mustapha Fatty
 

What's hot (20)

Overlap Add, Overlap Save(digital signal processing)
Overlap Add, Overlap Save(digital signal processing)Overlap Add, Overlap Save(digital signal processing)
Overlap Add, Overlap Save(digital signal processing)
 
Pic 18 microcontroller
Pic 18 microcontrollerPic 18 microcontroller
Pic 18 microcontroller
 
Keypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 MicrocontrollerKeypad Interfacing with 8051 Microcontroller
Keypad Interfacing with 8051 Microcontroller
 
Switches and LEDs interface to the 8051 microcontroller
Switches and LEDs interface to the 8051 microcontrollerSwitches and LEDs interface to the 8051 microcontroller
Switches and LEDs interface to the 8051 microcontroller
 
Digital signal processor architecture
Digital signal processor architectureDigital signal processor architecture
Digital signal processor architecture
 
General Purpose Input Output - Brief Introduction
General Purpose Input Output - Brief IntroductionGeneral Purpose Input Output - Brief Introduction
General Purpose Input Output - Brief Introduction
 
ARM Architecture
ARM ArchitectureARM Architecture
ARM Architecture
 
Code Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorCode Conversion in 8085 Microprocessor
Code Conversion in 8085 Microprocessor
 
Micro program example
Micro program exampleMicro program example
Micro program example
 
8086-instruction-set-ppt
 8086-instruction-set-ppt 8086-instruction-set-ppt
8086-instruction-set-ppt
 
8086 alp
8086 alp8086 alp
8086 alp
 
Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))Architecture of 8051 microcontroller))
Architecture of 8051 microcontroller))
 
ARM Architecture
ARM ArchitectureARM Architecture
ARM Architecture
 
Serial Communication in 8051
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
 
Verilog Tasks & Functions
Verilog Tasks & FunctionsVerilog Tasks & Functions
Verilog Tasks & Functions
 
ARM Micro-controller
ARM Micro-controllerARM Micro-controller
ARM Micro-controller
 
Linear block code
Linear block codeLinear block code
Linear block code
 
Verilog presentation final
Verilog presentation finalVerilog presentation final
Verilog presentation final
 
Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor  Architecture of 8086 Microprocessor
Architecture of 8086 Microprocessor
 
DSP Processor
DSP Processor DSP Processor
DSP Processor
 

Viewers also liked

Arm7 Interfacing examples
Arm7   Interfacing examples Arm7   Interfacing examples
Arm7 Interfacing examples Dr.YNM
 
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
 

Viewers also liked (20)

Arm7 Interfacing examples
Arm7   Interfacing examples Arm7   Interfacing examples
Arm7 Interfacing examples
 
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
 
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
 

Similar to 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
 

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

Recently uploaded

Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHC Sai Kiran
 
lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxsomshekarkn64
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024Mark Billinghurst
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - GuideGOPINATHS437943
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...Chandu841456
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 

Recently uploaded (20)

Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECHIntroduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
 
lifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptxlifi-technology with integration of IOT.pptx
lifi-technology with integration of IOT.pptx
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024IVE Industry Focused Event - Defence Sector 2024
IVE Industry Focused Event - Defence Sector 2024
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 
Transport layer issues and challenges - Guide
Transport layer issues and challenges - GuideTransport layer issues and challenges - Guide
Transport layer issues and challenges - Guide
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...An experimental study in using natural admixture as an alternative for chemic...
An experimental study in using natural admixture as an alternative for chemic...
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 

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