INTOLIF1 - A Utility for the HP71 --------------------------------- Requirements : Four LEXfiles - FILEQLX for lines 30 and 60. FLTYPELX for lines 110 and 120. EDLEX for line 150. ENDUPLX for line 190. Whilst it is possible to transfer BASIC and TEXT files from an HP75 to an HP71 by TRANSFORMing them into LIF1 files, putting them to magnetic media, reading them into an HP75 and TRANSFORMing them back to BASIC and TEXT files it is not possible to reverse the process for HP71 TEXT files because they do not have line numbers. INTOLIF1 will insert line numbers into HP71 TEXT files, TRANSFORM (either BASIC or processed TEXT files) into LIF1 and then offer the User the option of putting the LIF1 file to tape or disc, all under Program Control. An HP75 can now read these files. To use the utility, simply RUN 'INTOLIF1' and at the prompt 'Filename ? ' enter the filename and key ENDLINE. FILEQLX provides the keyword 'FILE?'. Allthough it is not strictly necessary it does absolve the User from having to remember which LEXfiles (other than than FILEQLX which is permanently resident in my HP71) are required. FLTYPELX [PPPM/CHHU Sydney] provides the keyword 'FLTYPE$' which allows the user to determine, inside a program, whether a file is BASIC, TEXT, LEX etc. EDLEX provides the keyword FILESZR which determines the length, in lines, of a TEXT file. ENDUPLX provides the keyword 'EXECUTE' which allows non-programmable commands into a program. If you do not have either FILEQLX, FLTYPELX, ENDUPLX or EDLEX then send me a tape or disc (sorry - NO cards) and I will record it/them for you. Mark Cracknell, 6 Stratton Mews, Off South Street, Leighton Buzzard, Bedfordshire LU7 8NT [Tel No: 0525-383265] 0010 ! INTOLIF1 0020 ON ERROR GOTO 40 0030 IF FILE?("FLTYPELX") THEN 50 ELSE COPY FLTYPELX:MASSMEM @ GOTO 50 0040 OFF ERROR @ BEEP 1000 @ DISP "'FLTYPELX' not available !" @ END 0050 OFF ERROR @ ON ERROR GOTO 80 0060 IF FILE?("ENDUPLX") THEN 80 ELSE COPY ENDUPLX:MASSMEM @ GOTO 80 0070 OFF ERROR @ BEEP 1000 @ DISP "'ENDUPLX' not available !" @ END 0080 DESTROY F$,I,Q$ @ DIM Q$[96] @ STD 0090 ON ERROR GOTO 230 0100 BEEP 200 @ INPUT "Filename : ";F$ 0110 IF FLTYPE$(F$)="BASIC" THEN 190 0120 IF FLTYPE$(F$)#"TEXT" THEN DISP "Wrong filetype !" @ CALL W1 @ GOTO 100 0130 ON ERROR GOTO 140 @ CREATE TEXT FMT @ GOTO 150 0140 OFF ERROR @ PURGE FMT @ GOTO 130 0150 ASSIGN #1 TO F$ @ ASSIGN #2 TO FMT @ FOR I=1 TO FILESZR(F$) 0160 Z$="0000"&STR$(I*10) @ Z$=Z$[LEN(Z$)-3,LEN(Z$)]&" " 0170 READ #1;Q$ @ Q$=Z$&Q$ @ PRINT #2;Q$ 0180 NEXT I @ ASSIGN #1 TO * @ ASSIGN #2 TO * @ PURGE F$ @ RENAME FMT TO F$ 0190 EXECUTE "TRANSFORM F$ INTO LIF1 @ RUN INTOLIF1,CONT" 0200 'CONT': BEEP 200 @ DISP "[D]isc/[Q]uit ?" 0210 ON POS("DQ",KEYWAIT$)+1 GOTO 200,220,230 0220 BEEP 200 @ INPUT "Drive : ","1";D @ COPY F$ TO F$&":MASSMEM("&STR$(D)&")" 0230 CAT F$ @ OFF ERROR @ FIX 2 @ BEEP 800 @ PUT "#43" @ END