??? 01/06/12 11:59 Read: times |
#185347 - Simple approach Responding to: ???'s previous message |
Hi Stefan,
Thanks for your advice on individual bit select and I think know what you mean about it being too much like HLL now, kind of.. What I have done now, since I’m using assembly, is I’m just going to make it dead simple. Here is some code ;Inputs: MUX_1, MUX_2, MUX_3, MUX_4, MUX_5, MUX_6, MUX_7, MUX_8 ;Outputs: MESS_1, MESS_2 MESS_1 DATA 0x10 MESS_2 DATA 0x11 ; MUX_1 through 8 will all each contain a value from RES_1 through RES_4 MUX_1 DATA 0x20 ..... MUX_8 DATA 0x27 RES_1 EQU 0x00 ... RES_4 EQU 0x03 CALL MESS_MAKER MESS_MAKER: PUSH ACC CLR ACC MOV C, MUX_1.0 RRC A MOV C, MUX_1.1 RRC A MOV C, MUX_2.0 RRC A ..... MOV C, MUX_4.1 RRC A MOV A MESS_1 CLR A ; I repeat this for MUX_4 through MUX_8 and save to MESS_2 Nice, simple and it looks like it works so far |