What about a computed goto ? I have never used 12 bit CPUs, but with 14 bit ones, it works : ... call table ;w contains the table index ... ;when returning, W contains table(index) table addwf PCL,F retlw '1' retlw '2' .... > -----Mensaje original----- > De: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]En nombre de Roman Black > Enviado el: miercoles, 30 de mayo de 2001 17:38 > Para: PICLIST@MITVMA.MIT.EDU > Asunto: Re: [PIC]: A table question. > > > Hi, has anyone done a table-less data table?? > > I have run out of room on a 12-core PIC and > need a small table. > > I have tried: > > movlw 23 (table data byte) > decf count,f > skpnz > goto table_exit > movlw 71 (next data byte) > decf count,f > skpnz > goto table_exit > > But this is 4 bytes per table data byte. > Does anyone have a more efficient system? > > I have thought about placing a table in > a ram bank, then using FSR to address it as > the 16C505 can address any ram with FSR without > bank switching. I think this will get me > 2 bytes rom = 1 table data byte. But it is messy. > > Any suggestions from the PIC masters? :o) > -Roman > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body