I describe my idea.
1) Write a bootloader program at ORG 0 that get an HEX file and write memory starting at 3000h
2) export code, manipulate to obtain something like below and put it in a file "bootloader.inc"
3) Take my main program and add DEFINE RESET_ORG 3000hCode:ASM dw 0x0EF5B, 0x0F002, 0x0FFFF, 0x0FFFF, 0x0EFAA, 0x0F003, 0x0FFFF, 0x0FFFF, 0x0FFFF, 0x0FFFF, 0x0FFFF, 0x0FFFF dw 0x0E00B, 0x00606, 0x0C004, 0x0FFE9, 0x0C005, 0x0FFEA, 0x050EE, 0x0CFE9, 0x0F004, 0x0CFEA, 0x0F005, dw 0x00004, 0x0A89E, 0x0D7FD, 0x06EAD, 0x080D8, 0x0EF58, 0x0F002, 0x050E9, 0x0010F, 0x00004, 0x0A8A4, ENDASM
4) at the end of the program add
Then I can call the bootloader with a GOTO @0.Code:@ ORG 0h BootLoader: include "BootLoader.inc"
Of course it doesn't work .....




Bookmarks