MCODEing on OSX
|
04-07-2019, 07:49 PM
Post: #43
|
|||
|
|||
RE: MCODEing on OSX
(04-07-2019 06:41 PM)hth Wrote: One of the amazing things about MCODE is when you start your project and "create" a new 4K page, that tiny canvas, there is so much functionality that can be squeezed into it. I have seldom met anything quite like it. If you are writing something for the CL, the MMU makes it possible to dynamically load stuff into Page 4. You don't have to move anything because only the MMU entry for Page 4 changes. This is the technique I use with the 41CL Extreme Functions (YFNX), which makes extensive use of the 4LIB image. I do the same thing when I am dealing with Flash, although in this case I do have to move sections of code into RAM before reprogramming the MMU. I then jump into Page 4 (executing out of RAM) while I do the Flash erase/write stuff. If your Page 4 System Extensions are called by functions I would recommend using this approach. The sources for YFNX and YLIB are on the 41CL website. The one complication doing this is error handling. You can't just display an error and exit, because you always have to undo the MMU remapping. Again, YFNX and YLIB show how I do this. I use dedicated code in the module to do the dynamic paging, but if your CL is up-to-date the same code is available as a subroutine in Page 3. I agree that doing MCODE is extremely rewarding and it is amazing what can be done in 4K. I also love going through the HP listings looking for tricks and the inevitable "why didn't I think of that" moments. Monte |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)