Dynamic Interrupt Routine - Printable Version +- Forum (https://www.boriel.com/forum) +-- Forum: Compilers and Computer Languages (https://www.boriel.com/forum/forumdisplay.php?fid=12) +--- Forum: ZX Basic Compiler (https://www.boriel.com/forum/forumdisplay.php?fid=11) +---- Forum: How-To & Tutorials (https://www.boriel.com/forum/forumdisplay.php?fid=13) +---- Thread: Dynamic Interrupt Routine (/showthread.php?tid=971) |
Dynamic Interrupt Routine - emook - 08-17-2020 A simple dynamic IM routine, it will automatically find the nearest suitable IM jump from, ie you can compile at any address. Best to keep below $C000 if you have any paging plans. Code: dim bx as ubyte RE: Dynamic Interrupt Routine - boriel - 08-18-2020 Some questions: 1) Why the JP 56? 2) You do exx but do not push /pop the EXXed registers? Ah, one more thing: after discussing with other "hardware geeks", all agreed that the value should be always $FF in the table so, as you suggested, only the last value is taken into account. The thing is that only "bugged" (i.e. very old Kempston interfaces) places random (non $FF) values in the Bus, but well designed ones don't. So... RE: Dynamic Interrupt Routine - emook - 08-18-2020 JP 56 is for it you want to use while basic is still running, so you could have your interrupt running in the back ground while NORMAL basic is running. So you can set up an inerrupt using zxb then exit back to basic and have it running. Didn't push the exx regs as I didn't need them in this instance. RE: Dynamic Interrupt Routine - boriel - 08-18-2020 Ah, I understand, thanks!!! RE: Dynamic Interrupt Routine - Duefectu - 08-18-2020 In my implementation, in every interrupt I read the $c000 page, switch to the music page (for example), run music, and then switch to the original page before return. I thing it's important for Next developments where $c000 memory area are used for several resources, at leat in my implementation. RE: Dynamic Interrupt Routine - boriel - 08-19-2020 (08-18-2020, 10:38 PM)Duefectu Wrote: In my implementation, in every interrupt I read the $c000 page, switch to the music page (for example), run music, and then switch to the original page before return. I'm working on a more generic implementation now that ZX Basic 2.x is on the way! Stay tuned! RE: Dynamic Interrupt Routine - worcestersource - 12-27-2020 Woo! Version 2? I just joined today to make the game I always wanted to. Thank you for making your compiler. |