Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DEF LD 0x80 ; LED adatregiszter (írható/olvasható)
- DATA
- Digit_Code:
- db 0x49, 0x58, 0x35, 0x23, 0x17, 0x6D, 0x70
- org 0x10
- Sum_Lut:
- db 0x00, 0x01, 0x01, 0x02, 0x01, 0x02, 0x02, 0x03, 0x01, 0x02, 0x02, 0x03, 0x02, 0x03, 0x03, 0x04
- CODE
- init:
- mov r0, #Digit_Code
- mov r1, #0x07
- mov r2, #0x00
- read:
- mov r8, (r0)
- mov r9, #Sum_Lut
- and r8, #0x0F
- add r9, r8
- mov r10, (r9)
- add r2, r10
- mov r8, (r0)
- mov r9, #Sum_Lut
- swp r8
- and r8, #0x0F
- add r9, r8
- mov r10, (r9)
- add r2, r10
- sub r1, #0x01
- jz end
- add r0, #0x01
- jmp read
- end:
- mov LD, r2
- jmp end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement