n023el@tamunix (Robert Ellis) (06/16/90)
>From n233dk Thu Jun 14 02:33:29 1990
Return-Path: <n233dk>
Received: by tamuts.tamu.edu (/\../\ Smail3.1.14.4 #14.2)
id <m0hfj5N-00001gC@tamuts.tamu.edu>; Thu, 14 Jun 90 02:33 CDT
Message-Id: <m0hfj5N-00001gC@tamuts.tamu.edu>
Date: Thu, 14 Jun 90 02:33 CDT
From: n233dk (Frederick Grevelle)
To: n023el
As suggested by Alonzo Gariepy, here is an improved version of PIG.
69C20
53000
132 SWAP.A A,D0
103 MOVE.W A,R3
147 MOVE.A @D1,C
134 MOVE.A C,D0
169 ADD.A 10,D0
146 MOVE.A @D0,C
136 SWAP.A C,D0
1527 MOVE.W @D0,A
134 MOVE.A C,D0
1507 MOVE.W A,@D0
113 MOVE.W R3,A
132 SWAP.A A,D0
142 MOVE.A @D0,A
164 ADD.A 5,D0
808C JUMP.A @A
For those individuals still using the 28S, here are two programs which
will provide a faster means of entering the above PEEK routine.
->SYS
<< "" + LIST-> 2 SWAP
START #3B82h SYSEVAL
NEXT #71BDh SYSEVAL
#3E9D7h SYSEVAL >>
->SYS expects a list containing binary integers in level 1; which in
this case would be:
{ #3012310003502C96h
#1631641961431741h
#2313117051431725h
#C808461241h }
->SYS will append the binary integers and return the code in executable
form to the stack. However, this is not the complete program in which
Alonzo intended the code to be used. To do this I have written a program
which allows stack objects to be PUT into user written programs as if
they were lists. That is to say, the program works exactly like the
PUT command in the list menu, but only on programs.
POKE
<< IF 3 DUPN DROP
TYPE { } + SWAP TYPE
+ { 0 8 } ==
THEN #7F77h SYSEVAL
#3F41h SYSEVAL
#3EEBh SYSEVAL
END >>
Now set up the stack in the following manner:
3: << 64 STWS #0h OR A >>
2: 6
1: System Object
(the System Object in level 1 is the executable machine code object
created by ->SYS)
The result of using POKE on the above stack arrangement will be Alonzo's
peek routine, PIG; and should look like this:
PIG
<< 64 STWS #0h OR
System Object >>
It should be noted that these routines will only work in the 28S.
rick grevelle