[comp.sys.handhelds] RPLC Alpha

cloos@acsu.buffalo.edu (James H. Cloos) (02/28/91)

Everyone who would like to alpha test rplc please send me a note with the
subject of "RPLC Alpha."  Please indicate whether you have flex.  (If not,
either I can send you the flex output file, the flex binary for SPARC-
stations at sunos4.1+, or you can pick it up from your frendly neighborhood
comp.sources.unix archiver.  (Uunet.uu.net, for instance.)  The source code
runs about 2500 lines so far.

Still to do are comments, literal blocks, arrays, linked arrays, External
types 0-4, Backups, Code Objects (ready when literal blocks are) and
Libraries.  (See note below.)  I hope that these all will be supported by
the time it goes beta, but I doubt that externals 1-4 will be--I've no idea
what they look like.

I have 2 requests on this front.  I'm pretty much lost when it comes to
writing software for msdos.  If someone would like to go thru the code and
make it dos'able, that would be helpful.  I've heard unconfirmed reports of
flex being ported to msdos, but the flex output file could always be used
directly.  Also, I feel compelled to farm out library support.  Having the
src to usrlib, and having looked at a couple of the files therein, I could
most likely do a bloody good job of infringing on HP's copyright.  The best
format for a library handling routines would be a star macro (should be
doable).  

The syntax is below.  Not quite a full grammer, but it'll do for now.
In general, all numeric fields default to hex, and right now binary,
octal and decimal formats are not yet up.  Reals are the exception to this.

# 1		System binary
% 1		Real
%% 1		Long Real
C% 1		Complex
C%% 1		Long Complex
CHR "a"		Character
$ "aksh"	(Char)String
HXS 187beda	Binary (HexString)
{ ... }		| 	( `...' is any objects)
{ ... ;		List
DOSYMB ... ;	Algebraic (Symbolic)
UNIT ... ;	Unit  (special `...' inclusion)
TAG "akjs" .	Tag  ( `.' is one object)
GROB 2 4 dd12	Graphic Object
:: ... ;	Program
ID "jkhfds"	Global Name
LAM "kjah"	Local Name
ROMPTR 2 150	XLIB (ISOL, in this case.)
==XXXXX		jsr to address xxxxx, most likely in rom.

CODE (**) ENDCODE	Not in yet, but the stuff between the (* and *)
			goes into the star file.

LIB .... ENDLIB		Whatever syntax it gets.

DIR .... ENDDIR		I'm looking at the form `DIRENTRY NAME: "aak" %6'
			for a entry called `aak' with 6.0 as it's value.
			perhaps the `NAME:' field will disappear.

BAK "afkjas" .		Just like Tag in syntax, but code is not yet written.
			& I don't know what the sys_bin at the end if for.
			(Well, actually it has got to be there to
			facilitate the process of stringing together the
			port variables, but what *I* should put in there I
			do not know.)

DOEXT0 LIBNUM: XXX EXTNUM: XX ... ;	Libray Data.

Whitespace is as in C.  This means near-total freeform.  Ie, `%1' is a
symbol & is equal to ==2a2c9, but `% 1' is equal to "data.a x'2933\ndata.3
x'000\ndata.12 x'000000000001\n data.1 x'0".  Because of the way (f)lex
works, any other symbols representing data objects can be put in the
symbols file & used just by closing up the whitespace.  {LAM"'t"} could
then be used as a symbol representing the address of a list containing a
local called 't.

The symbols file I have ready has all of the userlanguage commands,
constants %-9 thru %9, and the symbols you need to put units together.

For now you run rplc on your input file & then star on the output file to
get a binary file for the 48.  Eventually calling rplc will work just like
calling cc does.

Expect to get a reply from me either w/in 48 hours or after 5.March.91,
whichever is later, with the files.  I've another project I must work on now.

It does need some cleaning-up, and I've been a bit lazy w/ the comments,
but it is fast, even with flex's slowest (and hence smallest object file)
format.

Also, I'm looking at /**/ for comments, but am open to suggestions.  (@ may
be a good idea.)  &INCLUDE is it's only current directive; for now you get
to nest 10 deep, I'll go to a completely dynamic allocation when I can get
the time to get it right.  I'm also thinking of keeping track of the stack
contents' typen so that we don't need different symbols to add reals vs.
system binaries, vs. strings, etc.  I may be grasping at straws on that one
though. 

Happy coding.

-JimC
--
James H. Cloos, Jr.		Phone:  +1 716 673-1250
cloos@ACSU.Buffalo.EDU		Snail:  PersonalZipCode:  14048-0772, USA
cloos@ub.UUCP			Quote:  <>