• Please review our updated Terms and Rules here

20 MHz, 2 channel O-scope

Wow Hugo, that is quite a bit of knowledge there! I've seen a friend you has an old school analog detect quick pulses on it, but it sure didn't keep them there long enough to do much with them. My Compaq Portable has a really persistent phosphor that shows interesting artifacts when it scrolls, so I could see that slowness being handy on an analog scope for sure.
 
I vaguely remember you mentioned something about using
"Forth" language (or I may be imagining things 😵‍💫 ) for some of
your troubleshooting. Would you please elaborate on that?

ziloo
I use Forth for all of my hobby stuff. I'm more productive in that language than in other languages. It comes in various implementations. The most common was the FIG implementations that were indirect threaded. Most high performance Forths are inline/call threaded. Most people don't like it because it uses a stack for parameter passing and the programmer has to maintain it or it will crash. Unlike most languages Forth is more like a tool box. It does only a few special things for you. But then, you have full control over the interpreter/compiler. Most other languages, you don't think to much about the difference between run time and compile time. To expand it efficiently you may have to think about such things. If it doesn't have something you want and you can define what you want, you are not blocked from adding it at the lowest level, if you like. Not everyone uses it this way. Most never get beyond just using it as a programming language. That is too bad, it was made to be expanded to be the application. It is hard to explain how one expands it to be the application.
It is like when I write an assembler, I don't exactly write a separate assembler, I expand Forth to be the particular assembler I need. I often write single pass assemblers that self patch the addresses as it goes along. When one needs a forward location, one just defines a forward reference. It is designed to keep a linked list of where is is used. When it finally reaches the location of its address, it patches itself by backing through the linked list. From there on the address just acts like a constant value. No second pass is needed. For assembler target that can have address phase errors, it is no different than other assemblers, except it is up to you to tell the assembler how you want that address handle as either a local reference or a long addresses.
I find that I compile the extension at the time needed. The Forth base compiler is quite fast and things like compiling the assembler and the code to be assembled is done at the same time. There is little reason to keep a compiled version of the assembler. If I need to add a feature to the assembler it is still just all source. I recompile it and the final assembled code at the same time. There still is not enough time to get a cup of coffee ( I'm not a coffee drinker anyway ). You hit the return and before you can get up to do anything the prompt is reminding you that it is ready for the next thing to do.
Also, for simulators, I do the same. I find there is always some feature I need to add to a simulator for each project. The simulator is never really separate, it is Forth expanded to be the simulator and then expanded to be the simulation. It is hard to make the distinction of where one ends and the other begins. An example would be like a 4004 project I recently completed. I needed to add a ASR33 simulation. Was it part of the simulator or part of the 4004 simulation? It was both and an extension of Forth. I used the Forth keyboard and display functions to be the ASR33 keyboard and printout. The file I/O was the tape reader and punch. It was Forth that filled in for the needed parts. Since the particular 4004 code that I was simulating was bit banging the serial TTY, it was part of the 4004 simulation as it need to know how fast a baud signal was in 4004 execution cycles but was still just an extension for Forth.You just don't use other languages like that.
Sorry for the winded text but you asked for it.
Dwight
 
F
I use Forth for all of my hobby stuff........
Thank you Dwight so much for an incomprehensible explanation of
the subject matter (this is me now =>🥴). I had no idea you can
write in Mandarin Chinese!!!!

> it is Forth expanded to be the simulator and then expanded to be the simulation..

For those who are interested in further inquiries about Forth language,
there is a reference right here:

https://forum.vcfed.org/index.php?t...icle-kilobaud-micro-mag.1225613/#post-1225681

Dwight.... I am not done with you yet 😖. I am gonna read some more,
and ask more questions later 😉. Thanks again 👍

ziloo 😊
 
Last edited:
I do the same as Dwight for writing both assemblers and compilers - why use two passes when one (and a patch-up) will suffice? Ok, you can get potentially more optimised code for a multi-pass assembler and compiler...

I generally don't use Forth though. I do see the attraction of Forth (it is much closer to the native platform) but I use more modern languages that have in-built 'self-compilation' facilities.

I wrote a CORAL-66 compiler many years ago. However, when people compiled and ran their program, they didn't realise that under the hood it was a simple virtual machine that loaded, compiled and ran the CORAL compiler source itself before the compiler loaded, compiled and ran their user program...

I expanded this one day, to load, compile and run the CORAL compiler that loaded, compiled and ran our internal 4th generation language (CUTLASS), that loaded and compiled the user program (finally).

If you get it right, the speed of modern computers (when performing such tasks) make up for the slowness of the machines you are replacing. In fact, the users were impressed at how quick the results were! Don't tell them the truth!

Dave
 
I do the same as Dwight for writing both assemblers and compilers....

My curiosity was more towards using "Forth" for diagnosing-troubleshooting
applications! And I think Dwight mentioned that,

......An example would be like a 4004 project I recently completed. I needed to add a ASR33 simulation. Was it part of the simulator or part of the 4004 simulation? It was both and an extension of Forth. I used the Forth keyboard and display functions to be the ASR33 keyboard and printout. The file I/O was the tape reader and punch. It was Forth that filled in for the needed parts. Since the particular 4004 code that I was simulating was bit banging the serial TTY, it was part of the 4004 simulation as it need to know how fast a baud signal was in 4004 execution cycles but was still just an extension for Forth....
Although I still don't quite understand why the native machine language
can't do the same thing that Forth is doing!? I must do more readings..

Thank you Dave

ziloo 😊
 
Back
Top