??? 06/29/07 01:31 Read: times |
#141326 - Not sure if this will help but anyways Responding to: ???'s previous message |
im not to sure exactly what you want to do here:
"mov a,#0Fh" is the same as "mov a,#1111b" and vice versa. The only thing i can think of is if you wanted to display binary charchters on an LCD display for example as its friday and iam bored i will write some code :) : ;clear registers r0 to r7 main: mov a,#0Fh ;set acc to ascii value to be converted jb acc.0,$set_r0 $check_bit1 jb acc.1,$set_r1 $check_bit2 jb acc.2,$set_r2 $check_bit3 jb acc.3,$set_r3 $check_bit4 jb acc.4,$set_r4 $check_bit5 jb acc.5,$set_r5 $check_bit6 jb acc.6,$set_r6 $check_bit7 jb acc.7,$set_r7 $done ;send r7 to r0 ;bytes sent will be 00,00,00,00,01,01,01,01 jmp $ $set_r0 mov r0,#01h jmp $check_bit1 $set_r1 mov r1,#01h jmp $check_bit2 $set_r2 mov r2,#01h jmp $check_bit3 $set_r3 mov r3,#01h jmp $check_bit4 $set_r4 mov r4,#01h jmp $check_bit5 $set_r5 mov r5,#01h jmp $check_bit6 $set_r6 mov r6,#01h jmp $check_bit7 $set_r7 mov r7,#01h jmp $done |
Topic | Author | Date |
number in ascii to binary | 01/01/70 00:00 | |
Not sure if this will help but anyways | 01/01/70 00:00 | |
Basic method | 01/01/70 00:00 | |
Needs a bit more error checking | 01/01/70 00:00 | |
Solution | 01/01/70 00:00 | |
A Different Solution | 01/01/70 00:00 | |
I agree | 01/01/70 00:00 | |
thank you![]() | 01/01/70 00:00 |