0 Members and 3 Guests are viewing this topic.
Can't you fix OS _GetKey by jumping to 0038H at the end of the interrupt?
Or rather $006C, because otherwise the OS would switch the shadow regs w/the regular regs again, messing all the registers up.
TSRsTSRs are Terminate and Stay Resident programs. If you change the RET and exchange instructions in your interrupt to JP $003A, then you'll process the calculator's system interrupt as well as your own.Whoa, whoa, wait a minute. Why are we jumping to $003A? Isn't the system routine at $0038??Well, yes, the Mode 1 interrupt does jump to $0038. What we are doing is swapping the shadow registers when our interrupt is run, and we want them to stay swapped when the system interrupt is running. A section of the code at $0038 looks like 0038: JR $006A 003A: IN A, (4) . . 006A: EX AF, AF' 006B: EXX 006C: JR $003AYes this is completely redundant, but by jumping to $003A the exchanges get skipped over.This is useful if you still want GetKey and GetCSC and other Mode 1 features to work while you're in Mode 2.