Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The objective of this assignment is to explore the PUSH and POP instructions, part of the machine control group, as well as constructing logic loops.

image text in transcribed
The objective of this assignment is to explore the PUSH and POP instructions, part of the machine control group, as well as constructing logic loops. If you find any part of the assignment not clear or confusing and you want to make assumptions, indicate the assumptions and state why the assumption is made. 1) The execution time of the Assembly mnemonic program given below is approximately 523.4 milliseconds(this program is commonly referred as a time delay program) RAM/OC 2000 LXI D.0000 2003 DCXD 2004 MOVAD 2005 ORA E 2006 INZ 2003 2009 RST (a) Draw a clear neat flow chart of the above program (b) Convert the above program into OC (Assembly operational codes) (c) Indicate the number of cycles associate with cach instruction (d) Note that the number of cycles associated with JNZ are 7 and 10: 7 ir leaving the loop (next instruction at 2009 and 10 when staying in the loop (next instruction at 2003) (c) Verify Calculate the execution time of the program (clearly indicate all the calculations and equation used). The execution time - (330 nanoseconds cycle) x (total number of cycles executed from memory location 2000 to memory location 2009). Note that instructions inside the loop will be executed many times (2 ) while the instructions outside the loop will be executed just once. ( Note also that the instruction ORA E means (A) [AJ V[E] (the v-Booleanor and the Fregister is set. in particular the Z bit), note also that 2006 INZ 2003 means if 7-0 then the next instruction to be executed is at memory location 2003, otherwise if Z-1 the next instruction to be executed is al memory location 2009 (end). 2) Change and calculate the value of the DE register of part (1) to provide an execution time of exactly 0.5 second. Clearly indicate the calculations as well as the equation employed 3) Tutorial: the PUH and POP Assembly instructions (a) Before you use the PUSH instruction make sure that LXI SP, 2002 is the first instruction of your program (at memory location 2000, 2001 and 2003). (b) The PUSH is a 1 byte instruction that saves the contents of two (2) CPU registers (c) For example PUSH PSW (PROGRAM STATUS WORD CHECK YOUR ASSEMBLER), saves the values of REGISTETRS A and F, in RAM following the stack protocol LIFO (last in first out) as indicated below: [SP]-1--[A] (A is saved in memory location 20CI) [SP] -2-[F] (F is saved in memory location 2000) [SP] -- [SP]-2 (update the value of the stack pointer SP) 4) NOTE that PUSH B. for example would save the values of The objective of this assignment is to explore the PUSH and POP instructions, part of the machine control group, as well as constructing logic loops. If you find any part of the assignment not clear or confusing and you want to make assumptions, indicate the assumptions and state why the assumption is made. 1) The execution time of the Assembly mnemonic program given below is approximately 523.4 milliseconds(this program is commonly referred as a time delay program) RAM/OC 2000 LXI D.0000 2003 DCXD 2004 MOVAD 2005 ORA E 2006 INZ 2003 2009 RST (a) Draw a clear neat flow chart of the above program (b) Convert the above program into OC (Assembly operational codes) (c) Indicate the number of cycles associate with cach instruction (d) Note that the number of cycles associated with JNZ are 7 and 10: 7 ir leaving the loop (next instruction at 2009 and 10 when staying in the loop (next instruction at 2003) (c) Verify Calculate the execution time of the program (clearly indicate all the calculations and equation used). The execution time - (330 nanoseconds cycle) x (total number of cycles executed from memory location 2000 to memory location 2009). Note that instructions inside the loop will be executed many times (2 ) while the instructions outside the loop will be executed just once. ( Note also that the instruction ORA E means (A) [AJ V[E] (the v-Booleanor and the Fregister is set. in particular the Z bit), note also that 2006 INZ 2003 means if 7-0 then the next instruction to be executed is at memory location 2003, otherwise if Z-1 the next instruction to be executed is al memory location 2009 (end). 2) Change and calculate the value of the DE register of part (1) to provide an execution time of exactly 0.5 second. Clearly indicate the calculations as well as the equation employed 3) Tutorial: the PUH and POP Assembly instructions (a) Before you use the PUSH instruction make sure that LXI SP, 2002 is the first instruction of your program (at memory location 2000, 2001 and 2003). (b) The PUSH is a 1 byte instruction that saves the contents of two (2) CPU registers (c) For example PUSH PSW (PROGRAM STATUS WORD CHECK YOUR ASSEMBLER), saves the values of REGISTETRS A and F, in RAM following the stack protocol LIFO (last in first out) as indicated below: [SP]-1--[A] (A is saved in memory location 20CI) [SP] -2-[F] (F is saved in memory location 2000) [SP] -- [SP]-2 (update the value of the stack pointer SP) 4) NOTE that PUSH B. for example would save the values of

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

The Politics Of Public Management The HRDC Audit Of Grants And Contributions

Authors: David A. Good

2nd Edition

0802085873, 978-0802085870

More Books

Students also viewed these Accounting questions

Question

6. Explain the power of labels.

Answered: 1 week ago

Question

5. Give examples of variations in contextual rules.

Answered: 1 week ago

Question

f. What stereotypes were reinforced in the commercials?

Answered: 1 week ago