I'm suprised that you're not asking us to explain why that code causes the computer to reboot.
First off, you're smashing up the SS register while interrupts are enabled, and you aren't restoring it afterwards.
Secondly, your ISR20h() function doesn't appear to be defined as an interrupt handler.
Third, if your compiler supports FAR pointers, you shouldn't need to use inline ASM to set the interrupt vector.
These three points aside, however, the only things I can come up with is that the linker or exe2bin is messing up the offset relocation for the interrupt handler or that the boot loader is starting the program with a denormalized entry point (if memory serves, the .COM file format needs to start executing at the start of the file with a PC value of 0x100, if that gets messed up CS-relative offset fixups aren't going to work, but PC-relative calls and branches will still work).
Hope this helps.
|