Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char numbers[] = { 0x81, 0xCF, 0x92, 0x86, 0xCC, 0xA4, 0xA0, 0x8F, 0x80, 0x84 };
- 00000065 MOVW R26,R28 Copy register pair
- 00000066 ADIW R26,0x01 Add immediate to word
- 00000067 LDI R30,0x00 Load immediate
- 00000068 LDI R31,0x01 Load immediate
- 00000069 LDI R24,0x0A Load immediate
- 0000006A LD R0,Z+ Load indirect and postincrement
- 0000006B ST X+,R0 Store indirect and postincrement
- 0000006C SUBI R24,0x01 Subtract immediate
- 0000006D BRNE PC-0x03 Branch if not equal
- bcdInput = (PINB & 0xF); //Masks out the last 4 bits, because they aren't used
- 0000006E IN R24,0x03 In from I/O location
- 0000006F ANDI R24,0x0F Logical AND with immediate
- PORTC = numbers[bcdInput];
- 00000070 LDI R30,0x01 Load immediate
- 00000071 LDI R31,0x00 Load immediate
- 00000072 ADD R30,R28 Add without carry
- 00000073 ADC R31,R29 Add with carry
- 00000074 ADD R30,R24 Add without carry
- 00000075 ADC R31,R1 Add with carry
- 00000076 LDD R24,Z+0 Load indirect with displacement
- 00000077 OUT 0x08,R24 Out to I/O location
- 00000078 RJMP PC-0x000A Relative jump
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement