| ??? 01/05/03 15:22 Read: times |
#35685 - RE: 4 -> 16 ASM routine needed |
Well here goes:
lookup: db 01h, 02h, 04h, 08h, 10h, 20h, 40h, 80h mov dptr,#lookup mov a,P0 anl a,#7H movc a,@a+dptr jb P0.3,setp2 mov P1,a sjmp done setp2: mov P2,a done: ... Thats 8 instructions and 8 bytes lookup. It may be possible to make it 1 instruction shorter by using the movc a,@a+pc instruction. Mike Karas |



