Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use any ARM assembly program you like but the Keil simulator would be nice. Sample code: ;;; Directives PRESERVE8 THUMB ; Vector Table Mapped to

Use any ARM assembly program you like but the Keil simulator would be nice.

image text in transcribed

Sample code:

image text in transcribed

;;; Directives

PRESERVE8

THUMB

; Vector Table Mapped to Address 0 at Reset

; Linker requires __Vectors to be exported

AREA RESET, DATA, READONLY

EXPORT __Vectors

__Vectors

DCD 0x20001000 ; stack pointer value when stack is empty

DCD Reset_Handler ; reset vector

ALIGN

; The program

; Linker requires Reset_Handler

AREA MYCODE, CODE, READONLY

ENTRY

EXPORT Reset_Handler

Reset_Handler

;;;;;;;;;;User Code Starts from the next line;;;;;;;;;;;;

MOV R0, #12

STOP

ADD R0, R0, #4

B STOP

END ;End of the program

;;; Directives PRESERVES THUMB ; Vector Table Mapped to Address O at Reset ; Linker requires Vectors to be exported AREA EXPORT RESET, DATA, READONLY Vectors Vectors DCD DCD Ox20001000 Reset Handler ; stack pointer value when stack is empty reset vector ALIGN ; The program ; Linker requires Reset_Handler AREA MYCODE, CODE, READONLY ENTRY EXPORT Reset_Handler Reset_Handler ;;;;;; User Code Starts from the next line; ; ; ; ; MOV RO, #12 STOP ADD RO, RO, #4 B STOP END ; End of the program ;;; Directives PRESERVES THUMB ; Vector Table Mapped to Address O at Reset ; Linker requires Vectors to be exported AREA EXPORT RESET, DATA, READONLY Vectors Vectors DCD DCD Ox20001000 Reset Handler ; stack pointer value when stack is empty reset vector ALIGN ; The program ; Linker requires Reset_Handler AREA MYCODE, CODE, READONLY ENTRY EXPORT Reset_Handler Reset_Handler ;;;;;; User Code Starts from the next line; ; ; ; ; MOV RO, #12 STOP ADD RO, RO, #4 B STOP END ; End of the program

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Readings In Database Systems

Authors: Michael Stonebraker

2nd Edition

0934613656, 9780934613651

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago