Jump to content

Photo

HMLOADER2


3 replies to this topic

#1 senior_falcon OFFLINE  

senior_falcon

    Dragonstomper

  • 887 posts
  • Location:Lansing, NY, USA

Posted Wed Aug 9, 2017 8:45 PM

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.
 
 

 

 

 

Attached Files



#2 arcadeshopper OFFLINE  

arcadeshopper

    River Patroller

  • 2,426 posts
  • Location:Portland, Oregon USA

Posted Wed Aug 9, 2017 8:47 PM

Nice work!

Sent from my LG-H830 using Tapatalk

#3 Ksarul OFFLINE  

Ksarul

    River Patroller

  • 4,086 posts

Posted Fri Aug 11, 2017 9:11 AM

Nice trick! 



#4 Asmusr OFFLINE  

Asmusr

    River Patroller

  • 2,401 posts
  • Location:Denmark

Posted Fri Aug 11, 2017 11:12 AM

It's incredible that there are still tricks like that to be discovered. 






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users