alonzo@microsoft.UUCP (Alonzo GARIEPY) (03/15/90)
Rick Grevelle does it again! This is an extremely elegant solution.
I will see if I can find something similar on the 48.
--AMG
--- Forwarded mail from uunet!SIGMA.TAMU.EDU!FTG0673
From: Rick Grevelle <sigma.tamu.edu!ftg0673>
Subject: CODE
To: microsoft!alonzo
Alonzo,
I have found the solution to the code problem. You can now
code quickly and painlessly with less chance of error by using a
machine subroutine from the ROM. It allows for easy documentation
of user written machine programs and eleminates the problem of check
sums not being able to differentiate between system objects. The ROM
address of the machine routine that allows you to do this is #3B82h.
According to Toonen's ROM map: 03B82 +_1string2string. This is a bit
over simplified in that the routine will allow binary integers to be
used as well as strings. I discovered that the routine works by using
the prolog of the object in level 1 to determine the the object type
after the addition. What this means is, if level 2 contains a binary
integer and level 1 a null string, or any string, the prolog for the
binary integer (#2A70h) is discarded for that of the string (#2A4Eh).
Here I will use PIG as an example. I think you'll agree that there is
no contest between using this approach to enter and run machine programs
and any of the other previous ones.
Enter PIG as follows: PIG[8AFA]
{ #3012310003B02C96h
#1631641961031341h
#3117451961031765h
#C808461241231h }
Now you are ready to enter the program that will turn the binary
integers into executable form.
->SYS[734D]
<< " " + LIST-> 2 SWAP ; Intialize null string
START #3B82h SYSEVAL ; Begin code loop
NEXT #71BDh SYSEVAL ; End loop, set pointer
#3E9D7h SYSEVAL >> ; Get program, end user.
Let me know what you think about the use of these addresses.
Thanks again,
Rick
--- End of forwarded message from uunet!SIGMA.TAMU.EDU!FTG0673