2010-09-22 09:04:33 -04:00
|
|
|
|
|
|
|
optiboot_luminet.elf: file format elf32-avr
|
|
|
|
|
|
|
|
Sections:
|
|
|
|
Idx Name Size VMA LMA File off Algn
|
2011-06-10 17:47:47 -07:00
|
|
|
0 .version 00000002 00001efe 00001efe 000002c8 2**0
|
|
|
|
CONTENTS, READONLY
|
|
|
|
1 .text 00000274 00000000 00000000 00000054 2**1
|
2010-09-22 09:04:33 -04:00
|
|
|
CONTENTS, ALLOC, LOAD, READONLY, CODE
|
2011-06-10 17:47:47 -07:00
|
|
|
2 .debug_aranges 00000028 00000000 00000000 000002ca 2**0
|
2010-09-22 09:04:33 -04:00
|
|
|
CONTENTS, READONLY, DEBUGGING
|
2011-06-10 17:47:47 -07:00
|
|
|
3 .debug_pubnames 00000078 00000000 00000000 000002f2 2**0
|
2010-09-22 09:04:33 -04:00
|
|
|
CONTENTS, READONLY, DEBUGGING
|
2011-06-10 17:47:47 -07:00
|
|
|
4 .debug_info 000002a5 00000000 00000000 0000036a 2**0
|
2010-09-22 09:04:33 -04:00
|
|
|
CONTENTS, READONLY, DEBUGGING
|
2011-06-10 17:47:47 -07:00
|
|
|
5 .debug_abbrev 0000019d 00000000 00000000 0000060f 2**0
|
2010-09-22 09:04:33 -04:00
|
|
|
CONTENTS, READONLY, DEBUGGING
|
2011-06-10 17:47:47 -07:00
|
|
|
6 .debug_line 000004ac 00000000 00000000 000007ac 2**0
|
2010-09-22 09:04:33 -04:00
|
|
|
CONTENTS, READONLY, DEBUGGING
|
2011-06-10 17:47:47 -07:00
|
|
|
7 .debug_frame 000000a0 00000000 00000000 00000c58 2**2
|
2010-09-22 09:04:33 -04:00
|
|
|
CONTENTS, READONLY, DEBUGGING
|
2011-06-10 17:47:47 -07:00
|
|
|
8 .debug_str 00000150 00000000 00000000 00000cf8 2**0
|
2010-09-22 09:04:33 -04:00
|
|
|
CONTENTS, READONLY, DEBUGGING
|
2011-06-10 17:47:47 -07:00
|
|
|
9 .debug_loc 00000194 00000000 00000000 00000e48 2**0
|
2010-09-22 09:04:33 -04:00
|
|
|
CONTENTS, READONLY, DEBUGGING
|
2011-06-10 17:47:47 -07:00
|
|
|
10 .debug_ranges 00000088 00000000 00000000 00000fdc 2**0
|
2010-09-22 09:04:33 -04:00
|
|
|
CONTENTS, READONLY, DEBUGGING
|
|
|
|
|
|
|
|
Disassembly of section .text:
|
|
|
|
|
2011-06-10 17:47:47 -07:00
|
|
|
00000000 <main>:
|
2011-06-10 16:17:13 -07:00
|
|
|
#define rstVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+4))
|
|
|
|
#define wdtVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+6))
|
2010-09-22 09:04:33 -04:00
|
|
|
#endif
|
2011-06-10 16:17:13 -07:00
|
|
|
|
2010-09-22 09:04:33 -04:00
|
|
|
/* main program starts here */
|
|
|
|
int main(void) {
|
2011-06-10 17:47:47 -07:00
|
|
|
0: 11 24 eor r1, r1
|
2011-06-10 16:17:13 -07:00
|
|
|
#ifdef __AVR_ATmega8__
|
|
|
|
SP=RAMEND; // This is done by hardware reset
|
2010-09-22 09:04:33 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// Adaboot no-wait mod
|
|
|
|
ch = MCUSR;
|
2011-06-10 17:47:47 -07:00
|
|
|
2: 84 b7 in r24, 0x34 ; 52
|
2010-09-22 09:04:33 -04:00
|
|
|
MCUSR = 0;
|
2011-06-10 17:47:47 -07:00
|
|
|
4: 14 be out 0x34, r1 ; 52
|
2010-09-22 09:04:33 -04:00
|
|
|
if (!(ch & _BV(EXTRF))) appStart();
|
2011-06-10 17:47:47 -07:00
|
|
|
6: 81 ff sbrs r24, 1
|
|
|
|
8: 22 d1 rcall .+580 ; 0x24e <appStart>
|
2011-06-10 16:17:13 -07:00
|
|
|
|
|
|
|
#if LED_START_FLASHES > 0
|
|
|
|
// Set up Timer 1 for timeout counter
|
|
|
|
TCCR1B = _BV(CS12) | _BV(CS10); // div 1024
|
2011-06-10 17:47:47 -07:00
|
|
|
a: 85 e0 ldi r24, 0x05 ; 5
|
|
|
|
c: 8e bd out 0x2e, r24 ; 46
|
2011-06-10 16:17:13 -07:00
|
|
|
UBRR0L = (uint8_t)( (F_CPU + BAUD_RATE * 4L) / (BAUD_RATE * 8L) - 1 );
|
|
|
|
#endif
|
|
|
|
#endif
|
2010-09-22 09:04:33 -04:00
|
|
|
|
|
|
|
// Set up watchdog to trigger after 500ms
|
2011-06-10 16:17:13 -07:00
|
|
|
watchdogConfig(WATCHDOG_1S);
|
2011-06-10 17:47:47 -07:00
|
|
|
e: 8e e0 ldi r24, 0x0E ; 14
|
|
|
|
10: 1a d1 rcall .+564 ; 0x246 <watchdogConfig>
|
2010-09-22 09:04:33 -04:00
|
|
|
|
|
|
|
/* Set LED pin as output */
|
|
|
|
LED_DDR |= _BV(LED);
|
2011-06-10 17:47:47 -07:00
|
|
|
12: d4 9a sbi 0x1a, 4 ; 26
|
2010-09-22 09:04:33 -04:00
|
|
|
|
|
|
|
#ifdef SOFT_UART
|
|
|
|
/* Set TX pin as output */
|
|
|
|
UART_DDR |= _BV(UART_TX_BIT);
|
2011-06-10 17:47:47 -07:00
|
|
|
14: d2 9a sbi 0x1a, 2 ; 26
|
|
|
|
16: 86 e0 ldi r24, 0x06 ; 6
|
2010-09-22 09:04:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
#if LED_START_FLASHES > 0
|
|
|
|
void flash_led(uint8_t count) {
|
|
|
|
do {
|
|
|
|
TCNT1 = -(F_CPU/(1024*16));
|
2011-06-10 17:47:47 -07:00
|
|
|
18: 23 ec ldi r18, 0xC3 ; 195
|
|
|
|
1a: 3f ef ldi r19, 0xFF ; 255
|
2010-09-22 09:04:33 -04:00
|
|
|
TIFR1 = _BV(TOV1);
|
2011-06-10 17:47:47 -07:00
|
|
|
1c: 91 e0 ldi r25, 0x01 ; 1
|
2010-09-22 09:04:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
#if LED_START_FLASHES > 0
|
|
|
|
void flash_led(uint8_t count) {
|
|
|
|
do {
|
|
|
|
TCNT1 = -(F_CPU/(1024*16));
|
2011-06-10 17:47:47 -07:00
|
|
|
1e: 3d bd out 0x2d, r19 ; 45
|
|
|
|
20: 2c bd out 0x2c, r18 ; 44
|
2010-09-22 09:04:33 -04:00
|
|
|
TIFR1 = _BV(TOV1);
|
2011-06-10 17:47:47 -07:00
|
|
|
22: 9b b9 out 0x0b, r25 ; 11
|
2010-09-22 09:04:33 -04:00
|
|
|
while(!(TIFR1 & _BV(TOV1)));
|
2011-06-10 17:47:47 -07:00
|
|
|
24: 58 9b sbis 0x0b, 0 ; 11
|
|
|
|
26: fe cf rjmp .-4 ; 0x24 <__zero_reg__+0x23>
|
2011-06-10 16:17:13 -07:00
|
|
|
#ifdef __AVR_ATmega8__
|
|
|
|
LED_PORT ^= _BV(LED);
|
|
|
|
#else
|
2010-09-22 09:04:33 -04:00
|
|
|
LED_PIN |= _BV(LED);
|
2011-06-10 17:47:47 -07:00
|
|
|
28: cc 9a sbi 0x19, 4 ; 25
|
2010-09-22 09:04:33 -04:00
|
|
|
return getch();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Watchdog functions. These are only safe with interrupts turned off.
|
|
|
|
void watchdogReset() {
|
|
|
|
__asm__ __volatile__ (
|
2011-06-10 17:47:47 -07:00
|
|
|
2a: a8 95 wdr
|
2011-06-10 16:17:13 -07:00
|
|
|
LED_PORT ^= _BV(LED);
|
|
|
|
#else
|
2010-09-22 09:04:33 -04:00
|
|
|
LED_PIN |= _BV(LED);
|
2011-06-10 16:17:13 -07:00
|
|
|
#endif
|
2010-09-22 09:04:33 -04:00
|
|
|
watchdogReset();
|
|
|
|
} while (--count);
|
2011-06-10 17:47:47 -07:00
|
|
|
2c: 81 50 subi r24, 0x01 ; 1
|
|
|
|
2e: b9 f7 brne .-18 ; 0x1e <__zero_reg__+0x1d>
|
2010-09-22 09:04:33 -04:00
|
|
|
/* get character from UART */
|
|
|
|
ch = getch();
|
|
|
|
|
|
|
|
if(ch == STK_GET_PARAMETER) {
|
|
|
|
// GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy
|
|
|
|
getNch(1);
|
2011-06-10 17:47:47 -07:00
|
|
|
30: dd 24 eor r13, r13
|
|
|
|
32: d3 94 inc r13
|
2011-06-10 16:17:13 -07:00
|
|
|
__boot_page_fill_short((uint16_t)(void*)addrPtr,a);
|
2010-09-22 09:04:33 -04:00
|
|
|
addrPtr += 2;
|
|
|
|
} while (--ch);
|
2011-06-10 17:47:47 -07:00
|
|
|
|
2010-09-22 09:04:33 -04:00
|
|
|
// Write from programming buffer
|
2011-06-10 16:17:13 -07:00
|
|
|
__boot_page_write_short((uint16_t)(void*)address);
|
2011-06-10 17:47:47 -07:00
|
|
|
34: 85 e0 ldi r24, 0x05 ; 5
|
|
|
|
36: c8 2e mov r12, r24
|
2010-09-22 09:04:33 -04:00
|
|
|
vect -= 4; // Instruction is a relative jump (rjmp), so recalculate.
|
2011-06-10 16:17:13 -07:00
|
|
|
buff[8] = vect & 0xff;
|
|
|
|
buff[9] = vect >> 8;
|
2010-09-22 09:04:33 -04:00
|
|
|
|
|
|
|
// Add jump to bootloader at RESET vector
|
|
|
|
buff[0] = 0x7f;
|
2011-06-10 17:47:47 -07:00
|
|
|
38: 0f e7 ldi r16, 0x7F ; 127
|
|
|
|
3a: f0 2e mov r15, r16
|
2010-09-22 09:04:33 -04:00
|
|
|
buff[1] = 0xce; // rjmp 0x1d00 instruction
|
2011-06-10 17:47:47 -07:00
|
|
|
3c: 1e ec ldi r17, 0xCE ; 206
|
|
|
|
3e: e1 2e mov r14, r17
|
2010-09-22 09:04:33 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Forever loop */
|
|
|
|
for (;;) {
|
|
|
|
/* get character from UART */
|
|
|
|
ch = getch();
|
2011-06-10 17:47:47 -07:00
|
|
|
40: e9 d0 rcall .+466 ; 0x214 <getch>
|
2010-09-22 09:04:33 -04:00
|
|
|
|
|
|
|
if(ch == STK_GET_PARAMETER) {
|
2011-06-10 17:47:47 -07:00
|
|
|
42: 81 34 cpi r24, 0x41 ; 65
|
|
|
|
44: 21 f4 brne .+8 ; 0x4e <__SREG__+0xf>
|
2010-09-22 09:04:33 -04:00
|
|
|
// GET PARAMETER returns a generic 0x03 reply - enough to keep Avrdude happy
|
|
|
|
getNch(1);
|
2011-06-10 17:47:47 -07:00
|
|
|
46: 81 e0 ldi r24, 0x01 ; 1
|
|
|
|
48: 0d d1 rcall .+538 ; 0x264 <getNch>
|
2010-09-22 09:04:33 -04:00
|
|
|
putch(0x03);
|
2011-06-10 17:47:47 -07:00
|
|
|
4a: 83 e0 ldi r24, 0x03 ; 3
|
|
|
|
4c: 20 c0 rjmp .+64 ; 0x8e <__SREG__+0x4f>
|
2010-09-22 09:04:33 -04:00
|
|
|
}
|
|
|
|
else if(ch == STK_SET_DEVICE) {
|
2011-06-10 17:47:47 -07:00
|
|
|
4e: 82 34 cpi r24, 0x42 ; 66
|
|
|
|
50: 11 f4 brne .+4 ; 0x56 <__SREG__+0x17>
|
2010-09-22 09:04:33 -04:00
|
|
|
// SET DEVICE is ignored
|
|
|
|
getNch(20);
|
2011-06-10 17:47:47 -07:00
|
|
|
52: 84 e1 ldi r24, 0x14 ; 20
|
|
|
|
54: 03 c0 rjmp .+6 ; 0x5c <__SREG__+0x1d>
|
2010-09-22 09:04:33 -04:00
|
|
|
}
|
|
|
|
else if(ch == STK_SET_DEVICE_EXT) {
|
2011-06-10 17:47:47 -07:00
|
|
|
56: 85 34 cpi r24, 0x45 ; 69
|
|
|
|
58: 19 f4 brne .+6 ; 0x60 <__SREG__+0x21>
|
2010-09-22 09:04:33 -04:00
|
|
|
// SET DEVICE EXT is ignored
|
|
|
|
getNch(5);
|
2011-06-10 17:47:47 -07:00
|
|
|
5a: 85 e0 ldi r24, 0x05 ; 5
|
|
|
|
5c: 03 d1 rcall .+518 ; 0x264 <getNch>
|
|
|
|
5e: c8 c0 rjmp .+400 ; 0x1f0 <__SREG__+0x1b1>
|
2010-09-22 09:04:33 -04:00
|
|
|
}
|
|
|
|
else if(ch == STK_LOAD_ADDRESS) {
|
2011-06-10 17:47:47 -07:00
|
|
|
60: 85 35 cpi r24, 0x55 ; 85
|
|
|
|
62: 81 f4 brne .+32 ; 0x84 <__SREG__+0x45>
|
2010-09-22 09:04:33 -04:00
|
|
|
// LOAD ADDRESS
|
2011-06-10 16:17:13 -07:00
|
|
|
uint16_t newAddress;
|
|
|
|
newAddress = getch();
|
2011-06-10 17:47:47 -07:00
|
|
|
64: d7 d0 rcall .+430 ; 0x214 <getch>
|
2011-06-10 16:17:13 -07:00
|
|
|
newAddress = (newAddress & 0xff) | (getch() << 8);
|
2011-06-10 17:47:47 -07:00
|
|
|
66: 08 2f mov r16, r24
|
|
|
|
68: 10 e0 ldi r17, 0x00 ; 0
|
|
|
|
6a: d4 d0 rcall .+424 ; 0x214 <getch>
|
|
|
|
6c: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
6e: 98 2f mov r25, r24
|
|
|
|
70: 88 27 eor r24, r24
|
|
|
|
72: 80 2b or r24, r16
|
|
|
|
74: 91 2b or r25, r17
|
2011-06-10 16:17:13 -07:00
|
|
|
#ifdef RAMPZ
|
|
|
|
// Transfer top bit to RAMPZ
|
|
|
|
RAMPZ = (newAddress & 0x8000) ? 1 : 0;
|
|
|
|
#endif
|
|
|
|
newAddress += newAddress; // Convert from word address to byte address
|
2011-06-10 17:47:47 -07:00
|
|
|
76: 88 0f add r24, r24
|
|
|
|
78: 99 1f adc r25, r25
|
2011-06-10 16:17:13 -07:00
|
|
|
address = newAddress;
|
2011-06-10 17:47:47 -07:00
|
|
|
7a: 90 93 81 01 sts 0x0181, r25
|
|
|
|
7e: 80 93 80 01 sts 0x0180, r24
|
|
|
|
82: b5 c0 rjmp .+362 ; 0x1ee <__SREG__+0x1af>
|
2010-09-22 09:04:33 -04:00
|
|
|
verifySpace();
|
|
|
|
}
|
|
|
|
else if(ch == STK_UNIVERSAL) {
|
2011-06-10 17:47:47 -07:00
|
|
|
84: 86 35 cpi r24, 0x56 ; 86
|
|
|
|
86: 29 f4 brne .+10 ; 0x92 <__SREG__+0x53>
|
2010-09-22 09:04:33 -04:00
|
|
|
// UNIVERSAL command is ignored
|
|
|
|
getNch(4);
|
2011-06-10 17:47:47 -07:00
|
|
|
88: 84 e0 ldi r24, 0x04 ; 4
|
|
|
|
8a: ec d0 rcall .+472 ; 0x264 <getNch>
|
2010-09-22 09:04:33 -04:00
|
|
|
putch(0x00);
|
2011-06-10 17:47:47 -07:00
|
|
|
8c: 80 e0 ldi r24, 0x00 ; 0
|
|
|
|
8e: b3 d0 rcall .+358 ; 0x1f6 <putch>
|
|
|
|
90: af c0 rjmp .+350 ; 0x1f0 <__SREG__+0x1b1>
|
2010-09-22 09:04:33 -04:00
|
|
|
}
|
2011-06-10 16:17:13 -07:00
|
|
|
/* Write memory, length is big endian and is in bytes */
|
2010-09-22 09:04:33 -04:00
|
|
|
else if(ch == STK_PROG_PAGE) {
|
2011-06-10 17:47:47 -07:00
|
|
|
92: 84 36 cpi r24, 0x64 ; 100
|
|
|
|
94: 09 f0 breq .+2 ; 0x98 <__SREG__+0x59>
|
|
|
|
96: 6b c0 rjmp .+214 ; 0x16e <__SREG__+0x12f>
|
2010-09-22 09:04:33 -04:00
|
|
|
// PROGRAM PAGE - we support flash programming only, not EEPROM
|
|
|
|
uint8_t *bufPtr;
|
|
|
|
uint16_t addrPtr;
|
|
|
|
|
|
|
|
getLen();
|
2011-06-10 17:47:47 -07:00
|
|
|
98: d1 d0 rcall .+418 ; 0x23c <getLen>
|
|
|
|
9a: c0 e0 ldi r28, 0x00 ; 0
|
|
|
|
9c: d1 e0 ldi r29, 0x01 ; 1
|
2011-06-10 16:17:13 -07:00
|
|
|
// If we are in RWW section, immediately start page erase
|
|
|
|
if (address < NRWWSTART) __boot_page_erase_short((uint16_t)(void*)address);
|
2011-06-10 17:47:47 -07:00
|
|
|
|
2010-09-22 09:04:33 -04:00
|
|
|
// While that is going on, read in page contents
|
|
|
|
bufPtr = buff;
|
|
|
|
do *bufPtr++ = getch();
|
2011-06-10 17:47:47 -07:00
|
|
|
9e: ba d0 rcall .+372 ; 0x214 <getch>
|
|
|
|
a0: 89 93 st Y+, r24
|
2010-09-22 09:04:33 -04:00
|
|
|
while (--length);
|
2011-06-10 17:47:47 -07:00
|
|
|
a2: 80 91 82 01 lds r24, 0x0182
|
|
|
|
a6: 81 50 subi r24, 0x01 ; 1
|
|
|
|
a8: 80 93 82 01 sts 0x0182, r24
|
|
|
|
ac: 88 23 and r24, r24
|
|
|
|
ae: b9 f7 brne .-18 ; 0x9e <__SREG__+0x5f>
|
2011-06-10 16:17:13 -07:00
|
|
|
|
|
|
|
// If we are in NRWW section, page erase has to be delayed until now.
|
|
|
|
// Todo: Take RAMPZ into account
|
|
|
|
if (address >= NRWWSTART) __boot_page_erase_short((uint16_t)(void*)address);
|
2011-06-10 17:47:47 -07:00
|
|
|
b0: e0 91 80 01 lds r30, 0x0180
|
|
|
|
b4: f0 91 81 01 lds r31, 0x0181
|
|
|
|
b8: 83 e0 ldi r24, 0x03 ; 3
|
|
|
|
ba: 87 bf out 0x37, r24 ; 55
|
|
|
|
bc: e8 95 spm
|
2010-09-22 09:04:33 -04:00
|
|
|
|
|
|
|
// Read command terminator, start reply
|
|
|
|
verifySpace();
|
2011-06-10 17:47:47 -07:00
|
|
|
be: cc d0 rcall .+408 ; 0x258 <verifySpace>
|
|
|
|
|
2010-09-22 09:04:33 -04:00
|
|
|
// If only a partial page is to be programmed, the erase might not be complete.
|
|
|
|
// So check that here
|
|
|
|
boot_spm_busy_wait();
|
2011-06-10 17:47:47 -07:00
|
|
|
c0: 07 b6 in r0, 0x37 ; 55
|
|
|
|
c2: 00 fc sbrc r0, 0
|
|
|
|
c4: fd cf rjmp .-6 ; 0xc0 <__SREG__+0x81>
|
2010-09-22 09:04:33 -04:00
|
|
|
|
|
|
|
#ifdef VIRTUAL_BOOT_PARTITION
|
|
|
|
if ((uint16_t)(void*)address == 0) {
|
2011-06-10 17:47:47 -07:00
|
|
|
c6: 80 91 80 01 lds r24, 0x0180
|
|
|
|
ca: 90 91 81 01 lds r25, 0x0181
|
|
|
|
ce: 89 2b or r24, r25
|
|
|
|
d0: 41 f5 brne .+80 ; 0x122 <__SREG__+0xe3>
|
2010-09-22 09:04:33 -04:00
|
|
|
// This is the reset vector page. We need to live-patch the code so the
|
|
|
|
// bootloader runs.
|
|
|
|
//
|
|
|
|
// Move RESET vector to WDT vector
|
|
|
|
uint16_t vect = buff[0] | (buff[1]<<8);
|
2011-06-10 17:47:47 -07:00
|
|
|
d2: 80 91 00 01 lds r24, 0x0100
|
|
|
|
d6: 20 91 01 01 lds r18, 0x0101
|
|
|
|
da: 30 e0 ldi r19, 0x00 ; 0
|
|
|
|
dc: 32 2f mov r19, r18
|
|
|
|
de: 22 27 eor r18, r18
|
|
|
|
e0: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
e2: 28 2b or r18, r24
|
|
|
|
e4: 39 2b or r19, r25
|
2010-09-22 09:04:33 -04:00
|
|
|
rstVect = vect;
|
2011-06-10 17:47:47 -07:00
|
|
|
e6: 30 93 85 01 sts 0x0185, r19
|
|
|
|
ea: 20 93 84 01 sts 0x0184, r18
|
2011-06-10 16:17:13 -07:00
|
|
|
wdtVect = buff[8] | (buff[9]<<8);
|
2011-06-10 17:47:47 -07:00
|
|
|
ee: 40 91 08 01 lds r20, 0x0108
|
|
|
|
f2: 80 91 09 01 lds r24, 0x0109
|
|
|
|
f6: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
f8: 98 2f mov r25, r24
|
|
|
|
fa: 88 27 eor r24, r24
|
|
|
|
fc: 50 e0 ldi r21, 0x00 ; 0
|
|
|
|
fe: 84 2b or r24, r20
|
|
|
|
100: 95 2b or r25, r21
|
|
|
|
102: 90 93 87 01 sts 0x0187, r25
|
|
|
|
106: 80 93 86 01 sts 0x0186, r24
|
2010-09-22 09:04:33 -04:00
|
|
|
vect -= 4; // Instruction is a relative jump (rjmp), so recalculate.
|
2011-06-10 17:47:47 -07:00
|
|
|
10a: 24 50 subi r18, 0x04 ; 4
|
|
|
|
10c: 30 40 sbci r19, 0x00 ; 0
|
2011-06-10 16:17:13 -07:00
|
|
|
buff[8] = vect & 0xff;
|
2011-06-10 17:47:47 -07:00
|
|
|
10e: 20 93 08 01 sts 0x0108, r18
|
2011-06-10 16:17:13 -07:00
|
|
|
buff[9] = vect >> 8;
|
2011-06-10 17:47:47 -07:00
|
|
|
112: 23 2f mov r18, r19
|
|
|
|
114: 33 27 eor r19, r19
|
|
|
|
116: 20 93 09 01 sts 0x0109, r18
|
2010-09-22 09:04:33 -04:00
|
|
|
|
|
|
|
// Add jump to bootloader at RESET vector
|
|
|
|
buff[0] = 0x7f;
|
2011-06-10 17:47:47 -07:00
|
|
|
11a: f0 92 00 01 sts 0x0100, r15
|
2010-09-22 09:04:33 -04:00
|
|
|
buff[1] = 0xce; // rjmp 0x1d00 instruction
|
2011-06-10 17:47:47 -07:00
|
|
|
11e: e0 92 01 01 sts 0x0101, r14
|
2010-09-22 09:04:33 -04:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Copy buffer into programming buffer
|
|
|
|
bufPtr = buff;
|
|
|
|
addrPtr = (uint16_t)(void*)address;
|
2011-06-10 17:47:47 -07:00
|
|
|
122: 40 91 80 01 lds r20, 0x0180
|
|
|
|
126: 50 91 81 01 lds r21, 0x0181
|
|
|
|
12a: a0 e0 ldi r26, 0x00 ; 0
|
|
|
|
12c: b1 e0 ldi r27, 0x01 ; 1
|
2010-09-22 09:04:33 -04:00
|
|
|
ch = SPM_PAGESIZE / 2;
|
|
|
|
do {
|
|
|
|
uint16_t a;
|
|
|
|
a = *bufPtr++;
|
2011-06-10 17:47:47 -07:00
|
|
|
12e: 2c 91 ld r18, X
|
|
|
|
130: 30 e0 ldi r19, 0x00 ; 0
|
2010-09-22 09:04:33 -04:00
|
|
|
a |= (*bufPtr++) << 8;
|
2011-06-10 17:47:47 -07:00
|
|
|
132: 11 96 adiw r26, 0x01 ; 1
|
|
|
|
134: 8c 91 ld r24, X
|
|
|
|
136: 11 97 sbiw r26, 0x01 ; 1
|
|
|
|
138: 90 e0 ldi r25, 0x00 ; 0
|
|
|
|
13a: 98 2f mov r25, r24
|
|
|
|
13c: 88 27 eor r24, r24
|
|
|
|
13e: 82 2b or r24, r18
|
|
|
|
140: 93 2b or r25, r19
|
2011-06-10 16:17:13 -07:00
|
|
|
#define rstVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+4))
|
|
|
|
#define wdtVect (*(uint16_t*)(RAMSTART+SPM_PAGESIZE*2+6))
|
2010-09-22 09:04:33 -04:00
|
|
|
#endif
|
2011-06-10 16:17:13 -07:00
|
|
|
|
2010-09-22 09:04:33 -04:00
|
|
|
/* main program starts here */
|
|
|
|
int main(void) {
|
2011-06-10 17:47:47 -07:00
|
|
|
142: 12 96 adiw r26, 0x02 ; 2
|
2010-09-22 09:04:33 -04:00
|
|
|
ch = SPM_PAGESIZE / 2;
|
|
|
|
do {
|
|
|
|
uint16_t a;
|
|
|
|
a = *bufPtr++;
|
|
|
|
a |= (*bufPtr++) << 8;
|
2011-06-10 16:17:13 -07:00
|
|
|
__boot_page_fill_short((uint16_t)(void*)addrPtr,a);
|
2011-06-10 17:47:47 -07:00
|
|
|
144: fa 01 movw r30, r20
|
|
|
|
146: 0c 01 movw r0, r24
|
|
|
|
148: d7 be out 0x37, r13 ; 55
|
|
|
|
14a: e8 95 spm
|
|
|
|
14c: 11 24 eor r1, r1
|
2010-09-22 09:04:33 -04:00
|
|
|
addrPtr += 2;
|
2011-06-10 17:47:47 -07:00
|
|
|
14e: 4e 5f subi r20, 0xFE ; 254
|
|
|
|
150: 5f 4f sbci r21, 0xFF ; 255
|
2010-09-22 09:04:33 -04:00
|
|
|
} while (--ch);
|
2011-06-10 17:47:47 -07:00
|
|
|
152: f1 e0 ldi r31, 0x01 ; 1
|
|
|
|
154: a0 34 cpi r26, 0x40 ; 64
|
|
|
|
156: bf 07 cpc r27, r31
|
|
|
|
158: 51 f7 brne .-44 ; 0x12e <__SREG__+0xef>
|
|
|
|
|
2010-09-22 09:04:33 -04:00
|
|
|
// Write from programming buffer
|
2011-06-10 16:17:13 -07:00
|
|
|
__boot_page_write_short((uint16_t)(void*)address);
|
2011-06-10 17:47:47 -07:00
|
|
|
15a: e0 91 80 01 lds r30, 0x0180
|
|
|
|
15e: f0 91 81 01 lds r31, 0x0181
|
|
|
|
162: c7 be out 0x37, r12 ; 55
|
|
|
|
164: e8 95 spm
|
2010-09-22 09:04:33 -04:00
|
|
|
boot_spm_busy_wait();
|
2011-06-10 17:47:47 -07:00
|
|
|
166: 07 b6 in r0, 0x37 ; 55
|
|
|
|
168: 00 fc sbrc r0, 0
|
|
|
|
16a: fd cf rjmp .-6 ; 0x166 <__SREG__+0x127>
|
|
|
|
16c: 41 c0 rjmp .+130 ; 0x1f0 <__SREG__+0x1b1>
|
2010-09-22 09:04:33 -04:00
|
|
|
boot_rww_enable();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
/* Read memory block mode, length is big endian. */
|
|
|
|
else if(ch == STK_READ_PAGE) {
|
2011-06-10 17:47:47 -07:00
|
|
|
16e: 84 37 cpi r24, 0x74 ; 116
|
|
|
|
170: 89 f5 brne .+98 ; 0x1d4 <__SREG__+0x195>
|
2010-09-22 09:04:33 -04:00
|
|
|
// READ PAGE - we only read flash
|
|
|
|
getLen();
|
2011-06-10 17:47:47 -07:00
|
|
|
172: 64 d0 rcall .+200 ; 0x23c <getLen>
|
2010-09-22 09:04:33 -04:00
|
|
|
verifySpace();
|
2011-06-10 17:47:47 -07:00
|
|
|
174: 71 d0 rcall .+226 ; 0x258 <verifySpace>
|
2010-09-22 09:04:33 -04:00
|
|
|
#ifdef VIRTUAL_BOOT_PARTITION
|
|
|
|
do {
|
|
|
|
// Undo vector patch in bottom page so verify passes
|
|
|
|
if (address == 0) ch=rstVect & 0xff;
|
2011-06-10 17:47:47 -07:00
|
|
|
176: e0 91 80 01 lds r30, 0x0180
|
|
|
|
17a: f0 91 81 01 lds r31, 0x0181
|
|
|
|
17e: 30 97 sbiw r30, 0x00 ; 0
|
|
|
|
180: 19 f4 brne .+6 ; 0x188 <__SREG__+0x149>
|
|
|
|
182: 20 91 84 01 lds r18, 0x0184
|
|
|
|
186: 13 c0 rjmp .+38 ; 0x1ae <__SREG__+0x16f>
|
2010-09-22 09:04:33 -04:00
|
|
|
else if (address == 1) ch=rstVect >> 8;
|
2011-06-10 17:47:47 -07:00
|
|
|
188: e1 30 cpi r30, 0x01 ; 1
|
|
|
|
18a: f1 05 cpc r31, r1
|
|
|
|
18c: 19 f4 brne .+6 ; 0x194 <__SREG__+0x155>
|
|
|
|
18e: 20 91 85 01 lds r18, 0x0185
|
|
|
|
192: 0d c0 rjmp .+26 ; 0x1ae <__SREG__+0x16f>
|
2011-06-10 16:17:13 -07:00
|
|
|
else if (address == 8) ch=wdtVect & 0xff;
|
2011-06-10 17:47:47 -07:00
|
|
|
194: e8 30 cpi r30, 0x08 ; 8
|
|
|
|
196: f1 05 cpc r31, r1
|
|
|
|
198: 19 f4 brne .+6 ; 0x1a0 <__SREG__+0x161>
|
|
|
|
19a: 20 91 86 01 lds r18, 0x0186
|
|
|
|
19e: 07 c0 rjmp .+14 ; 0x1ae <__SREG__+0x16f>
|
2011-06-10 16:17:13 -07:00
|
|
|
else if (address == 9) ch=wdtVect >> 8;
|
2011-06-10 17:47:47 -07:00
|
|
|
1a0: e9 30 cpi r30, 0x09 ; 9
|
|
|
|
1a2: f1 05 cpc r31, r1
|
|
|
|
1a4: 19 f4 brne .+6 ; 0x1ac <__SREG__+0x16d>
|
|
|
|
1a6: 20 91 87 01 lds r18, 0x0187
|
|
|
|
1aa: 01 c0 rjmp .+2 ; 0x1ae <__SREG__+0x16f>
|
2010-09-22 09:04:33 -04:00
|
|
|
else ch = pgm_read_byte_near(address);
|
2011-06-10 17:47:47 -07:00
|
|
|
1ac: 24 91 lpm r18, Z+
|
2010-09-22 09:04:33 -04:00
|
|
|
address++;
|
2011-06-10 17:47:47 -07:00
|
|
|
1ae: 80 91 80 01 lds r24, 0x0180
|
|
|
|
1b2: 90 91 81 01 lds r25, 0x0181
|
|
|
|
1b6: 01 96 adiw r24, 0x01 ; 1
|
|
|
|
1b8: 90 93 81 01 sts 0x0181, r25
|
|
|
|
1bc: 80 93 80 01 sts 0x0180, r24
|
2010-09-22 09:04:33 -04:00
|
|
|
putch(ch);
|
2011-06-10 17:47:47 -07:00
|
|
|
1c0: 82 2f mov r24, r18
|
|
|
|
1c2: 19 d0 rcall .+50 ; 0x1f6 <putch>
|
2010-09-22 09:04:33 -04:00
|
|
|
} while (--length);
|
2011-06-10 17:47:47 -07:00
|
|
|
1c4: 80 91 82 01 lds r24, 0x0182
|
|
|
|
1c8: 81 50 subi r24, 0x01 ; 1
|
|
|
|
1ca: 80 93 82 01 sts 0x0182, r24
|
|
|
|
1ce: 88 23 and r24, r24
|
|
|
|
1d0: 91 f6 brne .-92 ; 0x176 <__SREG__+0x137>
|
|
|
|
1d2: 0e c0 rjmp .+28 ; 0x1f0 <__SREG__+0x1b1>
|
2011-06-10 16:17:13 -07:00
|
|
|
#endif
|
2010-09-22 09:04:33 -04:00
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Get device signature bytes */
|
|
|
|
else if(ch == STK_READ_SIGN) {
|
2011-06-10 17:47:47 -07:00
|
|
|
1d4: 85 37 cpi r24, 0x75 ; 117
|
|
|
|
1d6: 39 f4 brne .+14 ; 0x1e6 <__SREG__+0x1a7>
|
2010-09-22 09:04:33 -04:00
|
|
|
// READ SIGN - return what Avrdude wants to hear
|
|
|
|
verifySpace();
|
2011-06-10 17:47:47 -07:00
|
|
|
1d8: 3f d0 rcall .+126 ; 0x258 <verifySpace>
|
2010-09-22 09:04:33 -04:00
|
|
|
putch(SIGNATURE_0);
|
2011-06-10 17:47:47 -07:00
|
|
|
1da: 8e e1 ldi r24, 0x1E ; 30
|
|
|
|
1dc: 0c d0 rcall .+24 ; 0x1f6 <putch>
|
2010-09-22 09:04:33 -04:00
|
|
|
putch(SIGNATURE_1);
|
2011-06-10 17:47:47 -07:00
|
|
|
1de: 83 e9 ldi r24, 0x93 ; 147
|
|
|
|
1e0: 0a d0 rcall .+20 ; 0x1f6 <putch>
|
2010-09-22 09:04:33 -04:00
|
|
|
putch(SIGNATURE_2);
|
2011-06-10 17:47:47 -07:00
|
|
|
1e2: 8c e0 ldi r24, 0x0C ; 12
|
|
|
|
1e4: 54 cf rjmp .-344 ; 0x8e <__SREG__+0x4f>
|
2010-09-22 09:04:33 -04:00
|
|
|
}
|
|
|
|
else if (ch == 'Q') {
|
2011-06-10 17:47:47 -07:00
|
|
|
1e6: 81 35 cpi r24, 0x51 ; 81
|
|
|
|
1e8: 11 f4 brne .+4 ; 0x1ee <__SREG__+0x1af>
|
2010-09-22 09:04:33 -04:00
|
|
|
// Adaboot no-wait mod
|
|
|
|
watchdogConfig(WATCHDOG_16MS);
|
2011-06-10 17:47:47 -07:00
|
|
|
1ea: 88 e0 ldi r24, 0x08 ; 8
|
|
|
|
1ec: 2c d0 rcall .+88 ; 0x246 <watchdogConfig>
|
2010-09-22 09:04:33 -04:00
|
|
|
verifySpace();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
// This covers the response to commands like STK_ENTER_PROGMODE
|
|
|
|
verifySpace();
|
2011-06-10 17:47:47 -07:00
|
|
|
1ee: 34 d0 rcall .+104 ; 0x258 <verifySpace>
|
2010-09-22 09:04:33 -04:00
|
|
|
}
|
|
|
|
putch(STK_OK);
|
2011-06-10 17:47:47 -07:00
|
|
|
1f0: 80 e1 ldi r24, 0x10 ; 16
|
|
|
|
1f2: 01 d0 rcall .+2 ; 0x1f6 <putch>
|
|
|
|
1f4: 25 cf rjmp .-438 ; 0x40 <__SREG__+0x1>
|
2010-09-22 09:04:33 -04:00
|
|
|
|
2011-06-10 17:47:47 -07:00
|
|
|
000001f6 <putch>:
|
2010-09-22 09:04:33 -04:00
|
|
|
void putch(char ch) {
|
|
|
|
#ifndef SOFT_UART
|
|
|
|
while (!(UCSR0A & _BV(UDRE0)));
|
|
|
|
UDR0 = ch;
|
|
|
|
#else
|
|
|
|
__asm__ __volatile__ (
|
2011-06-10 17:47:47 -07:00
|
|
|
1f6: 2a e0 ldi r18, 0x0A ; 10
|
|
|
|
1f8: 30 e0 ldi r19, 0x00 ; 0
|
|
|
|
1fa: 80 95 com r24
|
|
|
|
1fc: 08 94 sec
|
|
|
|
1fe: 10 f4 brcc .+4 ; 0x204 <putch+0xe>
|
|
|
|
200: da 98 cbi 0x1b, 2 ; 27
|
|
|
|
202: 02 c0 rjmp .+4 ; 0x208 <putch+0x12>
|
|
|
|
204: da 9a sbi 0x1b, 2 ; 27
|
|
|
|
206: 00 00 nop
|
|
|
|
208: 15 d0 rcall .+42 ; 0x234 <uartDelay>
|
|
|
|
20a: 14 d0 rcall .+40 ; 0x234 <uartDelay>
|
|
|
|
20c: 86 95 lsr r24
|
|
|
|
20e: 2a 95 dec r18
|
|
|
|
210: b1 f7 brne .-20 ; 0x1fe <putch+0x8>
|
2010-09-22 09:04:33 -04:00
|
|
|
[uartBit] "I" (UART_TX_BIT)
|
|
|
|
:
|
|
|
|
"r25"
|
|
|
|
);
|
|
|
|
#endif
|
|
|
|
}
|
2011-06-10 17:47:47 -07:00
|
|
|
212: 08 95 ret
|
2010-09-22 09:04:33 -04:00
|
|
|
|
2011-06-10 17:47:47 -07:00
|
|
|
00000214 <getch>:
|
2010-09-22 09:04:33 -04:00
|
|
|
return getch();
|
|
|
|
}
|
|
|
|
|
|
|
|
// Watchdog functions. These are only safe with interrupts turned off.
|
|
|
|
void watchdogReset() {
|
|
|
|
__asm__ __volatile__ (
|
2011-06-10 17:47:47 -07:00
|
|
|
214: a8 95 wdr
|
2010-09-22 09:04:33 -04:00
|
|
|
LED_PIN |= _BV(LED);
|
2011-06-10 16:17:13 -07:00
|
|
|
#endif
|
2010-09-22 09:04:33 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
return ch;
|
|
|
|
}
|
2011-06-10 17:47:47 -07:00
|
|
|
216: 29 e0 ldi r18, 0x09 ; 9
|
|
|
|
218: 30 e0 ldi r19, 0x00 ; 0
|
|
|
|
21a: cb 99 sbic 0x19, 3 ; 25
|
|
|
|
21c: fe cf rjmp .-4 ; 0x21a <getch+0x6>
|
|
|
|
21e: 0a d0 rcall .+20 ; 0x234 <uartDelay>
|
|
|
|
220: 09 d0 rcall .+18 ; 0x234 <uartDelay>
|
|
|
|
222: 08 d0 rcall .+16 ; 0x234 <uartDelay>
|
|
|
|
224: 88 94 clc
|
|
|
|
226: cb 99 sbic 0x19, 3 ; 25
|
|
|
|
228: 08 94 sec
|
|
|
|
22a: 2a 95 dec r18
|
|
|
|
22c: 11 f0 breq .+4 ; 0x232 <getch+0x1e>
|
|
|
|
22e: 87 95 ror r24
|
|
|
|
230: f7 cf rjmp .-18 ; 0x220 <getch+0xc>
|
|
|
|
232: 08 95 ret
|
|
|
|
|
|
|
|
00000234 <uartDelay>:
|
2010-09-22 09:04:33 -04:00
|
|
|
#if UART_B_VALUE > 255
|
|
|
|
#error Baud rate too slow for soft UART
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void uartDelay() {
|
|
|
|
__asm__ __volatile__ (
|
2011-06-10 17:47:47 -07:00
|
|
|
234: 9e e0 ldi r25, 0x0E ; 14
|
|
|
|
236: 9a 95 dec r25
|
|
|
|
238: f1 f7 brne .-4 ; 0x236 <uartDelay+0x2>
|
|
|
|
23a: 08 95 ret
|
2010-09-22 09:04:33 -04:00
|
|
|
|
2011-06-10 17:47:47 -07:00
|
|
|
0000023c <getLen>:
|
2010-09-22 09:04:33 -04:00
|
|
|
} while (--count);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
uint8_t getLen() {
|
|
|
|
getch();
|
2011-06-10 17:47:47 -07:00
|
|
|
23c: eb df rcall .-42 ; 0x214 <getch>
|
2010-09-22 09:04:33 -04:00
|
|
|
length = getch();
|
2011-06-10 17:47:47 -07:00
|
|
|
23e: ea df rcall .-44 ; 0x214 <getch>
|
|
|
|
240: 80 93 82 01 sts 0x0182, r24
|
2010-09-22 09:04:33 -04:00
|
|
|
return getch();
|
|
|
|
}
|
2011-06-10 17:47:47 -07:00
|
|
|
244: e7 cf rjmp .-50 ; 0x214 <getch>
|
2010-09-22 09:04:33 -04:00
|
|
|
|
2011-06-10 17:47:47 -07:00
|
|
|
00000246 <watchdogConfig>:
|
2010-09-22 09:04:33 -04:00
|
|
|
"wdr\n"
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
void watchdogConfig(uint8_t x) {
|
|
|
|
WDTCSR = _BV(WDCE) | _BV(WDE);
|
2011-06-10 17:47:47 -07:00
|
|
|
246: 98 e1 ldi r25, 0x18 ; 24
|
|
|
|
248: 91 bd out 0x21, r25 ; 33
|
2010-09-22 09:04:33 -04:00
|
|
|
WDTCSR = x;
|
2011-06-10 17:47:47 -07:00
|
|
|
24a: 81 bd out 0x21, r24 ; 33
|
2010-09-22 09:04:33 -04:00
|
|
|
}
|
2011-06-10 17:47:47 -07:00
|
|
|
24c: 08 95 ret
|
2010-09-22 09:04:33 -04:00
|
|
|
|
2011-06-10 17:47:47 -07:00
|
|
|
0000024e <appStart>:
|
2010-09-22 09:04:33 -04:00
|
|
|
|
|
|
|
void appStart() {
|
|
|
|
watchdogConfig(WATCHDOG_OFF);
|
2011-06-10 17:47:47 -07:00
|
|
|
24e: 80 e0 ldi r24, 0x00 ; 0
|
|
|
|
250: fa df rcall .-12 ; 0x246 <watchdogConfig>
|
2010-09-22 09:04:33 -04:00
|
|
|
__asm__ __volatile__ (
|
2011-06-10 17:47:47 -07:00
|
|
|
252: e4 e0 ldi r30, 0x04 ; 4
|
|
|
|
254: ff 27 eor r31, r31
|
|
|
|
256: 09 94 ijmp
|
2010-09-22 09:04:33 -04:00
|
|
|
|
2011-06-10 17:47:47 -07:00
|
|
|
00000258 <verifySpace>:
|
2010-09-22 09:04:33 -04:00
|
|
|
do getch(); while (--count);
|
|
|
|
verifySpace();
|
|
|
|
}
|
|
|
|
|
|
|
|
void verifySpace() {
|
|
|
|
if (getch() != CRC_EOP) appStart();
|
2011-06-10 17:47:47 -07:00
|
|
|
258: dd df rcall .-70 ; 0x214 <getch>
|
|
|
|
25a: 80 32 cpi r24, 0x20 ; 32
|
|
|
|
25c: 09 f0 breq .+2 ; 0x260 <verifySpace+0x8>
|
|
|
|
25e: f7 df rcall .-18 ; 0x24e <appStart>
|
2010-09-22 09:04:33 -04:00
|
|
|
putch(STK_INSYNC);
|
2011-06-10 17:47:47 -07:00
|
|
|
260: 84 e1 ldi r24, 0x14 ; 20
|
2010-09-22 09:04:33 -04:00
|
|
|
}
|
2011-06-10 17:47:47 -07:00
|
|
|
262: c9 cf rjmp .-110 ; 0x1f6 <putch>
|
2011-06-10 16:17:13 -07:00
|
|
|
|
2011-06-10 17:47:47 -07:00
|
|
|
00000264 <getNch>:
|
2010-09-22 09:04:33 -04:00
|
|
|
::[count] "M" (UART_B_VALUE)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void getNch(uint8_t count) {
|
2011-06-10 17:47:47 -07:00
|
|
|
264: 1f 93 push r17
|
|
|
|
266: 18 2f mov r17, r24
|
2010-09-22 09:04:33 -04:00
|
|
|
do getch(); while (--count);
|
2011-06-10 17:47:47 -07:00
|
|
|
268: d5 df rcall .-86 ; 0x214 <getch>
|
|
|
|
26a: 11 50 subi r17, 0x01 ; 1
|
|
|
|
26c: e9 f7 brne .-6 ; 0x268 <getNch+0x4>
|
2010-09-22 09:04:33 -04:00
|
|
|
verifySpace();
|
2011-06-10 17:47:47 -07:00
|
|
|
26e: f4 df rcall .-24 ; 0x258 <verifySpace>
|
2010-09-22 09:04:33 -04:00
|
|
|
}
|
2011-06-10 17:47:47 -07:00
|
|
|
270: 1f 91 pop r17
|
|
|
|
272: 08 95 ret
|