If you want to get the code to compile, rem the first 2 @org's. change the last to to 800 and 808. These need to be changed anyway as I think they were not far enough in memory.
I have been digesting what Steve has pointed to. My understanding is this: I need to let PBP take care of memory!! The first @ORG is un-needed as PBP will place the code at 00 anyway. So that just needs to be deleted. I think the for the interrupt redirect, we just need a
Code:
DEFINE INTHAND NewIntLocation
then in our application code:
Code:
DEFINE RESET_ORG 800
GOTO Start ' or whatever you favorite label is
NewIntLocation:
Do your Interrupt thing
Start:
Code till your hearts content, (or MEM is full)
So if I am correct, the only thing left is context saving in the real interrupt vector before jumping.
Now as for the rest of the code, I need some help here. I have a crazy mix of PBP commands and direct register addressing. I want to get rid of the direct addressing. This is really bad in the comm part. Do we want to use HSERIN/OUT or SERIN/OUT. I think using SER would be nicer in the aspect we can then use any pins to do this, and have control over true vs inverted signals. It will also be a trivial matter to use I2C instead of SER using the bit-bang approach.
Let me just throw in my opinion here, speed is NOT the issue. This is a bootloader, It will not be used often once your app is done.
Bookmarks