IPL File Index ============== This is an edited version of the main web archive at: http://www.infionline.net/~wtnewton/oldcomp/hp2100/files.htm (which contains a few more IPL's not included here) 1dca.ipl one-dimensional cellular automata generator 7900.ipl 7900 disk driver 7906.ipl 7906 disk driver 8kextra.ipl common words for 8KW build altutil.ipl DMS words for loading and saving ABS files baci.ipl BACI serial port driver basconv.ipl converts text attached to PTR to PRINT code for BASIC bigshift.ipl words for shifting 32-bit values binpatch.ipl a utility for altering device I/O addresses in binary code bkfile.ipl saves/restores encoded files to/from the console (req's conalt) capslock.ipl allows typing commands in lower-case, apps see UC input cfge.ipl allows setting TTY/BACI slot and default console from switches conalt.ipl dumps alt mem or system to console, permits pasting back config.ipl allows changing slot assignments and default console congen.ipl dumps system in memory to console as encoded text create.ipl assembles machine-coded words csboot.ipl boots a CS80 disk cylons.ipl switch lights that move back and forth debug.ipl allows single-stepping IPL code with stack dump functions dhelp.ipl help screen for disk operations disk.ipl device-independent interface to the actual disk driver dmenu.ipl a disk menu that can run binaries and save basic programs dm2.ipl a disk menu for MSU BASIC (req's altutils/fcam/sham/msupatch) dms.ipl Dynamic Mapping System for accessing more than 32KW double.ipl 32-bit integer math words ecal.ipl electronics calculator (req's FP) edit.ipl really wacky text file line editor (req's disk/xdos/sfs) extra.ipl common words for 16KW/32KW builds fcam.ipl utilities for saving binaries as ABS (req's altutil) fed.ipl full-screen "array" text editor with disk load/save words fedutil.ipl utilities for converting regular text to and from array format fixfst.ipl decodes (some) untarred files from FST (Interex) archives float.ipl core floating point words floatext.ipl FP conversions and extra functions games.ipl old "test" programs hp2645.ipl words for the HP2645 terminal hpib.ipl HPIB driver hpscreen.ipl newer version of screen.ipl that does HP terms too ide.ipl driver for Bob's IDE disk interface internal.ipl for altering words included in the kernel ldenc.ipl loads encoded binary text dumps from MS input (PTR) life.ipl Conway's Game of Life with cell editor and random mode log2abs.ipl converts encoded binary text dumps into ABS files magtape.ipl 7970 magtape driver maze.ipl a maze game mkbcs.ipl outputs a simh script for making multi-module BCS projects mkcldr.ipl converts high mem machine code into CREATE code mkhpasm.ipl converts IPL code into assembly to insert into kernel source mkldr.ipl converts high mem machine code into IPL code mkword.ipl mechanism for defining multiword "programs" into one word msupatch.ipl utility for patching 31KW MSU BASIC binaries mt2f.ipl a little utility that copies magtape files to disk files mtbackup.ipl copies PTR to magtape files, magtape files to PTP mtextra.ipl a simple magtape operating system n_rocks.ipl demo program for the XY display nolf.ipl makes HP-IPL/OS ignore LF's (like when playing with BCS stuff) oct14.ipl Octapus-E for 8KW build oct34.ipl Octapus-E for 16KW build oct70.ipl Octapus-E for 32KW build print.ipl printer driver, can copy typed and printed text to a printer screen.ipl VT100/ANSI screen commands sfs.ipl provides serial/random access to buffered SFS files sfslib.ipl permits storing multiple IPL files in a single file (req's SFS) sfsutils.ipl file copy/move and other extras for SFS sham.ipl a utility for dumping/restoring alt.mem. in octal and text siobcs.ipl words for running SIO/BCS tools from disk files (req's XDOS/SFS) sioutil.ipl permits repatching of prepared 16K SIO driver smallconfig.ipl a basic config that just does TTY PTR PTP TBG and 790x slots smallcre.ipl a smaller machine-coded word creator tbg.ipl Time Base Generator driver ttyscan.ipl crude keystroke detection version.ipl allows changing version string displayed on startup xdos.ipl "example" disk operating system (SFS format) xutils.ipl import/export/recovery/SFS formatter for XDOS Usage notes =========== Satisfying dependencies is a bit tricky but for most IPL's the other IPL's it requires are listed in the comments, or obvious by function. Requirements must be loaded first so the words being referenced will be present when the new words are defined. Almost everything requires the words in extra.ipl, generally loaded immediately after the kernel. The SYSALL word used to save an ABS file of the system is part of the Octapus package (to save it along with the rest of the system). All of the provided builds have this, but if not loaded use ABSOUT and PTZERO from the extra.ipl package to craft a custom SYSGEN word (with a bit of editing an Octapus-free HP-IPL/OS system could have up to 3KW more memory but it's such a handy utility I can't imagine doing without it). Low-level machine-coded words require create.ipl and generally must not cross a 1KW boundary (42000 44000 etc), direct accesses outside of zero page or the current memory page will cause CREATE to generate a "page error". If this happens FORGET the first word or variable defined by the package to remove the partially loaded IPL then load something else that's needed to push EOD past the page boundary before loading the package containing CREATE words. Using WORDS and take note of EOD and examining IPL packages to estimate the amount of CREATE code can predict if something will load properly but more often then not I simply try it, if it doesn't work I try a different load order. If nothing desirable can be found to pad the dictionary enough to enable the load and already close to a page boundary make a do-nothing pad variable.. for example if EOD is at 43740 then enter VARIABLE _PAD 34 (or so.. needed space minus 4) to consume enough dictionary space to permit the load. Most (but not all) IPL's put CREATE code at the beginning to make this fairly easy to calculate. Fed.ipl has extra immediate-mode code to cross page boundaries automatically. Config.ipl needs to be loaded after baci.ipl to configure a baci console. Many things including [hp]screen.ipl require double.ipl, not necessarily listed in comments as it's almost always present. Life.ipl requires mkword.ipl and [hp]screen.ipl. If ttyscan.ipl is present generation can be stopped by a keypress, otherwise stops if a SR bit is set. ttyscan.ipl defines a goofy demo if screen words are present, to avoid load before [hp]screen.ipl (or FORGET TTYDEMO). Disk, magtape and anything else that uses alternate memory require dms.ipl. mtextra.ipl must be loaded after magtape.ipl. Disk drivers need to be loaded after the core disk.ipl common words. xdos.ipl must be loaded after disk.ipl but can be before the disk driver. sfs.ipl and/or xutils.ipl must be loaded after xdos.ipl. sfsutils.ipl and/or sfslib.ipl must be loaded after sfs.ipl. Fed.ipl can operate with just dms, [hp]screen and its dependents but if XDOS is loaded disk load and save words are defined. Fedutil.ipl requires fed.ipl, if SFS is present defines LDTXT for loading regular text files. Many binary-related utilities require altutil.ipl and sometimes fcam.ipl. The "fancy" dm2.ipl version of the disk menu requires these plus sham.ipl and optionally msupatch.ipl so it can use those utilities (plus double, dms, disk, xdos and other stuff needed to make a disk system to begin with). Some IPL's detect whether other words are loaded to self-configure and avoid defining duplicate words, a similar mechanism permits executing words that might or might not appear later in the dictionary.. essentially "WORDNAME" $DEFADR DUP IFZ DROP ELSE EXECUTE ENDIF will run the word only if it exists. Writing lots of code this way is not practical but it's handy for running optional utilities and creating "run and forget" applications where the first word in the IPL has to be the one that runs the app so that only one string (the name of the thing) has to be specified to both run the app then remove it afterwards. Several IPL apps are structured like this using $DEFADR or making many words appear as one, including maze.ipl, life.ipl, ecal.ipl, fed.ipl and 1dca.ipl. Others wrap up many words into one to keep the WORDS display from getting out of control, in particular the CREATE assembler which (presently) contains 10 variables and 26 word definitions all in what appears to be a single word. More IPL files ============== These are IPL programs that don't have their own files in the archive. ---------------------------------------------------------------------------- One of my most often-used PC utilities is actually a simple HP-IPL/OS program that reads bytes from PTR and dumps them to the screen, wrapped in scripts so I can right-click a text file and make sure all the lines are in CRLF format after editing them under Linux (and running unix2dos but sometimes I forget). CRLF files are needed by HP-IPL/OS and most old-comp systems, and also for proper display in Notepad. Wine comes with a version of notepad but it "helpfully" properly displays LF-only line ends so is of no use for checking files. I could have wrote a QBasic program to run under DosEmu, but was easier to just do... DEFINE !READPTR DO MSBIN PCHR #0 UNTIL END ...in a 16KW build, SYSALL to readptr.abs, run using these wrappers... ----- begin readptr.sim ------------------------ echo ------- HP-IPL/OS TEXT VIEWER ------- set clk dev=10 set tty dev=11 set ptr dev=12 set ptp dev=13 set tty1 7b ;something else needs to append ;load /simpath/readptr.abs ;attach -e ptr /filepath/filename ;run 2 ----- end readptr.sim -------------------------- ----- begin readptr ---------------------------- #!/bin/bash # adjust /path/ to reflect where readptr files are scr_name=/path/readptr.sim tmp_name=/path/readptr.tmp abs_name=/path/readptr.abs cat $scr_name > $tmp_name echo load $abs_name >> $tmp_name echo attach -e ptr $1 >> $tmp_name echo run 2 >> $tmp_name konsole -e hp2100 $tmp_name # xterm -e hp2100 $tmp_name # gnome-terminal --window-with-profile="Reversed" -x hp2100 $tmp_name rm $tmp_name ----- end readptr ------------------------------ Text/IPL/asm/etc files are associated to readptr. Similar techniques can be used to derive and attach output files, see fixfst.ipl. Not that HP-IPL/OS will replace traditional programming languages, but many simple (but often extremely useful) file stream conversions can be done easier in IPL code than in QBasic (which requires blocking subs to read/write bytes) or C (which requires knowing) etc. A Windows batch version of the readptr bash script would go something like this... (not tested but should be close) ----- begin readptr.bat ------------------------ @echo off :: adjust C:\path\ to reflect where readptr files are set scr_name=C:\path\readptr.sim set tmp_name=C:\path\readptr.tmp set abs_name=C:\path\readptr.abs type %scr_name% > %tmp_name% echo load %abs_name% >> %tmp_name% echo attach -e ptr %1 >> %tmp_name% echo run 2 >> %tmp_name% hp2100.exe %tmp_name% del %tmp_name% > nul ----- end readptr.bat -------------------------- ---------------------------------------------------------------------------- Here's a not-so-trivial converter, still needs developing but useful for playing with RTE-6/VM... converts a TAR or FST file attached to PTR to a magtape file attached to MSC, which RTE's TF or FST utility can read. The individual files in a TAR file must be in Unix-format with LF-only line ends or the CR's end up in the line records causing problems, especially with the MACRO assembler. The number of decimal bytes to transfer has to be specified in a string, this can be determined from a PC dir or ls -la listing. ;MS2MTF.IPL [7/26/08] ;COPIES MS INPUT TO RAW MAGTAPE FILE ;USAGE: "DECBYTES" MS2MTF ;WHERE DECBYTES IS #BYTES DECIMAL, MUST BE QUOTED ;BLOCK SIZE IS 10240 BYTES EXCEPT FOR LAST RECORD OCTAL DEFINE MS2MTF $DVAL ;CONVERT STRING TO 32 BIT VALUE, HIGH LOW [TOS] OVER OVER 24000 EDIV ;/10240, PUSH #COMPLETE, SIZE OF LAST MTINIT MTWAIT RWLP MTWAIT ;READY TAPE DRIVE MTSTATUS 22 AND IFNZ ;IF TAPE ERROR "TAPE ERROR" $PRINT DROP DROP ;NOTHING TO DO ELSE ;NO INIT ERROR UDMA ;DIRECT DMA OPS FROM ALT MEM SWAP ;MAKE STACK #LAST, #COMPLETE DO ;LOOP TO WRITE COMPLETE RECORDS "." $PRINT ;write progress dot DUP IFNZ ;IF RECORDS TO WRITE 350 DUP GET 10000 MSUSER PUT ;REDIRECT MS OUT TO ALT MEM (10000) #1 24000 +DO MSBIN MSBOUT +LOOP ;COPY 10240 BYTES TO ALT MEM 10000 12000 MTWRITE MTWAIT ;WRITE TO MAGTAPE GAP MTWAIT ;WRITE INTERRECORD GAP ENDIF DEC DUP ;DECREMENT COMPLETE RECORD COUNT, DUP FOR WHILE WHILE ;MORE RECORDS TO DO DROP ;COMPLETE RECORD COUNT, #BYTES IN LAST RECORD ON STACK DUP IFNZ ;if not zero "." $PRINT 350 DUP GET 10000 MSUSER PUT ;REDIRECT MS OUT TO ALT MEM #1 OVER +DO MSBIN MSBOUT +LOOP 40 MSBOUT ;COPY TO ALT MEM ;EXTRA SPACE TO PAD TO MAKE SURE EVEN #BYTES INC 2 DIV ;CONVERT #BYTES TO #WORDS 10000 ADD ;TO OFFSET 10000 SWAP MTWRITE MTWAIT ;WRITE TO MAGTAPE ENDIF GAPMARK MTWAIT GAPMARK MTWAIT ;TERMINATE MAGTAPE FILE SDMA ;BACK TO NORMAL SYSTEM DMA CRLF MTSTATUS 22 AND IFNZ ;IF ERROR "MT WRITE ERROR" $PRINT ELSE "DONE" $PRINT ENDIF ENDIF DROP DROP ;DROP ORIGINAL 32 BIT SIZE MSPAPER ;undirect MS END CONSOLE As written it's probably more complex than it needs to be (TAR files are always multiples of 10240 bytes so the part that writes the remaining bytes shouldn't be needed and as far as TF is concerned would probably result in an error if a record was a different size). To turn this into a PC app would require using bash to determine the file size, convert it to 2 octal values and write simh script lines to deposit them in memory where the converter can find it, and derive/attach the ptr and msc files so it can launch a magtape build containing this word, named with ! to autostart. Probably not worth the effort unless I find myself using it a lot. ---------------------------------------------------------------------------- The following SAVE word was designed for saving MSU BASIC binaries to disk after entering a program, although can be used to save any system binary. Illustrates how to use XDOS to determine if a file exists, then prompt to delete it first it if it does. ; SAVE - saves a binary in alt mem to disk 3/9/08 ; Uses loc 150 for temp OCTAL DEFINE SAVE 2 150 #1 A>CCOPY ;copy loc 2 in alt to loc 150 150 GET 124003 SUB IFZ ;make sure it's a binary! "File to save: " $PRINT $IN $TRIM $LEN IFZ $DROP ELSE $DUP GetFile IFNZ ;if file exists DROP DROP ;drop disk location "File exists. " $PRINT $DUP XDEL CRLF ;prompt to delete file ENDIF $DUP GetFile IFNZ ;if file still exists DROP DROP $DROP ;clean up stack, don't save ELSE 174000 AM2F ENDIF ENDIF ENDIF END CONSOLE ---------------------------------------------------------------------------- Most HP-IPL/OS disk builds include the MS2F utility for importing files from MS input (default PTR) to a disk file. It works fine however it was designed to transfer binary or text data, PTR and other MS streams have no concept of EOF (they just return 0's or lock up the machine at EOF) thus MS2F requires specifying the exact byte size of the file. Binary ABS files (the most common form of binary data) are structured so they do not require knowing the size making the ABS2F utility easier to use. To afford the same convenience for text-only data (IPL files docs etc) an importer utility could simply stop when the first 0 is received. Maybe... by default the simulator returns a few 0's after EOF. Real hardware may vary in behavior.. ideally the input to PTR should include trailing zeroes. With the following SFS-based TX2F word, if it locks at EOF (if the lights stop blinking but the prompt doesn't reappear in a few seconds) then halt the machine, run from location 2 to restart HP-IPL/OS then enter 0 CLOSE 0 RELEASE to save the file and release the buffer. DEFINE TX2F ; copies text from MS input to a file, req's SFS 8/17/08 ; usage: "FILE" TX2F $VOL #0 DRV GET DIRECTORY ;open directory in current vol/drive FSS GET IFNZ $DROP ELSE ;if error drop filename string else $DUP #0 CNF FSS GET IFNZ $DROP ELSE ;create file, if no error #0 OPEN #0 >FILE ;open the new file, redirect MS out to file DO ;skip leading 0's... MSBIN DUP IFNZ MSBOUT #1 ENDIF ;write 1st non-zero byte to file UNTIL ;loop until non-zero data received DO ;copy rest of the file until 0 received MSBIN DUP IFNZ MSBOUT #1 ENDIF ;write remaining non-zero bytes WHILE ;loop while non-zero data received #0 CLOSE ;close and save the file ENDIF #0 RELEASE ;release buffer ENDIF MSPAPER ;undirect MS back to default PTR/PTP END CONSOLE Here's another SFS-based text file importer, CP2F permits pasting text into the console using HyperTerminal or another terminal emulator which supports setting character and line delays to prevent overrunning the console interface. Plain IPL code can already be directly pasted, but code containing CREATE words usually cannot due to the variable delays as the assembler calculates label addresses. DEFINE CP2F ; copy/paste into a file, req's SFS 8/17/08 ; usage: "FILE" CP2F ; ...then paste text into the terminal. ; when done enter ~TERMINATE~ on its own line. $VOL #0 DRV GET DIRECTORY ;get directory of current vol/drive FSS GET IFNZ $DROP ELSE ;if no error $DUP #0 CNF FSS GET IFNZ $DROP ELSE ;create new file, if no error #0 OPEN #0 >FILE DO ;open file, redirect MS to it, begin loop MS$IN "~TERMINATE~" $EQUAL ;get line, push a 1 if at end else push 0 DUP IFZ MS$OUT MSCRLF ELSE $DROP ENDIF ;if not end, write line to file UNTIL #0 CLOSE ;close and save file ENDIF #0 RELEASE ;release buffer ENDIF MSPAPER ;put MS back to default PTR/PTP END CONSOLE ---------------------------------------------------------------------------- Last updated 9/1/08