BOOT PIC FOR HI-TECH C

v70

copied _bootpic67, and converted to hi-tech C.  Works 100% with mnpicht70 (prints 'BBBBB') and vbboot70

v71

have hooks at top 4 addresses of hex file, can call eraseflash through hook

note: in all previous versions, delayus stuffs up ram, so eliminate that

v72

works with manu id

v73

WriteFlash works now

v74

tested WriteFlash

v75

API_WriteFlash works, but for some fu, er, reason it doesn't work with an inline #define

v76

fixed problem

tips:

1)	never use asm("MOVFP _data,WREG"); if data is in bank 1, it won't work.  Instead, use WREG=data;
2)	if a inline #define function doesn't work, it could be that a global variable that it uses is 
		interfering with a local variable of the function that is called.
		Fix: keep global variables used by a #defined inline function unique, perhaps
		by prefixing them with the functions name.

v77

made writerom and readrom use temporary variables at top of ram

tip: to find out what instruction changes between ram banks, 

unsigned char x0;
bank1 unsigned char x1;

x0=0x20;
x1=0x40;

then follow the assembly instructions to find that 	MOVLR 0x1	changes to ram bank 1.

tip:

adding -Zg9 to compiler makes global optimisations the most, -Zg by itself defaults to -Zg1

v78

MILESTONE VERSION, WORKS WITH API CALLS 

v79

tested as a complete system, accepting calls from mnpicht, btpicht downloaded using vbboot

v82

FINAL VERSION

seems to work fine