senior_falcon Posted August 10, 2017 Share Posted August 10, 2017 I have revisited my HMLOADER from 20 or more years ago. This is a way to embed assembly code inside an XB program and have it run directly from high memory using CALL LINK. Most of it has been rewritten and the code was greatly improved. Now you can resequence and even load an XB program without overwriting the embedded code. One of the neat tricks I discovered recently is that you can do useful things by modifying the “Highest Address in Expansion Memory” located at >8384 or -31868. With the 32K memory expansion this will normally contain >FFE7. If you CALL LOAD(-31868,0,0) then the XB interpreter thinks there is no expansion memory and will use VDP ram to load and run a program. But even though the program is running from VDP ram, all the 32K can be seen by XB. It can still CALL PEEK, CALL LOAD and CALL LINK as before! With this trick you could use 32K of assembly subroutines with an XB program. Also, I think you could run XB programs from VDP and CPU ram at the same time. You'd need to store the scratchpad when going from one to the other. Not sure how useful this would be, but it is a neat trick. Similarly, changing this address makes it possible to OLD DSKn.PROGRAM without overwriting embedded code. The included docs tell how to do this with HMLOADER2. HMLOADER2.zip 12 Quote Link to comment Share on other sites More sharing options...
+arcadeshopper Posted August 10, 2017 Share Posted August 10, 2017 Nice work! Sent from my LG-H830 using Tapatalk Quote Link to comment Share on other sites More sharing options...
+Ksarul Posted August 11, 2017 Share Posted August 11, 2017 Nice trick! Quote Link to comment Share on other sites More sharing options...
Asmusr Posted August 11, 2017 Share Posted August 11, 2017 It's incredible that there are still tricks like that to be discovered. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.