| ??? 12/02/08 16:22 Read: times |
#160507 - a sample Responding to: ???'s previous message |
CSEG AT 000h ;reset
ljmp startup
CSEG AT 003h ;int 0
ljmp ISC_EI0
CSEG AT 00bh ;int 1
ljmp ISC_T0
CSEG AT 013h ;int 2
ljmp ISC_EI1
.....
// here switches between boot and app.
ISC_EI0: jnb GBboot,appET0 //int 0
ljmp ISR_EI0 ; bootloader ISR
appET0: ljmp APPBASE + 000h
ISC_T0: jnb GBboot,appT0 //int 1
ljmp ISR_T0 ; bootloader ISR
appT0: ljmp APPBASE + 004h
ISC_EI1: jnb GBboot,appEI1 //int 2
ljmp ISR_EI1 ; bootloader ISR
appEI1: ljmp APPBASE + 008h
......
startup:; setb GBboot
mov dptr,#0fbffh
mov a,#0
movc a,@a+dptr
jnz startAP ; if last page of flash is erased we are in app mode
ljmp ?C_STARTUP
startAP: clr GBboot
ljmp APPBASE + 060h |
| Topic | Author | Date |
| Bootloader | 01/01/70 00:00 | |
| you are mixing RAM and ROM and .... | 01/01/70 00:00 | |
| Circuit | 01/01/70 00:00 | |
| Follow up the reply | 01/01/70 00:00 | |
| rework the board so that ... | 01/01/70 00:00 | |
| How to rework the board? | 01/01/70 00:00 | |
| I give up | 01/01/70 00:00 | |
| Don't Give Up... | 01/01/70 00:00 | |
| two ways | 01/01/70 00:00 | |
| a sample | 01/01/70 00:00 | |
| StartUp Code | 01/01/70 00:00 | |
| I have heard that ... | 01/01/70 00:00 | |
| this is a forum for help with problems ... | 01/01/70 00:00 | |
| Thank Erik,.. | 01/01/70 00:00 | |
| Dual C Programs | 01/01/70 00:00 | |
| Dual C Programs | 01/01/70 00:00 | |
| Be Very Careful | 01/01/70 00:00 | |
| Be Very Careful | 01/01/70 00:00 | |
BEWARE | 01/01/70 00:00 | |
| please do not .... | 01/01/70 00:00 | |
| Upload Image... | 01/01/70 00:00 | |
| That's not the way... | 01/01/70 00:00 | |
| Von Neumann - Interrupt problem | 01/01/70 00:00 | |
| Yes | 01/01/70 00:00 | |
| Interrupt problem | 01/01/70 00:00 | |
| Erik's advice? | 01/01/70 00:00 | |
| How to use the code? | 01/01/70 00:00 | |
| Strong Suggestion..... | 01/01/70 00:00 |



