[comp.sys.handhelds] OUTPRT for HP28S

neil@kcl-cs.UUCP (Neil Faulks) (01/08/91)

The following program aids transfer of programs and data from a HP28S
to a HP48SX running INPRT.

OUTPRT takes as an argument a list of names of objects to be transmited
to a 48. The list may include the names of subdirectories which will
be handled correctly as will further levels of directory.

The resulting string on the 48 can then be converted directly to a directory
object by

1) Using OBJ-> (or STR->)
2) Edit the resultant string (on the stack) and simply remove the leading
   " or C$ #### (everything up to the word DIR)
   Pressing ENTER will cause the directory object to be parsed as if it
   had just been typed by the user.

Problems

User names on the 28 which conflict with built-in names on the 48 will cause
problems. These can be dealt with by simply by using method (2) above:
when an error occurs the cursor will be positioned to allow easy editing
of the name. OUTPUT v2 may fix this.

Directories with lots of objects or large arrays take so long to build
that INPRT times out. For example when sending a big dir you should
type VARS, wait for it to complete, then run INPRT on the 48 and OUTPRT
on the 28.

Strings containing nulls can not be edited using method (2).

OUTPRT v1
<<
	"DIR" PR1 DROP CR
	PATH N->S
	-> L P
	<<
		P 1 DISP
		1 L SIZE
		IF DUP THEN
			FOR I L I GET DUP N->S PR1 2 DISP
				IFERR RCL THEN
					EVAL CR
					VARS CR OUTPRT
					P STR-> P 1 DISP
				ELSE
					IF DUP TYPE 3 == THEN
						CR ->STR
					END
					PR1 DROP
				END
			NEXT
		END
	>>
	"END" PR1 DROP
>>
	
N->S
<<
	->STR 2 OVER SUB SIZE 1 - SUB
>>