HP-IPL/OS IDE Disk Builds ========================= The HP-IPL/OS builds here are for running with a customized 8052-based controller connected to an IDE disk drive which supports "LBA" access. The controller is based on a "Paul" development board, Bob Shannon has been running the system since 2005, as of 11/18/07 the IDE driver actually works :) (apparently Bob's system had a patched status read that always returned "OK", took a bit of debugging to determine that the posted IDE driver code never worked... without actual plans to make the thing his was the only operational example and happily running with old code) The 8052 IDE disk controller code is in the hpdiskc2.asm file. The comments include partial details about the HP interface, more complete details are in the hpide* files. Status as of 11/30/07 - partially tested and essentially working but there's still an issue with STEx IFNZ IFZ IF<0 ENDIx ELSE UNTIx WHILx CASE = < > <= >= <> DEFAxxx ENDCxxx EXECxxx WBOOx AND OR XOR ADD SUB INC DEC NOT 2CPL DUP DROP OVER ROT SWAP GET PUT PNUM CRLF DECIxxx OCTAx BINAxx RADIx SP>S SB>S XP>S XB>S YP>S YB>S ZP>S ZB>S END EOD DEFIxx DMPS S>SR SR>S PCHR PWRD CHRIx S>X X>S S>Y Y>S S>Z Z>S MUL ASL ASR ROL ROR DIV RUN X>>Y X>>Z Y>>X Z>>X $PRIxx $SWAx $CPY $DUP $DROx $LEN $ADR $XTExx $PUT $GET $CRExxx $STR $HEAx $APPxxx $TAIx $IN $CAT $VAL <>COx >PTP MS BACx BACIxxx TTYCxx +TBG -TBG >TBG TBGZxxx >WDT +WDT -WDT !100xx T>>S TIMExxx PTIMx !WDA CBUS ?BUS >BUS BUx $ACxxx A>CCxxx USPAxx DMSTxxxx UPTR MSUSxx ABSLxxx GOUSxx GOSYxxxx ALTSxxx ?DMS VERSxxx CONFxx DADD D2CPx EMUL EDIV DSWAx $DVAx $DSTx >IDE FP FP>$ FSGN FSQR TTYPx TERMxxxx ESC POS CLS COLOx -COLxx MKWOxx ENDWxxx FILx UCOMx FSS CWA LAA RAA FPA FSA FCA FNA DNA VNA NDEA DBLA DBHA FSLA FSHA DupCxxxx SCDRx RCDRx ChkBxx ChkDxx DIRExxxxx REOPxx OPEN SEEK DirUxxxxx CLOSx CNF DEL BCOPx RELExxx ?SFS -SFS DASL DASR DLSL DLSR DROL DROR !LPT CKLPx MSLPx +PE -PE >LPT $LPT NLPT LBUF BSRCx MSASxxx RCTL RUN&xxx LIBLxxx LIBExx LFIL LIB SETLxx LFORxxx LDIR LCLOxx R L D>L A>L L>A MS>L D2F FCOPx FMOVx FDUP MS2F F2MS ABS2x VRECxxxx XRECxxxx XINIx EOD=052137 FREE=007640 Configuration... Slot 10 - time-base generator Slot 11 - console interface Slot 12 - papertape reader Slot 13 - papertape punch Slot 17 - HPIB interface Slot 20 - LPT interface Slot 22 - BACI interface Slot 23 - IDE disk interface Package list... hpiplos1.abs extra.ipl (select 32KW) 3 ALLOCATE oct70.ipl create.ipl baci.ipl tbg.ipl hpib.ipl dms.ipl version.ipl config.ipl FORGET !SDC (no SR reconfig) double.ipl disk.ipl xdos.ipl ide.ipl float.ipl floatext.ipl hpscreen.ipl TERMINAL to set to ANSI mode mkword.ipl sfs.ipl bigshift.ipl print.ipl sfslib.ipl sfsutils.ipl xutils.ipl As configured 192KW memory is required to use the library. If less memory is installed then LBUF must be set to the SFS buffer to use... For 128KW enter: LBUF 1 PUT For 160KW enter: LBUF 2 PUT Note: The FCOPY FMOVE and FDUP words require at least 160KW and cannot be run from the library unless 192KW memory is installed. If the library system and extra SFS/XDOS utilities are not needed for making other builds that don't need them, enter FORGET LBUF and confirm, this leaves 14667 octal words free (3 blocks allocated). There are many ways to use the library, and different library files can be made for different applications. The following describes how to move extra SFS/XDOS utilities and some of the library utilities into the library to free up dictionary space, but this is just one possible use of the library system. To activate and copy the XDOS utilities to the library enter... $VOL "LIBRARY.FILE" SETLIB (adjust the library name as needed) "MS2F" D>L "F2MS" D>L "ABS2F" D>L "VRECOVER" D>L "XRECOVER" D>L "XINIT" D>L To copy the SFS library and file copy utilities to the library enter... "D>L" D>L "A>L" D>L "L>A" D>L "D2F" D>L "FCOPY" D>L "FMOVE" D>L "FDUP" D>L The MS>L (MS in to library) utility requires A>L so if needed in the library a multiword segment must be created, enter... RENAME MS>L MLMAIN DEFINE MS>L "MLMAIN" $DEFADR IFZ DROP ELSE EXECUTE ENDIF END ZAM 2 MSUSER >MS EXPLAIN MS>L EXPLAIN A>L EXPLAIN MLMAIN "LIBEND" $PRINT CRLF CONSOLE A>L After everything desired has been copied to the library do LDIR to make sure it all looks OK then LCLOSE. Nothing is written to disk until LCLOSE is used, so it might be a good idea to LDIR then LCLOSE LIB while building the library to save at different stages. If an error occurs while importing code into the library, do -SFS to abandon the changes then LIB to reopen the library and try again. Note... there is no protection against overflowing the library, do frequent LDIR commands to keep up with the library size, if it gets much over 170000 start getting worried about it. "NAME" LFORGET can be used to trim the library by deleting NAME and everything after it - juggling is needed using L or L>A to load words into the dictionary or alt mem, using D>L or A>L to add back after deleting something from the middle. Be especially careful when juggling multi-word library segments. If removing just the XDOS utilities (leaving the lib/file copy utilities) enter: FORGET MS2F (Y to confirm) This leaves 11727 octal words free (3 blocks allocated). To remove the library/file copy utilities too enter: FORGET D>L This leaves 13315 octal words free (3 blocks allocated). After removing the lib utilities if D>L or other lib utilities needed then instead of a command like "WORDNAME" D>L instead enter: "WORDNAME" "D>L" R Note - the R must be at the end of the line when running utilities from the library, the load does not take place until AFTER the last command so commands after a R will execute before the run-and-forget takes place. D>L might be frequently used so if desired FORGET A>L instead. Once the dictionary is set up as desired DGEN or "BuildName" XSAVE to save the new build. Note! SFS must not be in use when saving a build, or it will start up with phantom buffers open, preventing the buffers from being used to open new files. If it happens -SFS then delete/resave the build. To access words in the library after rebooting, enter LIB to activate, LDIR for directory, "name" L to load the word if you want to keep in memory, "name" R to run the word and automatically forget it when it's done. For example, to import say chess.abs to a disk file, attach the abs to PTR by whatever means and (with LIB active) enter "CHESS" "ABS2F" R to copy to a "CHESS" file, which can be run using "CHESS" XLOAD (that example requires CRLF line ends, set in terminal emulator or press control-J to enter moves - be aware that some things in HP-IPL/OS don't like line-feeds, I use two "ProComm" profiles to switch back and forth as needed, there's also a nolf.ipl file for adding a console "manipulator" to remove line feeds from the input stream) The stock library words permit only single IPL words to be automatically saved to the library file. The system permits storing compound multi-word IPL packages and also CREATE code for machine-coded words, however to run and forget the first word in the IPL package must be the same as the name in the library file. This can be accomplished by making the first word run the main program using something like... OCTAL DEFINE PROGNAME "MAIN" $DEFADR DUP IFZ DROP ELSE EXECUTE ENDIF ENDIF ... variables, sub words, etc DEFINE MAIN ... the main program END LIBEND Other ways to make something compatible with the library's run/forget function are to define a dummy word then use direct dictionary manipulation to "wrap" it all into one word, see maze.ipl for an example of this. The MKWORD and ENDWORD words automate this. Note - in a library file the last line must be LIBEND with no leading spaces. Generally IPL's are written using CONSOLE to permit operation from papertape or a regular file on disk or magtape, for these CONSOLE must be changed to LIBEND before importing. If manually editing a library file, individual segments are marked by ;;;FILE:WORDNAME: on a line preceding the package. HP-IPL/OS IDEMT 1.65 ==================== This build is in the hposidem.abs file, dated 1/1/12. ? WORDS DO +DO INDEx +LOOx >STEx IFNZ IFZ IF<0 ENDIx ELSE UNTIx WHILx CASE = < > <= >= <> DEFAxxx ENDCxxx EXECxxx WBOOx AND OR XOR ADD SUB INC DEC NOT 2CPL DUP DROP OVER ROT SWAP GET PUT PNUM CRLF DECIxxx OCTAx BINAxx RADIx SP>S SB>S XP>S XB>S YP>S YB>S ZP>S ZB>S END EOD DEFIxx DMPS S>SR SR>S PCHR PWRD CHRIx S>X X>S S>Y Y>S S>Z Z>S MUL ASL ASR ROL ROR DIV RUN X>>Y X>>Z Y>>X Z>>X $PRIxx $SWAx $CPY $DUP $DROx $LEN $ADR $XTExx $PUT $GET $CRExxx $STR $HEAx $APPxxx $TAIx $IN $CAT $VAL <>COx >PTP MS BACx BACIxxx TTYCxx +TBG -TBG >TBG TBGZxxx >WDT +WDT -WDT !100xx T>>S TIMExxx PTIMx !WDA CBUS ?BUS >BUS BUx $ACxxx A>CCxxx USPAxx DMSTxxxx UPTR MSUSxx ABSLxxx GOUSxx GOSYxxxx ALTSxxx ?DMS VERSxxx CONFxx DADD D2CPx EMUL EDIV DSWAx $DVAx $DSTx >IDE FP FP>$ FSGN FSQR TTYPx TERMxxxx ESC POS CLS COLOx -COLxx MKWOxx ENDWxxx FILx UCOMx FSS CWA LAA RAA FPA FSA FCA FNA DNA VNA NDEA DBLA DBHA FSLA FSHA DupCxxxx SCDRx RCDRx ChkBxx ChkDxx DIRExxxxx REOPxx OPEN SEEK DirUxxxxx CLOSx CNF DEL BCOPx RELExxx ?SFS -SFS DASL DASR DLSL DLSR DROL DROR !LPT CKLPx MSLPx +PE -PE >LPT $LPT NLPT LBUF BSRCx MSASxxx RCTL RUN&xxx LIBLxxx LIBExx LFIL LIB SETLxx LFORxxx LDIR LCLOxx R L D>L A>L L>A MS>L D2F FCOPx FMOVx FDUP MTINxx MTRExx MTWRxxx GAP GAPMxxx FS1R BS1R FS1F BS1F RWLP RWOL MTSTxxxx MTBOxx MTWAxx ?MTExxxx EOF RECOxxx FILEx MTSCxx MTGEx IDREx MTDIx DLTF MTSExx MMTIx MTSAxx MTLOxx MS2Mx MT2Mx B2MT MT2B MTSHxx D2MT MS2F F2MS ABS2x VRECxxxx XRECxxxx XINIx EOD=055531 FREE=006246 Requires a HP21xx "MX" machine such as a HP2113 with at least 64KW memory to use XDOS and/or magtape, and at least 96KW to use SFS. As configured requires 192KW to use the library system. Configuration... Slot 10 - time-base generator Slot 11 - console interface Slot 12 - papertape reader Slot 13 - papertape punch Slots 14,15 - 13181/7970 magtape interface set Slot 17 - HPIB interface Slot 20 - LPT interface Slot 22 - BACI interface Slot 23 - IDE disk interface Package list... Start with hposide.abs FORGET MS2F 2 ALLOCATE magtape.ipl mtextra.ipl FORGET HELP xutils.ipl FORGET MS2F for 10335 octal free memory (2 blocks allocated). Some of the magtape words can go in the library, probably MS2MT MT2MS B2MT MT2B MTSHOW and D2MT for 11375 octal free. HP-IPL/OS MT6I 1.65 =================== This build is in the hposmt6i.abs file, dated 1/1/12. The following is after booting via PTR (not from disk)... 1)7906 2)IDE 3 HP-IPL/OS MT6I 1.65 ? WORDS DO +DO INDEx +LOOx >STEx IFNZ IFZ IF<0 ENDIx ELSE UNTIx WHILx CASE = < > <= >= <> DEFAxxx ENDCxxx EXECxxx WBOOx AND OR XOR ADD SUB INC DEC NOT 2CPL DUP DROP OVER ROT SWAP GET PUT PNUM CRLF DECIxxx OCTAx BINAxx RADIx SP>S SB>S XP>S XB>S YP>S YB>S ZP>S ZB>S END EOD DEFIxx DMPS S>SR SR>S PCHR PWRD CHRIx S>X X>S S>Y Y>S S>Z Z>S MUL ASL ASR ROL ROR DIV RUN X>>Y X>>Z Y>>X Z>>X $PRIxx $SWAx $CPY $DUP $DROx $LEN $ADR $XTExx $PUT $GET $CRExxx $STR $HEAx $APPxxx $TAIx $IN $CAT $VAL <>COx >PTP MS BACx BACIxxx TTYCxx MKWOxx ENDWxxx CFGE !DMS -DMS SDMA UDMA UJUMx SJUMx SPAGx C>ACxxx A>CCxxx USPAxx DMSTxxxx UPTR MSUSxx ABSLxxx GOUSxx GOSYxxxx ALTSxxx ?DMS CONFxx !SDC MTINxx MTRExx MTWRxxx GAP GAPMxxx FS1R BS1R FS1F BS1F RWLP RWOL MTSTxxxx MTBOxx MTWAxx ?MTExxxx EOF RECOxxx FILEx MTSCxx MTGEx IDREx MTDIx DLTF MTSExx MMTIx MTSAxx MTLOxx MS2Mx MT2Mx B2MT MT2B MTSHxx D2MT DADD D2CPx EMUL EDIV DSWAx $DVAx $DSTx FIX FLT FP+ FP- FP* FP/ DFLT DFIX PWR1x $>FP FP>$ FSGN FSQR TTYSxxx TTYGxx TTYPx TERMxxxx ESC POS CLS COLOx -COLxx >IDE SR DMENU ENDIF END altutil.ipl conalt.ipl fcam.ipl mt2f.ipl "SR 70 RUN HP-IPL/OS 6/I 1.65 ================== This build is in the hpos6i.abs file, dated 1/1/12. The following is after booting via PTR (not from disk)... 1)7906 2)IDE 3 HP-IPL/OS 6/I 1.65 ? WORDS DO +DO INDEx +LOOx >STEx IFNZ IFZ IF<0 ENDIx ELSE UNTIx WHILx CASE = < > <= >= <> DEFAxxx ENDCxxx EXECxxx WBOOx AND OR XOR ADD SUB INC DEC NOT 2CPL DUP DROP OVER ROT SWAP GET PUT PNUM CRLF DECIxxx OCTAx BINAxx RADIx SP>S SB>S XP>S XB>S YP>S YB>S ZP>S ZB>S END EOD DEFIxx DMPS S>SR SR>S PCHR PWRD CHRIx S>X X>S S>Y Y>S S>Z Z>S MUL ASL ASR ROL ROR DIV RUN X>>Y X>>Z Y>>X Z>>X $PRIxx $SWAx $CPY $DUP $DROx $LEN $ADR $XTExx $PUT $GET $CRExxx $STR $HEAx $APPxxx $TAIx $IN $CAT $VAL <>COx >PTP MS BACx BACIxxx TTYCxx MKWOxx ENDWxxx CFGE !DMS -DMS SDMA UDMA UJUMx SJUMx SPAGx C>ACxxx A>CCxxx USPAxx DMSTxxxx UPTR MSUSxx ABSLxxx GOUSxx GOSYxxxx ALTSxxx ?DMS CONFxx !SDC DADD D2CPx EMUL EDIV DSWAx $DVAx $DSTx FIX FLT FP+ FP- FP* FP/ DFLT DFIX PWR1x $>FP FP>$ FSGN FSQR TTYSxxx TTYGxx TTYPx TERMxxxx ESC POS CLS COLOx -COLxx >IDE SR DMENU ENDIF END "