This is more a curious than a useful project.
While I was writing the assembler source for the clock I thought that it would be nice to take a look into the registers and memory of the controller.
So I've written an interrupt routine that sends all port, register, memory and eeprom data over the UART port to the PC. Now I only have to trigger the interrupt and the controller sends all that data to the PC into a file. Of course, you can send the data using a function call or something like that if you want to see why your program does not work.
Now it was possible to examine the register, flags and so on with an hex editor. But it was much work to find the right location in the file of each register.
Finaly I wrote a python script that takes the raw dump and creates an easy to read html-file. The registers are numbered, the ports and bits are named.
After everything worked I've never used this code for debuging asm-code, because I used the C-compiler avr-gcc for further projects.
The code is designed for the controllers AT90S2313, AT90S4433, AT90S8515 and AT90S8535.
r0 | 0xFF , 11111111b , 255 , "." | r8 | 0xFF , 11111111b , 255 , "." | r16 | 0x15 , 00010101b , 21 , "." | r24 | 0xEF , 11101111b , 239 , "." |
r1 | 0xFF , 11111111b , 255 , "." | r9 | 0xFF , 11111111b , 255 , "." | r17 | 0xFF , 11111111b , 255 , "." | r25 | 0xFF , 11111111b , 255 , "." |
r2 | 0xFF , 11111111b , 255 , "." | r10 | 0xFF , 11111111b , 255 , "." | r18 | 0xFF , 11111111b , 255 , "." | r26 | 0xFF , 11111111b , 255 , "." |
r3 | 0xEF , 11101111b , 239 , "." | r11 | 0xFF , 11111111b , 255 , "." | r19 | 0xFF , 11111111b , 255 , "." | r27 | 0xFF , 11111111b , 255 , "." |
r4 | 0xFF , 11111111b , 255 , "." | r12 | 0xFF , 11111111b , 255 , "." | r20 | 0xFF , 11111111b , 255 , "." | r28 | 0xFF , 11111111b , 255 , "." |
r5 | 0xFF , 11111111b , 255 , "." | r13 | 0xFF , 11111111b , 255 , "." | r21 | 0xFF , 11111111b , 255 , "." | r29 | 0x33 , 00110011b , 51 , "3" |
r6 | 0xFF , 11111111b , 255 , "." | r14 | 0xFF , 11111111b , 255 , "." | r22 | 0xFF , 11111111b , 255 , "." | r30 | 0x22 , 00100010b , 34 , """ |
r7 | 0xFF , 11111111b , 255 , "." | r15 | 0xFF , 11111111b , 255 , "." | r23 | 0xFF , 11111111b , 255 , "." | r31 | 0x11 , 00010001b , 17 , "." |
0x28 | ACSR | ACD=0 | AC0=0 | ACI=1 | ACIE=0 | ACIC=0 | ACIS1=0 | ACIS0=0 | analog comparator | |
0x29 | UBRR | 0x19 , 00011001b , 25 , "." | UART baud rate register | |||||||
0x2A | UCR | RXCIE=0 | TXCIE=0 | UDRIE=0 | RXEN=0 | TXEN=1 | CHR9=0 | RXB8=1 | TXB8=0 | UART control register |
0x2B | USR | RXC=0 | TXC=0 | UDRE=0 | FE=0 | OR=0 | UART status register | |||
0x2C | UDR | 0x00 , 00000000b , 0 , "." | UART I/O data register | |||||||
0x30 | PIND | 0x7C , 01111100b , 124 , "|" | port d input | |||||||
0x31 | DDRD | 0x00 , 00000000b , 0 , "." | port d direction register | |||||||
0x32 | PORTD | 0x00 , 00000000b , 0 , "." | port d output/pullup | |||||||
0x36 | PINB | 0x16 , 00010110b , 22 , "." | port b input | |||||||
0x37 | DDRB | 0xFF , 11111111b , 255 , "." | port b direction register | |||||||
0x38 | PORTB | 0x16 , 00010110b , 22 , "." | port b output/pullup | |||||||
0x3C | EECR | EEMWE=0 | EEWE=0 | EERE=0 | EEPROM control | |||||
0x3D | EEDR | 0x00 , 00000000b , 0 , "." | EEPROM data register | |||||||
0x3E | EEAR | 0x00 , 00000000b , 0 , "." | EEPROM adress register | |||||||
0x41 | WDTCR | WDTOE=0 | WDE=0 | WDP2=0 | WDP1=0 | WDP0=0 | watchdog timer control | |||
0x44 | ICR1L | 0x00 , 00000000b , 0 , "." | timer/counter1- low(input capture register) | |||||||
0x45 | ICR1H | 0x00 , 00000000b , 0 , "." | timer/counter1- high(input capture register) | |||||||
0x4A | OCR1AL | 0x00 , 00000000b , 0 , "." | timer/counter1- low(compare register) | |||||||
0x4B | OCR1AH | 0x00 , 00000000b , 0 , "." | timer/counter1- high(compare register) | |||||||
0x4C | TCNT1L | 0x00 , 00000000b , 0 , "." | timer/counter1- low(counter register) | |||||||
0x4D | TCNT1H | 0x00 , 00000000b , 0 , "." | timer/counter1- high(counter register) | |||||||
0x4E | TCCR1B | ICNC1=0 | ICES1=0 | CTC1=0 | CS12=0 | CS11=0 | CS10=0 | timer/counter1 control register | ||
0x4F | TCCR1A | COM1A1=0 | COM1A0=0 | PWM11=0 | PWM10=0 | timer/counter1 control register | ||||
0x52 | TCNT0 | 0x00 , 00000000b , 0 , "." | timer/counter0 (8bits) | |||||||
0x53 | TCCR0 | CS02=0 | CS01=0 | CS00=0 | timer prescale register | |||||
0x55 | MCUCR | SE=0 | SM=0 | ISC11=0 | ISC10=0 | ISC01=1 | ISC00=1 | MCU control | ||
0x58 | TIFR | TOV1=0 | OCF1A=0 | ICF1=0 | TOV0=0 | timer interrupt flags | ||||
0x59 | TIMSK | TOIE1=0 | OCIE1A=0 | TICIE1=0 | TOIE0=0 | timer interupt mask | ||||
0x5A | GIFR | INTF1=0 | INTF0=0 | interrupt flags | ||||||
0x5B | GIMSK | INT1=0 | INT0=1 | interrupt mask | ||||||
0x5D | SPL | 0xDB , 11011011b , 219 , "." | low(stack pointer) | |||||||
0x5F | SREG | I=0 | T=0 | H=0 | S=0 | V=0 | N=0 | Z=0 | C=0 | flag register |
0x60 | 0x00 , 00000000b , 0 , "." | 0x80 | 0x20 , 00100000b , 32 , " " | 0xA0 | 0x00 , 00000000b , 0 , "." | 0xC0 | 0x00 , 00000000b , 0 , "." |
0x61 | 0x40 , 01000000b , 64 , "@" | 0x81 | 0x20 , 00100000b , 32 , " " | 0xA1 | 0x88 , 10001000b , 136 , "." | 0xC1 | 0x00 , 00000000b , 0 , "." |
0x62 | 0x02 , 00000010b , 2 , "." | 0x82 | 0x00 , 00000000b , 0 , "." | 0xA2 | 0x00 , 00000000b , 0 , "." | 0xC2 | 0x00 , 00000000b , 0 , "." |
0x63 | 0x00 , 00000000b , 0 , "." | 0x83 | 0x00 , 00000000b , 0 , "." | 0xA3 | 0x00 , 00000000b , 0 , "." | 0xC3 | 0x04 , 00000100b , 4 , "." |
0x64 | 0x00 , 00000000b , 0 , "." | 0x84 | 0x00 , 00000000b , 0 , "." | 0xA4 | 0x00 , 00000000b , 0 , "." | 0xC4 | 0x00 , 00000000b , 0 , "." |
0x65 | 0x00 , 00000000b , 0 , "." | 0x85 | 0x00 , 00000000b , 0 , "." | 0xA5 | 0x00 , 00000000b , 0 , "." | 0xC5 | 0x00 , 00000000b , 0 , "." |
0x66 | 0x1C , 00011100b , 28 , "." | 0x86 | 0x04 , 00000100b , 4 , "." | 0xA6 | 0x00 , 00000000b , 0 , "." | 0xC6 | 0x00 , 00000000b , 0 , "." |
0x67 | 0xC0 , 11000000b , 192 , "." | 0x87 | 0x12 , 00010010b , 18 , "." | 0xA7 | 0x08 , 00001000b , 8 , "." | 0xC7 | 0x00 , 00000000b , 0 , "." |
0x68 | 0x00 , 00000000b , 0 , "." | 0x88 | 0x00 , 00000000b , 0 , "." | 0xA8 | 0x00 , 00000000b , 0 , "." | 0xC8 | 0x0A , 00001010b , 10 , "." |
0x69 | 0x00 , 00000000b , 0 , "." | 0x89 | 0x00 , 00000000b , 0 , "." | 0xA9 | 0x08 , 00001000b , 8 , "." | 0xC9 | 0x00 , 00000000b , 0 , "." |
0x6A | 0x00 , 00000000b , 0 , "." | 0x8A | 0x00 , 00000000b , 0 , "." | 0xAA | 0x20 , 00100000b , 32 , " " | 0xCA | 0x00 , 00000000b , 0 , "." |
0x6B | 0x00 , 00000000b , 0 , "." | 0x8B | 0x04 , 00000100b , 4 , "." | 0xAB | 0x00 , 00000000b , 0 , "." | 0xCB | 0xB2 , 10110010b , 178 , "." |
0x6C | 0x00 , 00000000b , 0 , "." | 0x8C | 0x00 , 00000000b , 0 , "." | 0xAC | 0x00 , 00000000b , 0 , "." | 0xCC | 0xB1 , 10110001b , 177 , "." |
0x6D | 0x00 , 00000000b , 0 , "." | 0x8D | 0x00 , 00000000b , 0 , "." | 0xAD | 0x00 , 00000000b , 0 , "." | 0xCD | 0xB0 , 10110000b , 176 , "." |
0x6E | 0x08 , 00001000b , 8 , "." | 0x8E | 0x00 , 00000000b , 0 , "." | 0xAE | 0x20 , 00100000b , 32 , " " | 0xCE | 0xAF , 10101111b , 175 , "." |
0x6F | 0x48 , 01001000b , 72 , "H" | 0x8F | 0x00 , 00000000b , 0 , "." | 0xAF | 0x00 , 00000000b , 0 , "." | 0xCF | 0xAE , 10101110b , 174 , "." |
0x70 | 0x08 , 00001000b , 8 , "." | 0x90 | 0x01 , 00000001b , 1 , "." | 0xB0 | 0x00 , 00000000b , 0 , "." | 0xD0 | 0xAD , 10101101b , 173 , "." |
0x71 | 0x40 , 01000000b , 64 , "@" | 0x91 | 0x00 , 00000000b , 0 , "." | 0xB1 | 0x00 , 00000000b , 0 , "." | 0xD1 | 0xAC , 10101100b , 172 , "." |
0x72 | 0xA0 , 10100000b , 160 , "." | 0x92 | 0x00 , 00000000b , 0 , "." | 0xB2 | 0x00 , 00000000b , 0 , "." | 0xD2 | 0xAB , 10101011b , 171 , "." |
0x73 | 0x00 , 00000000b , 0 , "." | 0x93 | 0x00 , 00000000b , 0 , "." | 0xB3 | 0x00 , 00000000b , 0 , "." | 0xD3 | 0xAA , 10101010b , 170 , "." |
0x74 | 0x00 , 00000000b , 0 , "." | 0x94 | 0x00 , 00000000b , 0 , "." | 0xB4 | 0x00 , 00000000b , 0 , "." | 0xD4 | 0xA9 , 10101001b , 169 , "." |
0x75 | 0x80 , 10000000b , 128 , "." | 0x95 | 0x00 , 00000000b , 0 , "." | 0xB5 | 0x00 , 00000000b , 0 , "." | 0xD5 | 0xA8 , 10101000b , 168 , "." |
0x76 | 0x00 , 00000000b , 0 , "." | 0x96 | 0x00 , 00000000b , 0 , "." | 0xB6 | 0x00 , 00000000b , 0 , "." | 0xD6 | 0xA7 , 10100111b , 167 , "." |
0x77 | 0x04 , 00000100b , 4 , "." | 0x97 | 0x80 , 10000000b , 128 , "." | 0xB7 | 0x00 , 00000000b , 0 , "." | 0xD7 | 0xA6 , 10100110b , 166 , "." |
0x78 | 0x00 , 00000000b , 0 , "." | 0x98 | 0x00 , 00000000b , 0 , "." | 0xB8 | 0x00 , 00000000b , 0 , "." | 0xD8 | 0xA5 , 10100101b , 165 , "." |
0x79 | 0x00 , 00000000b , 0 , "." | 0x99 | 0x00 , 00000000b , 0 , "." | 0xB9 | 0x00 , 00000000b , 0 , "." | 0xD9 | 0xA4 , 10100100b , 164 , "." |
0x7A | 0x00 , 00000000b , 0 , "." | 0x9A | 0x02 , 00000010b , 2 , "." | 0xBA | 0x00 , 00000000b , 0 , "." | 0xDA | 0xA3 , 10100011b , 163 , "." |
0x7B | 0x40 , 01000000b , 64 , "@" | 0x9B | 0x00 , 00000000b , 0 , "." | 0xBB | 0x40 , 01000000b , 64 , "@" | 0xDB | 0xA2 , 10100010b , 162 , "." |
0x7C | 0x00 , 00000000b , 0 , "." | 0x9C | 0x04 , 00000100b , 4 , "." | 0xBC | 0x82 , 10000010b , 130 , "." | 0xDC | 0x00 , 00000000b , 0 , "." |
0x7D | 0x00 , 00000000b , 0 , "." | 0x9D | 0x00 , 00000000b , 0 , "." | 0xBD | 0x00 , 00000000b , 0 , "." | 0xDD | 0x8E , 10001110b , 142 , "." |
0x7E | 0x00 , 00000000b , 0 , "." | 0x9E | 0x00 , 00000000b , 0 , "." | 0xBE | 0x00 , 00000000b , 0 , "." | 0xDE | 0x00 , 00000000b , 0 , "." |
0x7F | 0x00 , 00000000b , 0 , "." | 0x9F | 0x02 , 00000010b , 2 , "." | 0xBF | 0x80 , 10000000b , 128 , "." | 0xDF | 0x33 , 00110011b , 51 , "3" |
0x00 | 0xFF , 11111111b , 255 , "." | 0x20 | 0xFF , 11111111b , 255 , "." | 0x40 | 0xFF , 11111111b , 255 , "." | 0x60 | 0xFF , 11111111b , 255 , "." |
0x01 | 0xFF , 11111111b , 255 , "." | 0x21 | 0xFF , 11111111b , 255 , "." | 0x41 | 0xFF , 11111111b , 255 , "." | 0x61 | 0xFF , 11111111b , 255 , "." |
0x02 | 0xFF , 11111111b , 255 , "." | 0x22 | 0xFF , 11111111b , 255 , "." | 0x42 | 0xFF , 11111111b , 255 , "." | 0x62 | 0xFF , 11111111b , 255 , "." |
0x03 | 0xFF , 11111111b , 255 , "." | 0x23 | 0xFF , 11111111b , 255 , "." | 0x43 | 0xFF , 11111111b , 255 , "." | 0x63 | 0xFF , 11111111b , 255 , "." |
0x04 | 0xFF , 11111111b , 255 , "." | 0x24 | 0xFF , 11111111b , 255 , "." | 0x44 | 0xFF , 11111111b , 255 , "." | 0x64 | 0xFF , 11111111b , 255 , "." |
0x05 | 0xFF , 11111111b , 255 , "." | 0x25 | 0xFF , 11111111b , 255 , "." | 0x45 | 0xFF , 11111111b , 255 , "." | 0x65 | 0xFF , 11111111b , 255 , "." |
0x06 | 0xFF , 11111111b , 255 , "." | 0x26 | 0xFF , 11111111b , 255 , "." | 0x46 | 0xFF , 11111111b , 255 , "." | 0x66 | 0xFF , 11111111b , 255 , "." |
0x07 | 0xFF , 11111111b , 255 , "." | 0x27 | 0xFF , 11111111b , 255 , "." | 0x47 | 0xFF , 11111111b , 255 , "." | 0x67 | 0xFF , 11111111b , 255 , "." |
0x08 | 0xFF , 11111111b , 255 , "." | 0x28 | 0xFF , 11111111b , 255 , "." | 0x48 | 0xFF , 11111111b , 255 , "." | 0x68 | 0xFF , 11111111b , 255 , "." |
0x09 | 0xFF , 11111111b , 255 , "." | 0x29 | 0xFF , 11111111b , 255 , "." | 0x49 | 0xFF , 11111111b , 255 , "." | 0x69 | 0xFF , 11111111b , 255 , "." |
0x0a | 0xFF , 11111111b , 255 , "." | 0x2a | 0xFF , 11111111b , 255 , "." | 0x4a | 0xFF , 11111111b , 255 , "." | 0x6a | 0xFF , 11111111b , 255 , "." |
0x0b | 0xFF , 11111111b , 255 , "." | 0x2b | 0xFF , 11111111b , 255 , "." | 0x4b | 0xFF , 11111111b , 255 , "." | 0x6b | 0xFF , 11111111b , 255 , "." |
0x0c | 0xFF , 11111111b , 255 , "." | 0x2c | 0xFF , 11111111b , 255 , "." | 0x4c | 0xFF , 11111111b , 255 , "." | 0x6c | 0xFF , 11111111b , 255 , "." |
0x0d | 0xFF , 11111111b , 255 , "." | 0x2d | 0xFF , 11111111b , 255 , "." | 0x4d | 0xFF , 11111111b , 255 , "." | 0x6d | 0xFF , 11111111b , 255 , "." |
0x0e | 0xFF , 11111111b , 255 , "." | 0x2e | 0xFF , 11111111b , 255 , "." | 0x4e | 0xFF , 11111111b , 255 , "." | 0x6e | 0xFF , 11111111b , 255 , "." |
0x0f | 0xFF , 11111111b , 255 , "." | 0x2f | 0xFF , 11111111b , 255 , "." | 0x4f | 0xFF , 11111111b , 255 , "." | 0x6f | 0xFF , 11111111b , 255 , "." |
0x10 | 0xFF , 11111111b , 255 , "." | 0x30 | 0xFF , 11111111b , 255 , "." | 0x50 | 0xFF , 11111111b , 255 , "." | 0x70 | 0xFF , 11111111b , 255 , "." |
0x11 | 0xFF , 11111111b , 255 , "." | 0x31 | 0xFF , 11111111b , 255 , "." | 0x51 | 0xFF , 11111111b , 255 , "." | 0x71 | 0xFF , 11111111b , 255 , "." |
0x12 | 0xFF , 11111111b , 255 , "." | 0x32 | 0xFF , 11111111b , 255 , "." | 0x52 | 0xFF , 11111111b , 255 , "." | 0x72 | 0xFF , 11111111b , 255 , "." |
0x13 | 0xFF , 11111111b , 255 , "." | 0x33 | 0xFF , 11111111b , 255 , "." | 0x53 | 0xFF , 11111111b , 255 , "." | 0x73 | 0xFF , 11111111b , 255 , "." |
0x14 | 0xFF , 11111111b , 255 , "." | 0x34 | 0xFF , 11111111b , 255 , "." | 0x54 | 0xFF , 11111111b , 255 , "." | 0x74 | 0xFF , 11111111b , 255 , "." |
0x15 | 0xFF , 11111111b , 255 , "." | 0x35 | 0xFF , 11111111b , 255 , "." | 0x55 | 0xFF , 11111111b , 255 , "." | 0x75 | 0xFF , 11111111b , 255 , "." |
0x16 | 0xFF , 11111111b , 255 , "." | 0x36 | 0xFF , 11111111b , 255 , "." | 0x56 | 0xFF , 11111111b , 255 , "." | 0x76 | 0xFF , 11111111b , 255 , "." |
0x17 | 0xFF , 11111111b , 255 , "." | 0x37 | 0xFF , 11111111b , 255 , "." | 0x57 | 0xFF , 11111111b , 255 , "." | 0x77 | 0xFF , 11111111b , 255 , "." |
0x18 | 0xFF , 11111111b , 255 , "." | 0x38 | 0xFF , 11111111b , 255 , "." | 0x58 | 0xFF , 11111111b , 255 , "." | 0x78 | 0xFF , 11111111b , 255 , "." |
0x19 | 0xFF , 11111111b , 255 , "." | 0x39 | 0xFF , 11111111b , 255 , "." | 0x59 | 0xFF , 11111111b , 255 , "." | 0x79 | 0xFF , 11111111b , 255 , "." |
0x1a | 0xFF , 11111111b , 255 , "." | 0x3a | 0xFF , 11111111b , 255 , "." | 0x5a | 0xFF , 11111111b , 255 , "." | 0x7a | 0xFF , 11111111b , 255 , "." |
0x1b | 0xFF , 11111111b , 255 , "." | 0x3b | 0xFF , 11111111b , 255 , "." | 0x5b | 0xFF , 11111111b , 255 , "." | 0x7b | 0xFF , 11111111b , 255 , "." |
0x1c | 0xFF , 11111111b , 255 , "." | 0x3c | 0xFF , 11111111b , 255 , "." | 0x5c | 0xFF , 11111111b , 255 , "." | 0x7c | 0xFF , 11111111b , 255 , "." |
0x1d | 0xFF , 11111111b , 255 , "." | 0x3d | 0xFF , 11111111b , 255 , "." | 0x5d | 0xFF , 11111111b , 255 , "." | 0x7d | 0xFF , 11111111b , 255 , "." |
0x1e | 0xFF , 11111111b , 255 , "." | 0x3e | 0xFF , 11111111b , 255 , "." | 0x5e | 0xFF , 11111111b , 255 , "." | 0x7e | 0xFF , 11111111b , 255 , "." |
0x1f | 0xFF , 11111111b , 255 , "." | 0x3f | 0xFF , 11111111b , 255 , "." | 0x5f | 0xFF , 11111111b , 255 , "." | 0x7f | 0xFF , 11111111b , 255 , "." |