FORTH & HP: where to start?
|
04-15-2023, 08:14 PM
Post: #1
|
|||
|
|||
FORTH & HP: where to start?
Hello,
I was discussing with a family member and asked for a FORTH calculator based on Arduino since I have interest (on my 100+ project list). But it could become a longer project. So, has anybody any recommendation where to start with FORTH from scratch? (I will not wait for the project but could use an existing calculator). a) what are the FORTH similar HP calculator? b) is an HP50 with FORTH a good start? (I could see an announcement it has a FORTH module which can be implemented). I have no HP50: I should invest. b) the HP71B with FORTH would be a quick easy solution? (I have an HP71B and never tried FORTH) any recommendation where/how to start is more than welcome = advice what calculator would be the best for - editing, - storing programs on USB/virtual drive, - what debugging method should be used .. finally similar advices like here for HP41 debugging https://www.hpmuseum.org/forum/thread-19806.html 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 |
|||
04-15-2023, 08:57 PM
Post: #2
|
|||
|
|||
RE: FORTH & HP: where to start?
(04-15-2023 08:14 PM)floppy Wrote: b) the HP71B with FORTH would be a quick easy solution? (I have an HP71B and never tried FORTH) I have the 82441A Forth/Assembler module, and I started with that and Leo Brodie's book "Starting Forth" which is very dated but still very good. Actually, Forth, Inc. has it online now with the original cartoons but some material updates for ANS Forth at http://www.forth.com/starting-forth/. It was a little bit difficult to get started, because the book assumed you had something to practice on, and the HP-71 module's manual assumed you were already familiar with Forth and only needed to know its peculiarities like about the 20-bit cells and nybble-wide content of any given single address. I did eventually get going though, and enjoyed it. I think it's mostly a Forth-79, not Forth-83, and it was out a decade before ANS Forth. My later Forth work, much more voluminous and in-depth, was on another processor, on a workbench computer of my own making. The Forth in this module is a rather poor implementation of Forth. I can't believe how slow many of the Forth words are. But, being Forth, it allows you to replace words with your own definitions and speed them up. Re-writing many of them in Forth as secondaries, ie, without even using assembly and writing primitives, I was able to improve their speed by a factor of anywhere from two to fourteen! (CHR$ was the one I made 14x as fast.) Someone here asked me to round up my materials on it and post them; unfortunately I find they're in quite a disarray and I've hardly worked with it in decades, so it turned out to be too big a project. http://WilsonMinesCo.com (Lots of HP-41 links at the bottom of the links page, at http://wilsonminesco.com/links.html#hp41 ) |
|||
04-15-2023, 09:13 PM
Post: #3
|
|||
|
|||
RE: FORTH & HP: where to start?
Start with the 71B implementation of FORTH and work your way through the manual to understand its capabilities. The 71B FORTH is not so much a separate programming language, as it is more like an integrated extension of the built-in BASIC. The ROM includes a decent editor in the style of EDT/ed when writing your own programs. I personally prefer a printed, spiral-bound, lay-flat manual for ease of reading and later reference. If you want to develop in a desktop environment before transferring to the 71, look for gforth and its extensive manual. There will of course be many differences in the two vocabularies but you can write your own versions of ANS words for practice!
Remember kids, "In a democracy, you get the government you deserve." |
|||
04-15-2023, 11:16 PM
Post: #4
|
|||
|
|||
RE: FORTH & HP: where to start?
There are Arduino/microcontroller Forth like flashForth you could start with.
|
|||
04-16-2023, 03:01 PM
(This post was last modified: 04-16-2023 03:08 PM by floppy.)
Post: #5
|
|||
|
|||
RE: FORTH & HP: where to start?
(04-15-2023 11:16 PM)EugeneNine Wrote: There are Arduino/microcontroller Forth like flashForth you could start with.+1. Do you know anything package ready to use with screen and keyboard? keyboard? https://www.hackster.io/cameroncoward/64...ino-4c9531 Screen? https://funduino.de/anleitung-4x20-i%C2%B2c-lcd-modul https://www.az-delivery.de/en/blogs/azde...ft-display Suggestions are welcome. .. then I will throw the whole package to the family member and wish a completion for christmas ;-) In parallel I am starting to setup V71 for FORTH. 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 |
|||
04-16-2023, 08:47 PM
Post: #6
|
|||
|
|||
RE: FORTH & HP: where to start?
Check the list of possible hosts here
https://mecrisp.sourceforge.net/ Not quite package-ready, but a serial console starting point to add support for keyboard & display. Remember kids, "In a democracy, you get the government you deserve." |
|||
04-16-2023, 09:14 PM
(This post was last modified: 04-16-2023 09:15 PM by BobVA.)
Post: #7
|
|||
|
|||
RE: FORTH & HP: where to start?
And there's this:
SCAMP embedded Forth microcontroller board (...been on my radar but I haven't ordered one yet.) |
|||
04-16-2023, 11:02 PM
Post: #8
|
|||
|
|||
RE: FORTH & HP: where to start?
I you want a calculator, and accept non-HP calculators, you can try Forth500 for the SHARP PC-E500 (S), and Forth850 for the SHARP PC-G850 (V) (S) (VS).
They are based on the most recent standard of the language. Forth500, that I know the best, is very complete. It can use two editors, TED and the built-in BASIC editor via TLOAD, and programs can be stored on a computer via a serial link, or with a cassette interface. Jean-Charles |
|||
05-07-2023, 10:45 AM
Post: #9
|
|||
|
|||
RE: FORTH & HP: where to start?
(04-15-2023 09:13 PM)mfleming Wrote: gforth and its extensive manual+1 What environment should I use for debugging? (IDE) I have some experience with few IDEs - jupyter for python (after few works on spyder and pycharm) - eclipse for PROLOG - geany for PROLOG (since there was a plugin for syntax edition) anything from them would be welcome (using a new tool is a new headache) I am reading "Starting forth" and should next jump into coding. What would be the best method to include such example of programs into the HP71B? (see below). My impression.. - gforth & IDE use on a PC (a bit like "CC41" but now for Forth and as near to HP71B forth as possible) - developping new words for previous programm for making it running in HP71B - storing a file "prog1.txt" into the PC (64bits linux) - using a pre-processing (like HP41UC) for compiling the tested file TXT above; method still not found except putting manually all lines into the HP71B. Any hint is welcome. - if a file PROG1.DAT is created from the previous pre-processor, then upload in EMU71 w/ forth module for further testing - when tested in EMU71, then store the file into a virtual drive - retrieve the program file from the virtual drive into an HP71B hardware (pilbox and hpil in place) -.. use it Thanks for showing me any programming / debugging / transfering forth programs from a PC workstation into an HP71B (with pilbox and HP-IL) https://www.forth.com/starting-forth/12-...e-example/ Code: \ "No Weighting" from Starting Forth Chapter 12 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-07-2023, 10:46 AM
(This post was last modified: 05-07-2023 10:48 AM by floppy.)
Post: #10
|
|||
|
|||
RE: FORTH & HP: where to start?
(04-16-2023 11:02 PM)Helix Wrote: I you want a calculator, and accept non-HP calculators, you can try Forth500 for the SHARP PC-E500 (S), and Forth850 for the SHARP PC-G850 (V) (S) (VS).Thanks for the advice. I decided (for now) to stubbornly stick with the HP71B. 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-08-2023, 11:04 AM
Post: #11
|
|||
|
|||
RE: FORTH & HP: where to start?
(05-07-2023 10:45 AM)floppy Wrote:(04-15-2023 09:13 PM)mfleming Wrote: gforth and its extensive manual+1 I've never bothered with an IDE, I simply break a program up into a set of files with related words and debug each word set. A master file includes the working files in the right order. Save and reload a working dictionary as you go along is another good approach. If you're interested in documenting your work as you develop, you could try a Jupyter notebook- kernel here. Haven't tried it myself so I can't comment on its effectiveness. https://github.com/jdfreder/iforth Remember kids, "In a democracy, you get the government you deserve." |
|||
05-08-2023, 02:30 PM
Post: #12
|
|||
|
|||
RE: FORTH & HP: where to start?
(05-08-2023 11:04 AM)mfleming Wrote: 1. Save and reload a working dictionary as you go along is another good approach. To 1. How to do this with an HP71B? To 2. I tried and failed so far pip install https://github.com/jdfreder/iforth Code: Collecting https://github.com/jdfreder/iforth Code: pip install -U pip 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-08-2023, 06:04 PM
Post: #13
|
|||
|
|||
RE: FORTH & HP: where to start?
1. Transfer finished files to the 71B using a PIL-Box.
2. Never tried this. The repo is six years old, so probably not even supported by the author anymore. Do a search on "Forth IDE" and you'll find links to SwiftForth by Forth Inc, or VFX Forth for Windows by MPE (MicroProcessor Engineering Ltd). Both are freely downloadable but may time out and request a license. Note that emacs has a Forth mode for files with the '.fs' extension. Has keyword coloring support but little else. Hit F10 to access menu bar. The command M-x shell will spawn a shell you can interact with to run gforth and feed it commands. Old (ahem, 'seasoned') programmers like me would consider emacs a perfectly good IDE. Remember kids, "In a democracy, you get the government you deserve." |
|||
05-09-2023, 10:16 AM
Post: #14
|
|||
|
|||
RE: FORTH & HP: where to start?
(05-08-2023 06:04 PM)mfleming Wrote: 1. Transfer finished files to the 71B using a PIL-Box.1. HowTo? EMU71 & Forth, ILPER, Virtual drive on PC HP71B w/ FORTH with pilbox (ilpilbox, ilper..) connection to that PC (one time I just uploaded so far JF Garnier "reversi" into the HP71B) This file tt.fth Code: \ 2. emacs looks good. I keep it. 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-16-2023, 07:31 PM
Post: #15
|
|||
|
|||
RE: FORTH & HP: where to start?
Has anybody few FORTH programs, in text form in the internet, which were running/tested on HP71B ?
in the forum here I find a pi program https://www.hpmuseum.org/cgi-sys/cgiwrap...ead=148399 and I need more with especially STO and RCL (not from the translator). However, so far I understood, if any forth program in a lif file is announced, I should be able to extract it with lifutils (I never has done it; I suppose it should be easy). So, whatever, any announced program (and where to find it) is welcome. Why I am searching few programs?: in the similar idea of 41CC https://github.com/CraigBladow/cc41 I am writing a forth debugger for HP71B on a PC and need few test programs (which has a confirmed work; else I must debug the debugger on the pc and debug remotely the programs on a PC which could only be tested on an hp71b hardware by transfering them there) My action plan is a) develop a pre-processor (debugger) on PC for HP71B forth (exists; testing on-going) b) receive or develop bug free programs on an HP71B hardware (I will get them from here?) c) put that programs on a PC in order to use them as testing reference program for a new debugger 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-16-2023, 09:55 PM
Post: #16
|
|||
|
|||
RE: FORTH & HP: where to start?
Here's a 71B RAM Editor.
The original was published in a PPC Journal article back in the day (I can find a reference if needed). In the original article, a BASIC call was used for the INADDR function, but that seemed morally wrong, so I rewrote it using FORTH (though fairly ugly, inelegant and likely not efficient, but it works, and hey, it was some of the very first FORTH I ever wrote...). Code: BASE @ HEX --Bob Prosperi |
|||
05-17-2023, 12:40 AM
Post: #17
|
|||
|
|||
RE: FORTH & HP: where to start?
Check out NQueens in FORTH for the 71b here.
(05-16-2023 07:31 PM)floppy Wrote: Has anybody few FORTH programs, in text form in the internet, which were running/tested on HP71B ? Calculator Clique on YouTube |
|||
05-17-2023, 09:13 AM
Post: #18
|
|||
|
|||
RE: FORTH & HP: where to start?
(05-17-2023 12:40 AM)dmh Wrote: Check out NQueens in FORTH for the 71b here. wonderfull. a good thing in order to see if my debugger works. What does mean "HP-41 Translator ROM Module HP-82490A" ? I dont understand since I dont see any RPN code in it. Code: HP-71B / Forth / HP-41 Translator ROM Module HP-82490A 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-17-2023, 11:22 AM
(This post was last modified: 05-17-2023 11:30 AM by ThomasF.)
Post: #19
|
|||
|
|||
RE: FORTH & HP: where to start?
(05-17-2023 09:13 AM)floppy Wrote: What does mean "HP-41 Translator ROM Module HP-82490A" ? I dont understand since I dont see any RPN code in it. Hi, Don't have the module anymore, but it does also contain Forth. I.e. you could either use the Forth/Assembler module or the Forth/Translator module for Forth programming. AFAIK the two Forth implementations are basically identical apart from the assembler part in the first module and built-in words for RPN/HP41 in the other. So my guess is that the reference indicates that you could use either of the modules to run the program. EDIT: Sorry, but no, that was not fully correct. I noticed that the word "CLOCK" is used, and that is only available in the Translator module! So the stopwatch functions must be rewritten if the Assembler module is used ... Cheers, Thomas [35/45/55/65/67/97/80 21/25/29C 31E/32E/33E|C/34C/38E 41C|CV|CX 71B 10C/11C/12C/15C|CE/16C 32S|SII/42S 28C|S 48GX/49G/50G 35S 41X] |
|||
05-17-2023, 11:37 AM
Post: #20
|
|||
|
|||
RE: FORTH & HP: where to start?
(05-17-2023 11:10 AM)floppy Wrote: Can you submit this EXPECT96 word? EXPECT96 is a built-in word in the Forth-module (both Assembler and Translator module). Cheers, Thomas [35/45/55/65/67/97/80 21/25/29C 31E/32E/33E|C/34C/38E 41C|CV|CX 71B 10C/11C/12C/15C|CE/16C 32S|SII/42S 28C|S 48GX/49G/50G 35S 41X] |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 5 Guest(s)