??? 01/05/12 18:15 Read: times |
#185331 - 1st Responding to: ???'s previous message |
Im stuck on that bit of code still.
I type MOV ACC.MUX_BIT_NO, BIT_1 MOV ACC,MUX_BIT_NO+1, BIT_2 But I'm getting error A18 BIT_1 and BIT_2 are BITs and MUX_BIT_NO is a BYTE On MCS51 You can MOVe bits only to or from Carryflag: mov Yourbit,C mov C,Yourbit If Your aim is to copy BIT_1 and BIT_2 into variable positions in ACCumulator, Your way is too HLL-ish. ............. mov r2,#0 mov r3,#0 jnb BIT_1,skipmybit1 mov a,MUX_BIT_NO call routine_number_tobit mov r2,a skipmybit1: jnb BIT_2,skipmybit2 mov a,MUX_BIT_NO inc a ;????or mov a,MUX_BIT_NO+1 call routine_number_tobit mov r3,a skipmybit2 clr a orl a,r2 orl a,r3 .......... routine_number_tobit ???? ret |