TABLAT in Firewing

General questions about Firewing...

TABLAT in Firewing

Postby Coccoliso » Thu Mar 12, 2015 6:36 pm

Hello,
I need the translation in Firewing language of TABLAT .. even better if there are also examples.
Thanks.
User avatar
Coccoliso
 
Posts: 177
Joined: Sat Sep 27, 2014 10:02 am

Re: TABLAT in Firewing

Postby David John Barker » Thu Mar 12, 2015 7:40 pm

Have a look at the TftGraphic.bas library. Here is an example of ReadByte() for PIC18, PIC24 and PIC32

Code: Select all
private Function ReadByte(index As UShort) As Byte
   #if _core = &H0018 
   dim addr as uinteger = Font.Data + index
   asm   
   mov.w    addr, w13
   mov.w    addr + 2, W0
   mov.w    WREG, _TBLPAG
   tblrdl.b [w13++], w0
   mov.b    WREG, ReadByte
   end asm     
   #elseif _core = &H0012   
   TABLEPTR = Font.Data + index
   asm
   TBLRD *+
   movff TABLAT, ReadByte 
   end asm
   #else 
   addr1 = Font.Data + index
   ReadByte = *(baddr1)
   #endif
End Function 
User avatar
David John Barker
 
Posts: 491
Joined: Thu Nov 08, 2012 12:21 pm


Return to Questions

Who is online

Users browsing this forum: No registered users and 1 guest

cron

x