![]() |
|
|
|
| ||||||
|
Welcome to the The ProgrammersTalk Community forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| Tags: |
![]() |
![]() | | LinkBack | Thread Tools | Display Modes | ![]() |
| |||
| [SOLVED] Can you help me with my assembly programming? it should show on 7seg the val ...of r6-7? ;Prints the BCD number stored in p2 and p0 in seven printBCD: mov a,r6 jz m1 jnz m2 m2: setb p2.4 mov dptr, #table7seg mov a,R7 anl a,#0fh movc a,@a+dptr mov P0, a mov a, R7 mov dptr, #table7seg1 swap a anl a,#0fh movc a,@a+dptr mov P2, a m1: clr p2.4 mov dptr, #table7seg mov a,R7 anl a,#0fh movc a,@a+dptr mov P0, a mov a, R7 mov dptr, #table7seg1 swap a anl a,#0fh movc a,@a+dptr mov P2, a ret ;This table is used to convert a number to its 7-segment representation ;The bits are connected as follow: e,g,f,x,a,b,d,c table7seg: db 01010000B ; 0 db 11111010B ; 1 db 00110001B ; 2 db 10110000B ; 3 db 10011010B ; 4 db 10010100B ; 5 db 00010100B ; 6 db 11110010B ; 7 db 00010000B ; 8 db 10010000B ; 9 table7seg1: db 00010010B ; 0 db 01011111B ; 1 db 10010100B ; 2 db 00010101B ; 3 db 01011001B ; 4 db 00110001B ; 5 db 00110000B ; 6 db 01010111B ; 7 db 00010000B ; 8 db 00010001B ; 9 |
| |
![]() |
| Thread Tools | |
| Display Modes | |
| |