PDA

View Full Version : Loader_used 1



sebstien.decorm
- 20th August 2005, 15:32
How this function work ? I Try
DEFINE LOADER_USED 1
start:
high portb.7
pauseus 1
low portb.7
goto start
And I got
Ad0x00 GOTO 0x32
Ad0x02 nop
Ad0x04 nop
Ad0x06 nop
Ad0x08 CLRF 0x1, ACCESS 'start of the pauseus 1
to
Ad0x30 RETURN 0'end of the pauseus 1
Ad0x32 BSF 0xf81, 0x7, ACCESS 'main prog
And without DEFINE LOADER_USED 1
the loop pauseus start at 0x04
How can I use it with my bootload which start at 0x00 at finish at 0x1ff ?
How can I redirect the pause or pauseus subroutine to another address?

sebstien.decorm
- 21st August 2005, 08:43
Ok I found why most of bootloader don't work with the "LOADER_USED 1" command.
Because the melabs bootloader start at the end of the prog instead of the first 0x200 first byte :
it start with GOTO 0x7e00
so I have to modify my bootload to be at the end of the pic , because the pbp work always at the begin ..

Darrel Taylor
- 21st August 2005, 09:35
If the bootloader is located before the program, you can use this define.

DEFINE RESET_ORG 200h
<br><br>

Juan Rios
- 11th October 2006, 15:50
Hello, I had the same problem with the bootloader and the Reset_Org suggestion worked great for me, but it's only supported in PBP for 18Fxx. When I tried same with a 16F874 I found that PBP ignores the DEFINE and fills low memory with its own routines. I want to put my bootloader in the bootloader area to be able to protect it, so placing it in high memory is not a good solution.
I'm using PBPW V2.46 and MPASM V3.90 under MPLAB V7.01. My bootloader is based on Microchip's AN851.
Could someone give me a hint? Thanks in advance.

Juan Rios