Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Topic Video
Question
Answer 2 only Write an assembly subroutine program DELAY that loops 2500 times.
Write an assembly subroutine program DELAY that loops 2500 times.
3.
Quadratic equation below is to be executed using Atmega32. Variable X is an 8-bit signed number taken
from input pin of Port B. The output of the computation is send to Port C (HIGHER BYTE) and Port D
(LOWER BYTE). Write an assembly program that performs the quadratic equation below.
LDI
OUT
LDI
OUT
OUT
Y = (X²+3X)/2
R16, e
DDRB, R16
R17, 0xFF
DDRC, R17
DDRD, R17
expand button
Transcribed Image Text:Write an assembly subroutine program DELAY that loops 2500 times. 3. Quadratic equation below is to be executed using Atmega32. Variable X is an 8-bit signed number taken from input pin of Port B. The output of the computation is send to Port C (HIGHER BYTE) and Port D (LOWER BYTE). Write an assembly program that performs the quadratic equation below. LDI OUT LDI OUT OUT Y = (X²+3X)/2 R16, e DDRB, R16 R17, 0xFF DDRC, R17 DDRD, R17
1.
SECTION
LECTURER:
i.
ii.
ADDRESS
00000000:
00000001:
00000002:
00000003:
00000004:
LDI
00000005:
LDI
00000006:
LDI
00000007:
PUSH
00000008:
PUSH
00000009:
PUSH
0000000A:
CALL
0000000C: EXIT:
JMP
eeeeeeeE: MUL_FUNC: ADD
0000000F:
SUB
00000010:
00000011:
R16
Figure 1 shows an incomplete assembly program with a subroutine. Based on the assembly program,
answer the following questions.
R17
OPCODE
MUL
RET
R18
4-jan 2023
State the contents of the following table after this assembly program is executed.
PROGRAM
COUNTER, PC
1
OPERAND
R16, 0xAA
R17, 0xBB
R18, 0XCC
R17
R18
R16
Figure 1
The stack pointer must be initialized at the uppermost data memory location. Complete the assembly
program by adding the missing instructions and write it in Figure 1.
MUL_FUNC
EXIT
R16, R17
R18, R17
R16, R18
MARKS
TIME: 1 hour 15
STACK
POINTER, SP
/40
0x85D 0x85E
0x85F
expand button
Transcribed Image Text:1. SECTION LECTURER: i. ii. ADDRESS 00000000: 00000001: 00000002: 00000003: 00000004: LDI 00000005: LDI 00000006: LDI 00000007: PUSH 00000008: PUSH 00000009: PUSH 0000000A: CALL 0000000C: EXIT: JMP eeeeeeeE: MUL_FUNC: ADD 0000000F: SUB 00000010: 00000011: R16 Figure 1 shows an incomplete assembly program with a subroutine. Based on the assembly program, answer the following questions. R17 OPCODE MUL RET R18 4-jan 2023 State the contents of the following table after this assembly program is executed. PROGRAM COUNTER, PC 1 OPERAND R16, 0xAA R17, 0xBB R18, 0XCC R17 R18 R16 Figure 1 The stack pointer must be initialized at the uppermost data memory location. Complete the assembly program by adding the missing instructions and write it in Figure 1. MUL_FUNC EXIT R16, R17 R18, R17 R16, R18 MARKS TIME: 1 hour 15 STACK POINTER, SP /40 0x85D 0x85E 0x85F
Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education