Answer to Question #4831 in Assembler for LLawliet

Question #4831
Consider the following AVR Assembly Language Code which is passed through an assembler. .include "" jmp RESET jmp HANDLER_1 .dseg var1: .BYTE 1 var2: .BYTE 3 .cseg const: .DB 0xAA, 0xCC .org 0x20 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 .dseg var3: .BYTE 4 .cseg 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.). Symbol Segment Value var1 var3 reset const mainloop (This is a table - fill it in)
Expert's answer
Symbol Segment Value
var1 dseg 0xFF
var3 dseg 0xFF
reset cseg 2 (0x02)
const cseg 0 (0x00)

mainloop cseg 10 (0x0A)

All instructions have 1-word(2 bytes) length. Every word has it's own address. var1 and var3 are not initialized, 1 and 3 show how many bytes are

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

New on Blog