Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION: What is the WORD VALUE (not byte, or longword) of the data in memory location $4000 when the program is just about to loop

QUESTION: What is the WORD VALUE (not byte, or longword) of the data in memory location $4000 when the program is just about to loop back to the beginning and start over again? Please describe how you got the answer as well. (For example, you can describe how you analyzed the code segments, or how you traced the code segments with debug tools)

image text in transcribed

* Beginning of EQUates section, just like #define in C addr1 EQU $4000 addr2 EQU $4001 data2 EQU SA7FF data3 EQU $5555 data4 EQU $0000 data5 EQU 4678 data6 EQU %01001111 data7 EQU %00010111 Beginning of code segment. This is the actual assembly language instructions. ORG $400 This pseudo op code tells the assembler here The program will run in memory start MOVE.W #data2, DO - Load DO MOVE.B #data6, D1 - Load D1 MOVE.B #data7, D2 * Load D2 MOVE.W #data3, D3 * Load D3 MOVEA.W #addr1, AO Load address register MOVE.B D1, (AC)+ Transfer byte to memory MOVE.B D2, (AO)+ Transfer second byte MOVEA.W #addr1, A1_Load address AND.W D3, (A1) *Logical AND Stop here. The next instruction shows how a label is used JMP start . This instruction keeps the program loping forever END $400 This pseudo op-code tells the assmbler where the program source code dns and where to load the program in memory *End of the program * Put program code here SIMHALT halt simulator Put variables and constants here END START last line of source * Beginning of EQUates section, just like #define in C addr1 EQU $4000 addr2 EQU $4001 data2 EQU SA7FF data3 EQU $5555 data4 EQU $0000 data5 EQU 4678 data6 EQU %01001111 data7 EQU %00010111 Beginning of code segment. This is the actual assembly language instructions. ORG $400 This pseudo op code tells the assembler here The program will run in memory start MOVE.W #data2, DO - Load DO MOVE.B #data6, D1 - Load D1 MOVE.B #data7, D2 * Load D2 MOVE.W #data3, D3 * Load D3 MOVEA.W #addr1, AO Load address register MOVE.B D1, (AC)+ Transfer byte to memory MOVE.B D2, (AO)+ Transfer second byte MOVEA.W #addr1, A1_Load address AND.W D3, (A1) *Logical AND Stop here. The next instruction shows how a label is used JMP start . This instruction keeps the program loping forever END $400 This pseudo op-code tells the assmbler where the program source code dns and where to load the program in memory *End of the program * Put program code here SIMHALT halt simulator Put variables and constants here END START last line of source

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

Deductive And Object Oriented Databases Second International Conference Dood 91 Munich Germany December 18 1991 Proceedings Lncs 566

Authors: Claude Delobel ,Michael Kifer ,Yoshifumi Masunaga

1st Edition

3540550151, 978-3540550150

More Books

Students also viewed these Databases questions

Question

Technology. Refer to Case

Answered: 1 week ago