Revision: 1312 Author: [email protected] Date: Tue Sep 8 14:20:57 2009 Log: only check highest byte of user goto instructions to save 16 bytes http://code.google.com/p/jallib/source/detail?r=1312
Modified: /trunk/sample/18f14k50_usb_bootloader_autostart.jal /trunk/sample/18f2450_usb_bootloader_autostart.jal /trunk/sample/18f4550_usb_bootloader_autostart.jal /trunk/test/peripheral/usb/test_usb_bootloader_autostart.jal ======================================= --- /trunk/sample/18f14k50_usb_bootloader_autostart.jal Tue Sep 8 13:47:22 2009 +++ /trunk/sample/18f14k50_usb_bootloader_autostart.jal Tue Sep 8 14:20:57 2009 @@ -38,7 +38,9 @@ -- needed to get compact code, bootloader has to -- fit within first 2048 bytes in order to be -- compatible with default of PDFSUSB --- currently only 2 bytes left (2022 bytes) +-- currently only 14 bytes left (2010 bytes) for a 18f4550 +-- and only 18 bytes left (2006 bytes) for a 18f14k50 + PRAGMA OPT CONST_DETECT YES @@ -685,19 +687,16 @@ T1CON = 0b0011_0001 -- check if highest part of goto instruction --- if bytes are set to 0xFFFF, then disable +-- if byte is set to 0xFF, then disable -- timer TBLPTRU = 0x00 TBLPTRH = 0x08 -TBLPTRL = 0x02 +TBLPTRL = 0x03 asm TBLRD*+ if TABLAT == 0xFF then - asm TBLRD*+ - if TABLAT == 0xFF then - T1CON = 0x00 - end if + T1CON = 0x00 end if ======================================= --- /trunk/sample/18f2450_usb_bootloader_autostart.jal Tue Sep 8 13:47:22 2009 +++ /trunk/sample/18f2450_usb_bootloader_autostart.jal Tue Sep 8 14:20:57 2009 @@ -38,7 +38,9 @@ -- needed to get compact code, bootloader has to -- fit within first 2048 bytes in order to be -- compatible with default of PDFSUSB --- currently only 2 bytes left (2022 bytes) +-- currently only 14 bytes left (2010 bytes) for a 18f4550 +-- and only 18 bytes left (2006 bytes) for a 18f14k50 + PRAGMA OPT CONST_DETECT YES @@ -680,19 +682,16 @@ T1CON = 0b0011_0001 -- check if highest part of goto instruction --- if bytes are set to 0xFFFF, then disable +-- if byte is set to 0xFF, then disable -- timer TBLPTRU = 0x00 TBLPTRH = 0x08 -TBLPTRL = 0x02 +TBLPTRL = 0x03 asm TBLRD*+ if TABLAT == 0xFF then - asm TBLRD*+ - if TABLAT == 0xFF then - T1CON = 0x00 - end if + T1CON = 0x00 end if ======================================= --- /trunk/sample/18f4550_usb_bootloader_autostart.jal Tue Sep 8 13:47:22 2009 +++ /trunk/sample/18f4550_usb_bootloader_autostart.jal Tue Sep 8 14:20:57 2009 @@ -38,7 +38,9 @@ -- needed to get compact code, bootloader has to -- fit within first 2048 bytes in order to be -- compatible with default of PDFSUSB --- currently only 2 bytes left (2022 bytes) +-- currently only 14 bytes left (2010 bytes) for a 18f4550 +-- and only 18 bytes left (2006 bytes) for a 18f14k50 + PRAGMA OPT CONST_DETECT YES @@ -688,19 +690,16 @@ T1CON = 0b0011_0001 -- check if highest part of goto instruction --- if bytes are set to 0xFFFF, then disable +-- if byte is set to 0xFF, then disable -- timer TBLPTRU = 0x00 TBLPTRH = 0x08 -TBLPTRL = 0x02 +TBLPTRL = 0x03 asm TBLRD*+ if TABLAT == 0xFF then - asm TBLRD*+ - if TABLAT == 0xFF then - T1CON = 0x00 - end if + T1CON = 0x00 end if ======================================= --- /trunk/test/peripheral/usb/test_usb_bootloader_autostart.jal Tue Sep 8 13:47:22 2009 +++ /trunk/test/peripheral/usb/test_usb_bootloader_autostart.jal Tue Sep 8 14:20:57 2009 @@ -32,7 +32,9 @@ -- needed to get compact code, bootloader has to -- fit within first 2048 bytes in order to be -- compatible with default of PDFSUSB --- currently only 2 bytes left (2022 bytes) +-- currently only 14 bytes left (2010 bytes) for a 18f4550 +-- and only 18 bytes left (2006 bytes) for a 18f14k50 + PRAGMA OPT CONST_DETECT YES @@ -633,19 +635,16 @@ T1CON = 0b0011_0001 -- check if highest part of goto instruction --- if bytes are set to 0xFFFF, then disable +-- if byte is set to 0xFF, then disable -- timer TBLPTRU = 0x00 TBLPTRH = 0x08 -TBLPTRL = 0x02 +TBLPTRL = 0x03 asm TBLRD*+ if TABLAT == 0xFF then - asm TBLRD*+ - if TABLAT == 0xFF then - T1CON = 0x00 - end if + T1CON = 0x00 end if --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jallib?hl=en -~----------~----~----~----~------~----~------~--~---
