Inform2 or similar for 50g
|
08-14-2017, 08:12 PM
Post: #1
|
|||
|
|||
Inform2 or similar for 50g
Hello,
Is there something like Inform2 (http://www.hpcalc.org/details/1890) for 50g? I have been browsing the hpcalc.org, but have not found similar. Thx. |
|||
08-15-2017, 02:56 AM
Post: #2
|
|||
|
|||
RE: Inform2 or similar for 50g
I thought this would be a good challenge to port to the 50g. I'm so close, but so far. It seems to be referencing a missing ROMPTR. It was ROMPTR B1 1C on the 48, which corresponds to library 177 command 28. But that must be different on the 49/50, because it's failing for me when I try to run the below code after compiling it.
In case anyone else wants to take a stab at it, my code follows (ready to assemble on Jazz on the 50g, followed by a call to CRLIB). Code:
|
|||
08-26-2017, 05:55 PM
Post: #3
|
|||
|
|||
RE: Inform2 or similar for 50g
Wow. I would have imagined it would be a few lines of sysRPL and that it is.
|
|||
08-26-2017, 08:46 PM
Post: #4
|
|||
|
|||
RE: Inform2 or similar for 50g
(08-26-2017 05:55 PM)Vtile Wrote: Wow. I would have imagined it would be a few lines of sysRPL and that it is. ...and it looks like it's actually even more code. The ROMPTR call Eric references appears to be a wrapper around DoInputForm. INFORM2 pulls that entire routine onto the stack, executes all of it before the DoInputForm call, executes its own subroutine, then executes the remaining part of B1 1C. After that it does some more custom clean-up activity if the result wasn't canceled. I suppose you could replicate all of that, but then you'd have to trace through the 9 or so other library calls B1 1C makes and replicate them as well (or find their equivalents in the 50g [if they even exist]). And who knows what else those routines call. It could take a while just to figure out what all you had to replicate. Getting all of that to work successfully would probably be harder than simply learning how to do this in SysRPL on the 50g in the "normal" way. Seriously, though: I suspect the B1 1C routine doesn't exist on the 50g due to the newer InForm functionality that was added in later O/S revisions. It was apparently never a supported function, and it probably got revised to the point that it wouldn't be usable in this new context if it even still exists at all. Eric: you'd probably be better off just trying to write your own version instead of retro-fitting INFORM2. It seems rather dependent on those library entries being present. |
|||
08-26-2017, 10:20 PM
Post: #5
|
|||
|
|||
RE: Inform2 or similar for 50g
(08-26-2017 08:46 PM)DavidM Wrote: Eric: you'd probably be better off just trying to write your own version instead of retro-fitting INFORM2. It seems rather dependent on those library entries being present. Yeah, after spending about an hour on it I realized it wasn't going to solve itself anytime soon so I gave up. Oh well. |
|||
08-26-2017, 10:40 PM
Post: #6
|
|||
|
|||
RE: Inform2 or similar for 50g
Hello Eric,
> It was ROMPTR B1 1C on the 48, which corresponds to library 177 command 28. Most likely it is ROMPTR B1 1E that you are looking for (the internal name is Ck&DoInForm). However, Ck&DoInForm calls FLASHPTR IfMain instead of DoInputForm. As long as there is no message handling involved it should not matter and as far as I can see (I only had a quick look on it) there is no message handling involved. I don’t have a machine ready with Jazz on the 50g, so I can not easily try this. But I am pretty sure, that this is the ROMPTR you are looking for and you should give it a try IMHO. (In case it does not work with IfMain than there is also the possibility to modify the code at run time and exchange it to DoInputForm – but you should give it a try first.) The 49G ROM does indeed contains the whole old DoInputForm engine (GUISLV/GUIMES is entirely built around that) which is Lib # B0 and all its supporting libraries (which are # B1 # B3 # B4 # B5 # B9 # BA # BB # BC # BD # BE # BF). There is even SX code in the 49G ROM! IfMain (the newer engine) is totally independent from that (and has different and less message handling than DoInputForm). However, due to the introduction of the FLASHPTR there was need for adding some ROMPTRs here and there, as not everything is in the same FlashBank. And generally a FlashPtr call should be faster (and does not need TempOb RAM) than a ROMPTR call (the drawback is, that there is no RAM entry for FlashPtrs whereas there is a RAM entry for ROMPTRs). In particular two ROMPTR were added to Lib # B1 in the 49G ROM. I did not check in detail which and where and leave this exercise to the reader. HTH, Andreas http://www.software49g.gmxhome.de |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)