From: kskalb@immd1.informatik.uni-erlangen.de (Klaus Kalb)
Subject: Re: System RPL Questions
Organization: CSD., University of Erlangen
Date: Mon, 5 Oct 1992 10:21:54 GMT
Keywords: RPL Help

yh18@uk.co.gec-mrc (John Bain) writes:


>Hi everybody!
Hi you!

>I've recently been taking my first tentative, trembling steps into the
>world of system rpl, and there are a few things I'm confused about.  If
>anyone can help me I'd be grateful.

I give it a try.

>1) Can I use user words in a system rpl program?  I've found a few in
>entries.a, but not very many.  Can I use the rest, and if so, how? ( I
>know I can easily find the addresses of the ones I want to use, and have
>done so for a few, but as these are not in entries.a they are presumably not
>supported.)

Yes you can. Simply supply the address or include them into your
entries.a file by yourself. The usual convenation is to put a
lower case 'x' in front of them. So 'xDUP' is 1FB87 (the DUP-Command)
and 'DUP' is 03188 (internal DUP).
Userwords are as supported as the binary format for UserRPL programs
is. So you are one the save side using them. 
But note that user words save the arguments and perform AtUserStack.
So the error system will get confused.

>2) Where are all the operations on symbolics?  I can't find many in the
>rplman.doc which came with the system rpl kit.

Either you use the userwords on symbolics or you dissassemble those
userwords to get the unsupported (!) addresses.
Or have a look at the internals list available from seq.uncwil.edu. 
But in general it is not a good idea to use unsupported words.


>3) As I understand it, execution of a program object involves execution
>of its members in order.  But, if I have a user program (\<< ... \>>), 
>one of whose members is another user program, that program is put on the
>stack, not executed.  I.e., there appears to be some sort of implicit
>'tick' before the user program object.  When decompiling such a program
>(using ->HEX from horn2.zip) I see there is an extra word (2349C) just
>before the inner program object, i.e.:
>	 \<< \<< + \>> \>>
>gives:
>	 02D9D    (-> program prefix)
>         2361E    \<<
>         2349C    ??
>         02D9D    (-> program prefix)
>         2361E    \<<
>         1AB67    +
>         23639    \>>
>         0312B    SEMI
>         23639    \>>
>         0312B    SEMI

>Does this extra word (which doesn't match the 'tick' in entries.a) have
>anything to do with it?

Yes, it does the same as the tick does in SysRpl, only on UserRPL level.
i.e 2349C (called xSILENT or Cmd_blank in the internals list)
is :: CK0ATTNABORT 'R ; 

>4) While I'm on the subject, what do the \<< and \>> do anyway?  (if I 
>sound confused by all this, it's probably because I am!)

They mainly serve as delimiters for editing and parsing UserRPL programs.
Both of them resolve to :: CK0ATTNABORT ;
They do nothing but checking for a user interrupt from keybord and
resetting the error system.
In almost every case you can remove them savely, even from pure UserRPL
programs. There are several programs (called 'STRIP') out there
to do this.

Note that there are two flavours of \<<: That one that comes in
front of programs and that one that comes after the \-> for
local vars. You shouldn't remove the second one.

>5) I don't understand what the 'TakeOver' does in the parameterised
>outer loop.

I'm not sure either what TakeOver does in those objects that will never
appear in menus, but I keep on including them. I assume that they
are there prophylacticaly.

>6) I've been reading rplman and Derek Nickel's internals document (again
>from horn2 - many thanks to Joe and all the authors for all those goodies!).
>What other documents should I be reading?

Start dissassembling or unthreading the system ROM. This gives you
examples for (mostly ;-) correct SysRPL programs.

>Sorry there are so many questions, but I'd be really grateful if anyone
>could take the time to help me out.

Be welcome, -KK

---
------------------------------------------------------------------------------
    Klaus Kalb     | mail :  IMMD1 / Martenstr. 3 / W-8520 Erlangen / Germany 
 Werch ein Illtum  | email:  kskalb@immd1.informatik.uni-erlangen.de   
------------------------------------------------------------------------------