Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

LAB Assignment #1 Due date: Monday, February 17, before 1:00 pm (no late submission accepted) Download the Wookie IDE from the Canvas page (Software Module).

image text in transcribedimage text in transcribed

LAB Assignment #1 Due date: Monday, February 17, before 1:00 pm (no late submission accepted) Download the Wookie IDE from the Canvas page ("Software" Module). Copy the following assembly language programming example into a text file named ASSGN1.ASM * *********************************************** * * * This program will add datal and data3 and subtract data2 * * * Table to be filled out | Register A Memory $B003NZVC || * Step | PC * * 1 | * * AWN * * * ******************************************** * data location starts at $B000 ORG $B000 DATA1 FCB 10 DATA2 FCB DATA3 FCB $1A RESULT RMB 15 declare 1-byte variable DATA1 and initialize it with 10 declare 1-byte variable DATA2 and initialize it with 15 declare 1-byte variable DATA3 and initialize it with $1A declare 1-byte variable RESULT * main program starts at $C000 ORG $C000 LDAA SUBA ADDA STAA BRA END DATA1 DATA2 DATA3 RESULT DONE load A with DATA1 subtract DATA2 from A add DATA3 to A store A in RESULT a little goofy, but convenient Tells the Assembler that we're done DONE Expand on documentation in the program header (add your name, student ID#, date, etc, at the beginning). Load it into Wookie, assemble it, and single-step through the program. Complete the table given in the header of this .asm file by filling in the contents of the PC, register A, memory cell $B003, and flags NZVC after the fetch and execution of each instruction. Thus, the table should have 4 rows, one for each instruction (excluding the final branch). For an introduction on how to assemble and simulate a program, please read the "Software Tutorial" in the Canvas "Software Module. Notes: 1. ORG $C000 sets the starting address for the block that follows that ORG statement to $C000 2. RESULT RMB 1 declares a 1-byte RESULT variable (i.e., int RESULT;) 3. "DATA1 FCB 10 declares a 1-bye DATA1 variable and initializes the variable with 10 (i.e., int DATA1 = 10;) 4. DONE BRA DONE implements an infinite loop 5. You have to record the values of 4 flags (NZVC) that are all stored in the condition code register (CCR). You already know the C and V flags. The N and the Z flags are new. The N flag signals if a result is negative, while the Z flag signals if a result is zero. Turn in: Electronically submit your .ASM file with the filled-out table on Canvas by 1:00pm on the due date (no late submission allowed for this lab). LAB Assignment #1 Due date: Monday, February 17, before 1:00 pm (no late submission accepted) Download the Wookie IDE from the Canvas page ("Software" Module). Copy the following assembly language programming example into a text file named ASSGN1.ASM * *********************************************** * * * This program will add datal and data3 and subtract data2 * * * Table to be filled out | Register A Memory $B003NZVC || * Step | PC * * 1 | * * AWN * * * ******************************************** * data location starts at $B000 ORG $B000 DATA1 FCB 10 DATA2 FCB DATA3 FCB $1A RESULT RMB 15 declare 1-byte variable DATA1 and initialize it with 10 declare 1-byte variable DATA2 and initialize it with 15 declare 1-byte variable DATA3 and initialize it with $1A declare 1-byte variable RESULT * main program starts at $C000 ORG $C000 LDAA SUBA ADDA STAA BRA END DATA1 DATA2 DATA3 RESULT DONE load A with DATA1 subtract DATA2 from A add DATA3 to A store A in RESULT a little goofy, but convenient Tells the Assembler that we're done DONE Expand on documentation in the program header (add your name, student ID#, date, etc, at the beginning). Load it into Wookie, assemble it, and single-step through the program. Complete the table given in the header of this .asm file by filling in the contents of the PC, register A, memory cell $B003, and flags NZVC after the fetch and execution of each instruction. Thus, the table should have 4 rows, one for each instruction (excluding the final branch). For an introduction on how to assemble and simulate a program, please read the "Software Tutorial" in the Canvas "Software Module. Notes: 1. ORG $C000 sets the starting address for the block that follows that ORG statement to $C000 2. RESULT RMB 1 declares a 1-byte RESULT variable (i.e., int RESULT;) 3. "DATA1 FCB 10 declares a 1-bye DATA1 variable and initializes the variable with 10 (i.e., int DATA1 = 10;) 4. DONE BRA DONE implements an infinite loop 5. You have to record the values of 4 flags (NZVC) that are all stored in the condition code register (CCR). You already know the C and V flags. The N and the Z flags are new. The N flag signals if a result is negative, while the Z flag signals if a result is zero. Turn in: Electronically submit your .ASM file with the filled-out table on Canvas by 1:00pm on the due date (no late submission allowed for this lab)

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_2

Step: 3

blur-text-image_3

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

Data Analysis Using SQL And Excel

Authors: Gordon S Linoff

2nd Edition

111902143X, 9781119021438

More Books

Students also viewed these Databases questions

Question

What is meant by framing a case?

Answered: 1 week ago

Question

Fill out the yellow boxes of the balance sheet 3 3

Answered: 1 week ago