Hello Michael,<br><br>I took your picture and typed it out so that <br>others could have a test listing of it rather <br>than a graphical listing.<br><br>I complied it with a51.exe and tested it with jsim.exe. <br>It worked successfully.<br><br>Regards,<br><br>Charles Bannister<br><br><br>.org 0x00<br>Reset: ljmp Main<br><br>.org 0x40<br>Main: 	acall	decode<br>here:	sjmp	here<br>decode:	mov	a, p0<br>	anl 	a, #0x0F<br>	rl	a<br>	push	acc<br>	add	a, #(lookup-lab1)<br>lab1:	movc	a, @a+pc<br>	mov	p2, a<br>	pop	acc<br>	add	a, #(lookup-lab2+1)<br>lab2:	movc	a, @a+pc<br>	mov	p1, a<br>	ret<br>lookup:<br>.dw	0001h, 0002h, 0004h, 0008h<br>.dw	0010h, 0020h, 0040h, 0080h<br>.dw	0100h, 0200h, 0400h, 0800h<br>.dw	1000h, 2000h, 4000h, 8000h<br><br>;; hex file listing for above program<br>:03000000020040BB<br>:10004000114480FEE580540F23C0E0240B83F5A00B<br>:10005000D0E0240583F5902200010002000400088E<br>:100060000010002000400080010002000400080091<br>:08007000100020004000800098<br>:00000001FF<br><br>