Consider the following AVR Assembly Language Code which is passed through an ass
ID: 3841812 • Letter: C
Question
Consider the following AVR Assembly Language Code which is passed through an assembler.
.include "m324Adef.inc"
jmp RESET
jmp HANDLER_1
.dseg
var1: .BYTE 2
var2: .BYTE 6
.cseg
const: .DB 0xAA, 0xCC, 0xDD
reset:
ldi ZL, low(var1)
ldi ZH, high(var1)
ldi r17, 0xBB
st Z, r17
ldi ZL, low(const<<1)
ldi ZH, high(const<<1)
lpm
jmp mainloop
.dseg
var3: .BYTE 4
.cseg
.org 0x15
mainloop:
ldi r20, 0xF0
...
Determine the segments and values of each of the following symbols. (Enter the segment as either "cseg" or "dseg" - without the quotes. Enter the values as decimal integers.).
Explanation / Answer
Symbol segnent value
var1 dseg 0xFF
var3 dseg 0xFF
reset cseg 2 (0x02)
const cseg 0 (0x00)
Mainloop cseg 10 (0x0A)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.