| ??? 02/22/01 09:41 Read: times |
#9537 - RE: assembly |
Hi Charles,
sorry, but I was laughting many minutes about your example. The whole program is a joke. This is an excellent example, how anybody should never write programs and especially interrupts. The only reason for such programming I can see, was to confuse any other person or avoid other persons to make minimal changes. It is a way of code protection on source level. Why ? 1. The only main which can be executed, was "MAIN: JMP MAIN" forever. None of the interrupts preserve used registers, but destroy them. So any main which use registers, was impossible and also different interrupt priorities. 2. The serial interrupt was handled without clearing the interrupt pending flag. So, if it was invoked once, it was executed again and again. If the interrupt was leaved with RETI, one main instruction was executed and then the interrupt was invoked again. You have big luck, that the only other processes, which are needed, the other interrupts and these are also prior in the interrupt polling sequence. Only so the serial interrupt can be leaved in your program. Peter |
| Topic | Author | Date |
| assembly | 01/01/70 00:00 | |
| RE: assembly | 01/01/70 00:00 | |
| RE: assembly | 01/01/70 00:00 | |
| RE: assembly | 01/01/70 00:00 | |
| RE: assembly | 01/01/70 00:00 | |
RE: assembly | 01/01/70 00:00 |



