(71B) FORTH questions
|
05-29-2023, 04:13 PM
(This post was last modified: 05-29-2023 04:14 PM by floppy.)
Post: #1
|
|||
|
|||
(71B) FORTH questions
Hello,
I have transfered a FORTH file into a virtual drive. Code: cat PERE12.SRC | textlif PERE12 | lifput /media/user/ILPERSTO/HDRIVE16.DAT So far understood, the commands for retrieving a file must be given in relation with the BASICX command. I have tested this with " ASSIGN IO ' :TV,:T1,:MS,:T2'" BASICX .. which seems to have lost any relation with the setup since VIDEO80 is nomore showing anything. Any advice how to retrieve a file in a virtual drive from such FORTH setup (see screen copy) is welcome.. and how to start the program. HP71B 4TH/ASM/Multimod, HP41CV/X/Y & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X |
|||
05-29-2023, 04:52 PM
Post: #2
|
|||
|
|||
RE: (71B) FORTH questions
If you have text file PERE12 on a LIF volume HDRIVE16.DAT mounted as :TAPE(1) you can do this:
COPY PERE12:TAPE(1) TO :MAIN FORTH LOADF " PERE12" (note the space following the initial double quote) This will load the text file into 71B Forth. As Sylvain noted, while most Forth systems load successive "screens" via the LOAD command, on 71B Forth, the LOADF (meaning LOAD from File) is used to read from a text file. If you get no errors, then the words have been successfully loaded into the current dictionary, and are now available to use interactively, or to build into programs. Note that if you get an error while processing the 6th Forth word and it aborts, the initial 5 words have still been added to your dictionary and likely should be removed before you try again, after correcting the problem in the failed word. One way to make that easier is to start your file with a 'placeholder' word such as : PLACE ; and then after it fails you can simply use FORGET PLACE to remove all the words starting from PLACE to the end of the dictionary. --Bob Prosperi |
|||
05-29-2023, 07:58 PM
(This post was last modified: 05-29-2023 08:03 PM by floppy.)
Post: #3
|
|||
|
|||
RE: (71B) FORTH questions
Thanks. I made few progress.
Under FORTH prompt (for recovery of the lost display) " RESET HPIL" BASICX " CONTROL ON" BASICX " RESTORE IO" BASICX “ DISPLAY IS : DISPLAY” BASICX “ PRINTER IS : PRINTER” BASICX “ CAT :HDRIVE1” BASICX .. NAME S TYPE LEN DATE TIME .. PERE12 TEXT 768 05/29/23 17:16 (see attached code) "COPY PERE12:HDRIVE1 TO MAIN:" BASICX .. ERR: Invalid Filespec BYE (it goes back to BASIC prompt) > COPY PERE12:HDRIVE1 (which is linked to HDRIVE16.DAT) FORTH (it goes to the FORTH prompt) LOADF " PERE12” .. ERR: Invalid Filespec (now I have to search what is going on here) So far achieved: - listing of HDRIVE1 content (file HDRIVE16.DAT) - uploading TXT file into the HP71B Code: 3.1415926535897932e FCONSTANT PINB HP71B 4TH/ASM/Multimod, HP41CV/X/Y & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X |
|||
05-30-2023, 12:29 AM
(This post was last modified: 05-30-2023 12:35 AM by rprosperi.)
Post: #4
|
|||
|
|||
RE: (71B) FORTH questions
A file specifier for 71B is of the form NAME:DEVICE, where NAME is the normal filename and DEVICE is either :MAIN, :PORT(n), or :HP-IL_Device (such as HDRIVE1). There are other possibilities, but these are the core choices. Note you user "MAIN:" which is not legal.
The 71B is NOT Linux- or PC-like at all when it comes to files and storage devices. This command is not complete: > COPY PERE12:HDRIVE1 (which is linked to HDRIVE16.DAT) you need to specify where to copy TO. These are options: COPY PERE12:HDRIVE1 TO :MAIN (will retain original name) COPY PERE12:HDRIVE1 TO SOME_NAME:MAIN (will copy to file with new name) *** After you copy the file, CAT it to make sure it is present and of type "TEXT" *** --Bob Prosperi |
|||
05-30-2023, 02:07 PM
Post: #5
|
|||
|
|||
RE: (71B) FORTH questions
>DESTROY ALL
>COPY PERE12:HDRIVE1 TO :MAIN HPIL ERR: File Exists >CAT ALL NAME S TYPE LEN DATE TIME PORT FORTHRAM FORTH 2927 05/01/23 21:23 >COPY PERE12:HDRIVE1 TO PEREL:MAIN >CAT ALL NAME S TYPE LEN DATE TIME PORT FORTHRAM FORTH 2927 05/01/23 21:23 .. weird.. something is uploaded, then cannot be uploaded again.. and CAT ALL dont see anything. Looks like I am stuck with basic commands on EMU71. HP71B 4TH/ASM/Multimod, HP41CV/X/Y & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X |
|||
05-30-2023, 03:05 PM
Post: #6
|
|||
|
|||
RE: (71B) FORTH questions
(05-30-2023 02:07 PM)floppy Wrote: .. weird.. something is uploaded, then cannot be uploaded again.. and CAT ALL dont see anything. I don't know about the FORTH environment but in the BASIC environment CAT ALL initially only shows the data for the first file in the file chain, and you must press the [CURSOR DOWN] key repeatedly to see additional files, or [CURSOR UP] thereafter to redisplay the data for the previous file(s). Have you tried using those cursor keys after excuting CAT ALL in the FORTH environment ? It might work ... V. All My Articles & other Materials here: Valentin Albillo's HP Collection |
|||
05-30-2023, 04:05 PM
(This post was last modified: 05-30-2023 04:14 PM by floppy.)
Post: #7
|
|||
|
|||
RE: (71B) FORTH questions
(05-30-2023 03:05 PM)Valentin Albillo Wrote:You are the boss. The files are there. See screen copy in the attachment.(05-30-2023 02:07 PM)floppy Wrote: .. weird.. something is uploaded, then cannot be uploaded again.. and CAT ALL dont see anything. By using PLIST as recommended there https://www.hpmuseum.org/cgi-sys/cgiwrap...ead=248404 , we have > PLIST PERE12 (into ILPER) Code: 3.1415926535897932e FCONSTANT PINBFVARIABLE BFVARIABLE AFVARIABLE TV1.0e FVARIABLE RDECIMAL: PERE12 B STO ." Param B: " F. CR X=0? IF F+ 4.0e F*." ELLIPSE PERIM= " F. EXIT THEN X<>Y ." Param A: " F. CR ASTO X=0? IF F+ 4.0e F* ." ELLIPSE PERIM= " F. EXIT THEN FENTERF* X<>Y FENTER F* F+ TV STO FDROP 1.0e R F! FDROP BEGIN A RCLFENTER B RCL FENTER RDN F* SQRT B STO RDN F- CHS R RCL 2.0e F*R STO FDROP LASTX F/ A RCL X<>Y F- A STO FDROP B RCL X<>Y LASTXX^2 R RCL F* TV RCL F- CHS TV STO FDROP X=Y? UNTIL 1/X TV RCL F*PINB F* ." ELLIPSE PERIM= " F. CR ;: TEST 3.0e 11.0e PERE12 ; The format looks a bit screwed up. Now it has to be reformatted/uploaded into FORTH. More to be done.. HP71B 4TH/ASM/Multimod, HP41CV/X/Y & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X |
|||
05-30-2023, 04:39 PM
(This post was last modified: 05-30-2023 04:40 PM by floppy.)
Post: #8
|
|||
|
|||
RE: (71B) FORTH questions
A try to..
> DESTROY PEREL ERR:Excess Chars Looks like EMU71 got an hickup with the file (no deletion in place). HP71B 4TH/ASM/Multimod, HP41CV/X/Y & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X |
|||
05-30-2023, 07:42 PM
Post: #9
|
|||
|
|||
RE: (71B) FORTH questions
(05-30-2023 04:39 PM)floppy Wrote: A try to.. DESTROY is for removing variables PURGE is for removing files Your goal of creating some kind of IDE for using Forth on the 71B is indeed interesting and ambitious, but I'd suggest you learn how to use the 71B a bit more before diving into esoterica. Read the manuals, they're pretty good. Or, even easier, start with Joe Horn's book "HP-71 BASIC Made Easy"; here's a PDF in German: https://literature.hpcalc.org/items/1632 --Bob Prosperi |
|||
05-31-2023, 06:50 AM
(This post was last modified: 05-31-2023 11:52 AM by floppy.)
Post: #10
|
|||
|
|||
RE: (71B) FORTH questions
Thanks.
> PURGE PEREL made it. All FORTH AND HPIL AND BASIC books are on the table (PURGE was not identified so far; now thanks you it is). Now I will try to upload the TXT file into the HP71B via DOSLINK (some hints from JF could be found there https://www.hpmuseum.org/forum/thread-11585.html ) since the currently applied method (use of lifutils etc.) screwed up the TXT format in Post #3 (change from maximum 64 letters per line, to 1 line file format. Perhaps coming from a linux environment/editor). Any advice how to upload properly the PERE12 program, see Post #3, into HP71B (first EMU71) is welcome. I am trying (no success so far) a) to use linux commands like Code: unix2dos -v PERE12.SRC https://www.cyberciti.biz/faq/howto-unix...xt-format/ b) https://www.hpmuseum.org/forum/thread-78...l#pid70154 Download alifhdr32 from http://hp.giesselink.com/Pcuti/alifhdr32.zip Unzip the zip archive Execute WINE "ALIFHDR PERE12.SRC PERE12.DAT /T" on a linux PC Open ILPer and connect to the EMU71 In the DosLink "In" edit field select PERE12.DAT On the EMU71, execute "COPY :DOS" .. it hangs "HP-IL SCOPE" show continuous messages ".. SDA .." HP71B 4TH/ASM/Multimod, HP41CV/X/Y & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X |
|||
05-31-2023, 12:18 PM
Post: #11
|
|||
|
|||
RE: (71B) FORTH questions
(05-31-2023 06:50 AM)floppy Wrote: On the EMU71, execute "COPY :DOS" The command should be: COPY :DOSLINK TO FILENAME On the 71B you MUST always include the word TO and also a target. In this case, you need to specify a filename as the original is not preserved when using DOSLINK. --Bob Prosperi |
|||
05-31-2023, 12:42 PM
Post: #12
|
|||
|
|||
RE: (71B) FORTH questions
Thanks.
in BASIC prompt "[B]>" [B]>COPY :DOSLINK TO PERE12 [B]>CAT ALL (file there) [B]>PLIST PERE12 (.. then copy from ILPER window) Code: 3.1415926535897932e FCONSTANT PINBFVARIABLE BFVARIABLE AFVARIABLE TV1.0e FVARIABLE RDECIMAL: PERE12 B STO ." Param B: " F. CR X=0? IF F+ 4.0e F*." ELLIPSE PERIM= " F. EXIT THEN X<>Y ." Param A: " F. CR ASTO X=0? IF F+ 4.0e F* ." ELLIPSE PERIM= " F. EXIT THEN FENTERF* X<>Y FENTER F* F+ TV STO FDROP 1.0e R F! FDROP BEGIN A RCLFENTER B RCL FENTER RDN F* SQRT B STO RDN F- CHS R RCL 2.0e F*R STO FDROP LASTX F/ A RCL X<>Y F- A STO FDROP B RCL X<>Y LASTXX^2 R RCL F* TV RCL F- CHS TV STO FDROP X=Y? UNTIL 1/X TV RCL F*PINB F* ." ELLIPSE PERIM= " F. CR ;: TEST 3.0e 11.0e PERE12 ; in FORTH prompt "[F]\" "[F]\"LOADF " PERE12" ..ERR:Invalid Filespec looks like no success so far. HP71B 4TH/ASM/Multimod, HP41CV/X/Y & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X |
|||
05-31-2023, 01:00 PM
(This post was last modified: 05-31-2023 01:33 PM by J-F Garnier.)
Post: #13
|
|||
|
|||
RE: (71B) FORTH questions
(05-31-2023 12:42 PM)floppy Wrote: in BASIC prompt "[B]>" You created the text file on a Linux system, right? I assume that you are quite experimented in Linux. Does the LF- vs CR/LF-terminated line issue sound familiar to you? I'm suspecting this kind of thing. Apparently you succeeded to load the file correctly above: (05-29-2023 07:58 PM)floppy Wrote: So far achieved:So why doesn't it work anymore? And to save you another unsuccessful attempt, this is wrong: Quote:n FORTH prompt "[F]\"FORTH doesn't use postfix parameters. This is " filespec" LOADF . J-F |
|||
05-31-2023, 02:25 PM
Post: #14
|
|||
|
|||
RE: (71B) FORTH questions
Experienced in my linux? not really. I am an user.
"the LF- vs CR/LF-terminated line issue sound familiar to you?" no. I will search what this mean. " PERE12" LOADF .. bring the message ERR:Data Type. Lets explain: the PERE12 file in FORTH with the correct format (see the previous post where the line with of the file is maximum 64 characters; NOT the 1 line file) was done in an gforth IDE on a Linux PC with 64bits for simulating the HP71B Forth commands. Why I was doing this? I was using a wide screen, extensive debugging, commenting possible.. a bit like the CC41 from Craig BLADOW but here for an HP71B FORTH = the working file was not created in an HP71B but in a FORTH simulator for HP71B; this is the reason of my actions here where I now try to upload a (supposed working) HP71B FORTH file into EMU71 for a double check it still works there. Then next step will be I check in an HP71B with Forth module. = "debugging" my "debugging environment on PC" for HP71B Forth programming on a PC. (I know.. perhaps me and 5 other people on this planet could be interested..). HP71B 4TH/ASM/Multimod, HP41CV/X/Y & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X |
|||
05-31-2023, 04:00 PM
(This post was last modified: 05-31-2023 04:06 PM by J-F Garnier.)
Post: #15
|
|||
|
|||
RE: (71B) FORTH questions
(05-31-2023 02:25 PM)floppy Wrote: Experienced in my linux? not really. I am an user. Just ask G..gle: Quote:CRLF stands for Carriage Return Line Feed, and LF stands for Line Feed. CRLF is a two-character sequence used to indicate the end of a line of text in a file. It is represented by the characters CR (carriage return) and LF (line feed). CRLF is used in Windows-based systems, while LF is used in Unix-based systems. Quote:" PERE12" LOADF Some progress ... now your file is read :-) Just try to enter (in FORTH env.): 1.0e ERR:Data Type I don't understand (and the 71B-FORTH too, obviously) the meaning of that little 'e'. So many incompatibilities to solve... part of the fun I assume :-) J-F |
|||
05-31-2023, 07:55 PM
(This post was last modified: 05-31-2023 08:50 PM by floppy.)
Post: #16
|
|||
|
|||
RE: (71B) FORTH questions
+1. Program now loaded in the HP71B and in debugging phase which mean my debugger on the PC has to be improved because it allowed a buggy program to work on the PC but dont work on the HP71B.
.. Code: I don't understand (and the 71B-FORTH too, obviously) the meaning of that little 'e'. Update: program work. Few messages appear regarding internal parameters. Seems not to disturb much so far. See screen copy below. More to be done (testing the PC debugger with more programs, make automatic the transfer to EMU71, test on HP71B). Whatever that was my first FORTH program. The output to ILPER with [B]>COPY :DOSLINK [B]>PLIST PERE12 looks a bit weird, but whatever it works. Here below is a cleaned version of the print in ILPER with introduced <cr> and blanks in the post Code: 3.14159265359E0 FCONSTANT PINB HP71B 4TH/ASM/Multimod, HP41CV/X/Y & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X |
|||
05-31-2023, 10:26 PM
Post: #17
|
|||
|
|||
RE: (71B) FORTH questions
(05-31-2023 01:00 PM)J-F Garnier Wrote: And to save you another unsuccessful attempt, this is wrong: That's my fault; in a post above I suggested to use this in postfix format. --Bob Prosperi |
|||
06-15-2023, 07:34 PM
Post: #18
|
|||
|
|||
RE: (71B) FORTH questions
what would be a similar word to "time&date" (gforth) ?
The HP71B IDS V1 Chapter 15.6 show few informations and I suppose something can be extracted from an address. Any advice is welcome (I have the HP71B Forth/Assembler and no CLOCK word from the translator; BASIC functions? prohibited .. ;-) HP71B 4TH/ASM/Multimod, HP41CV/X/Y & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X |
|||
06-16-2023, 03:22 AM
Post: #19
|
|||
|
|||
RE: (71B) FORTH questions
(06-15-2023 07:34 PM)floppy Wrote: what would be a similar word to "time&date" (gforth) ? I'm not sure what you mean by "BASIC functions? prohibited", but you can try this: " TIME$" BASIC$ which returns a string with the current time to the stack, which you can then display with the TYPE command. --Bob Prosperi |
|||
06-16-2023, 01:53 PM
Post: #20
|
|||
|
|||
RE: (71B) FORTH questions
(06-16-2023 03:22 AM)rprosperi Wrote:And with no BASIC? I am searching the memory area where the time counter is placed.(06-15-2023 07:34 PM)floppy Wrote: what would be a similar word to "time&date" (gforth) ? HP71B 4TH/ASM/Multimod, HP41CV/X/Y & Nov64d, PILBOX, HP-IL 821.62A & 64A & 66A, Deb11 64b-PC & PI2 3 4 w/ ILPER, VIDEO80, V41 & EMU71, DM41X |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)