Metropoli BBS
VIEWER: up.doc MODE: TEXT (ASCII)
I wrote UP for my own personal use, but upon seeing requests for
this functionality on comp.sys.hp48, I decided to release it.
Runs on GX, should also run on SX since only supported SYSRPL
calls are used.  Takes up about 500 bytes of memory.

Files:
	up.sys	-- The main program, assign this to key 31.2
	up.par	-- Map of internal menus

Installation:
	Download both files to the calc.  The file up.par MUST
	be stored as 'up.par' in the HOME directory.  If it is
	not, up.sys will report an error, but should not crash.
	Assin up.sys to key 31.2 by entering:
		'up.sys'
		31.2
		ASN


Source:
	The source is not really commented, but is pretty simple.
	up.par is a 236 character string.  Each entry consists
	of 2 chars.  The first char is the IP of the parent menu.
	The second char / 100 is the FP.  Hmmm... Maybe an example
	would be best.

	C/C++:
		double parent(double menu)
		{
			int idx = 2 * (int)floor(menu);
			char c1 = up.par[idx];
			char c2 = up.par[idx+1];
			return c1 + ((double)c2 / 100);
		}

	USER RPL:
		<< up.par RCLMENU		// get string and current menu
		   IP 2 * 1 +			// position of first char
		   DUP 1 +			// position of second char
		   SUB DUP			// get 2 char substring (2 copies)
		   TAIL NUM 100 / SWAP		// decimal part of parent menu
		   HEAD NUM			// integer part
		   +				// now parent menu number is on stack
		   MENU				// display parent menu
		>>

Ryan Salsbury	russells@netcom.com
[ RETURN TO DIRECTORY ]