hi all
it ill be very helpfull if any one can post a sample code using ORG_RESET ORG_PROGRAM
VECTOR_ISR_LO and VECTOR_ISR_HI
thanks
need for ORG_RESET ORG_PROGRAM usage help
Moderators: David Barker, Jerry Messina
- David Barker
- Swordfish Developer
- Posts: 1214
- Joined: Tue Oct 03, 2006 7:01 pm
- Location: Saltburn by the Sea, UK
- Contact:
- David Barker
- Swordfish Developer
- Posts: 1214
- Joined: Tue Oct 03, 2006 7:01 pm
- Location: Saltburn by the Sea, UK
- Contact:
The first thing you need to do is decide if your loader is to reside in lower or upper ROM. If your loader is to use lower ROM, then you only need to consider using vector_isr_low and vector_isr_hi to remap the interrupt vectors for the user program. For example, if user code is to start at $400 then:
will remap the high and low vectors to $408 and $418 respectively. After your loader has finished, you would typically issue a 'goto $400' to execute the user program. The user code would then need to use:
to ensure their program starts at the correct address.
If your loader is to use upper ROM, then you need to use:
where address is the start of your loader code. This ensures that a 'goto address' is inserted at the reset vector that will jump to your loader in upper ROM. You do not need to remap the interrupt vectors if your loader resides in upper ROM.
Code: Select all
#option vector_isr_hi = $408
#option vector_isr_lo = $418
Code: Select all
#option org_reset = $400
If your loader is to use upper ROM, then you need to use:
Code: Select all
#option org_program = address