I am trying to understand the hex file generated by the AVR Studio. I wrote a code in assembly. The code is as follows:
#include "m328pdef.inc"
.org 33
rjmp reset
reset:
add r16,r17
main:
out DDRB,r16
rjmp main
The .org
is to hard code my code into the memory location 33. Then I checked the generated hex file. That is as follows:
:020000020000FC
:0800420000C0010F04B9FECF5C
:00000001FF
The 2nd line should be of interest. The address where this is stored is 0042. How so? Can you kindly clarify my understanding please.