Preview

23rd Century and Following Program Segment

Satisfactory Essays
Open Document
Open Document
694 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
23rd Century and Following Program Segment
ASSIGNMENT -2 Microprocessors Due date Thursday August 8
Name: Student ID:

Question 1 (15 Marks) Answer the following questions: a) What is a stack? b) What is the purpose of the stack pointer? c) What type of instruction is used to retrieve data from the stack? d) What addressing modes can the JMP instruction use? e) How is the stack pointer affected by the JSR instruction? f) What is a nested subroutine? g) What are the two methods by which microprocessors handle I/O operations? h) Write a program segment that will: read in data from the switch bank in address $1500 and double the number and display the result on the LED bank in address $1600.

Question 2 (5 Marks) Consider the following program segment LDAA #$05 LDAB #$04 INCB SBA WAI After executing the program, the condition code register flags (N,V,Z,C) will be: N V Z C

1

Question 3 (10 Marks) Consider the following program segment: LDX #$2000 LDAA 00, X LDAB 01, X ABA CMPA #$0A BEQ LABEL1 LDAA #$FF STAA $2005 BRA END LABEL1: LDAA #$BA STAA $2005 WAI

END:

Assuming we have 2000 2001 $04 $06

After running the above program segment, what is the content of memory location $2005? Question 4 (10 Marks) Consider the following program segment. LDS #$2000 LDX #$2200 LDAB #6 LDAA 00, X PSHA INX DECB BNE LOOP1 LDX #$2300 LDAB #6 PULA ASLA STAA 00,X INX DECB BNE LOOP2 SWI

LOOP1:

LOOP2:

2

If the contents of address $2200, $2201, $2202, … , $2206 are as follows: 2200 2201 2202 2203 2204 2205 2206 $01 $02 $03 $04 $05 $06 $07

What would be the contents of address of $2300, $2301, …, $2306

2300 2301 2302 2303 2304 2305

? ? ? ? ? ?

Question 5 (10 Marks) Consider the following program segment: ORG LDS START LDAA LDAB STAA JSR ABA STAA STAB WAI SUB1 PSHA PSHB PULA PULB ADDA $1040 RTS #$08 #$05 $1040 SUB1 $2100 $2101 $4000 #$3FFF

3

After running the above program, what is the content of memory location $2100 and $2101? Completely explain your answer!

Question 6 (5 Marks)

You May Also Find These Documents Helpful

  • Good Essays

    The operating system occupies low memory, starting with memory address 0. Directly afterwards is system control information, then the various resident operating system…

    • 7085 Words
    • 29 Pages
    Good Essays
  • Satisfactory Essays

    = z) return true; else return false; } Problem 5 a. Output: 720 b. Output: 0 c. Output: 71 d. Output: 362880 Problem 6 a. Output: “Take Programming I.” b. Output:…

    • 188 Words
    • 1 Page
    Satisfactory Essays
  • Satisfactory Essays

    SD1230 Lab 1

    • 239 Words
    • 2 Pages

    2. What type of instruction is used to execute different code based on a condition? -Jumps…

    • 239 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    A. the CPU tells the RAM which address holds the data that the CPU wants to read…

    • 957 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    1. What UID and PID have the highest amount of physical memory that a process has used and is not swapped out? Show all processes and full output.…

    • 537 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Nt1310 Unit 3 Quiz

    • 6337 Words
    • 26 Pages

    10 [Ans] Corrected by buddy by running the program Choice 4 11 Choice 5 12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /*question number With every use of release allocated Choice 1 unalloc() Choice 2 dropmem() Choice 3 dealloc() Choice 4 release() Choice 5 free() [Ans] - - - - - - - - 2*/ a memory allocation function, what function should be used to memory which is no longer needed?…

    • 6337 Words
    • 26 Pages
    Good Essays
  • Good Essays

    Nt1210 Chapter 1 Review

    • 1315 Words
    • 6 Pages

    6. A user file has opened a word processor, typed the numbers 123456789, and stored the document as a file called report 1. Which of the following determines, in part what bits the computer stores in the file to represent the text typed into the report.…

    • 1315 Words
    • 6 Pages
    Good Essays
  • Satisfactory Essays

    ACC 349 Entire Course

    • 571 Words
    • 3 Pages

    ACC-349-week 1 assignment-E2-9.1.doc ACC-349-week 1 assignment-E2-9.1.xls ACC-349-week 1 assignment-E3-5.1.xls ACC-349-week 1 assignment-E3-9-Memo.1.doc ACC-349-week 1 assignment-E3-9.1.doc ACC-349-week 2 deliverables-chapter-4.xls ACC-349-week 2 deliverables-E4-10.1.doc ACC-349-week 2 deliverables-E4-11-answer.1.xls ACC-349-week 2 deliverables-E4-11-Memo.doc ACC-349-week 3 deliverables-E5-1.1.doc ACC-349-week 3 deliverables-E5-9-Regional-Airways.xls ACC-349-week 3 deliverables-E6-10-Ind.1.doc ACC-349-week 3 deliverables-E6-10.1.doc…

    • 571 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Quiz Comp Archi

    • 438 Words
    • 3 Pages

    12) Please list registers and their functions in ARM. How many general purpose registers and how to use them in the program?…

    • 438 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    POS355 Week 1 Individual

    • 574 Words
    • 2 Pages

    There are several items that are pertinent to memory management such as, basic hardware, the binding of symbolic memory addresses to definite physical addresses and the difference between logical and physical addresses. The most important task that memory management executes is the distribution and collection of memory…

    • 574 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    The operating systems job is managing the memory. The operating system is in charge of bringing this process into main memory (Stallings, 2012). However the processor must deal with references within the program. Branch instructions include an address to reference the order to be executed next. Data reference instructions include the address of the byte or word of data referenced. The processor hardware and operating system software must be able to translate the memory references found in the code of the program into actual physical memory addresses, reflecting the current location of the program in main memory. (Stallings, 2012).…

    • 573 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Coding Application Report

    • 2395 Words
    • 10 Pages

    Review the ten Coding Application statements below and provide the answer for each problem as instructed. To print and review the problems before completing the Test click here.…

    • 2395 Words
    • 10 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Intro the Programming

    • 386 Words
    • 5 Pages

    The _______ is the memory address that is saved by the system when a method is called and is the location to which…

    • 386 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Cache memory is on the main chip, it can be accessed much more quickly than RAM, which is restricted by the BUS speed. Data is held in the Processor cache memory, where it is close to the processor, thus speeding up the operation of the processor. The implementations of cache memory on multi-core chips do vary from one manufacturer to another but have to adhere to a certain code.…

    • 922 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    Dynamic Memory Allocation

    • 425 Words
    • 2 Pages

    But many times we are not aware in advance about how much memory we will need to store particular information in a defined variable. The size of required memory may be determined only during the run time , i.e. when the program is being run.…

    • 425 Words
    • 2 Pages
    Good Essays

Related Topics