>(not) obfuscated
I'll have a look again now I've finished PNG decoder (horrid format - makes JPEG and GIF look like model of good design, even though they preceded PNG

We are discussing the disassembling of some SuperForth code words in the email list. So far I've seen nothing strange. In fact I'm considering extending some tools I've written, in order to disassemble the whole dictionary. It will be interesting if you share your discoveries in the list.Silvester wrote: I'll have a look again now I've finished PNG decoder (horrid format - makes JPEG and GIF look like model of good design, even though they preceded PNG)
I'm not sure what you mean but I can't look at the original source code of SuperForth until I find some way of reading the master on a 5.25" floppy disk. Looking at a meta-compiler that was a descendent of SuperForth, and which I do have the source code for, all that is done at the start is to open a window, set various addresses so that the Forth inner interpreter can be used (about 20 instructions). Then it starts executing a cold start routine that is written in Forth. This patches a few adresses, initialises user variables, sets a few execution vectors then calls QUIT to start the text interpreter.Silvester wrote:Perhaps it (SuperForth) is compacted. But from what I recall (~15yrs ago) it certainly did some odd things to its own code block before executing it.
Good thats sorted out then.Silvester wrote:Nevertheless I have, in the last few days, had another look and realise it is as you say. It is the system/USER variables, PAD and TIB that are held within job code which are overwritten. Ive done a complete disassembly back to assembly source (before I saw your message). As you say it sets up job registers in about 20 instructions and then simply launches with COLD - very neat.
Thanks for the offer, I'll take you up on that if I have no luck with my QL hardware - it's been sitting in my loft since about 1990 and will be something of a miracle if it still works.I have a QL system with 3.5/5.25 (360K/720K) disks, if you need any QL/PC disks read.
https://github.com/gerryjackson/QL-SuperForthSilvester wrote: >...source code of the meta-compiler I mentioned on GitHub.
Look forward to that.
You are right. For me Forth is as you say. When you learn how it works there's no way back anymore, you're trapped . I was lucky enough to start tinkering with Forth on my Spectrum in the 1980s, and fascination and learning never end since then, no matter the implementation, the standard or the platform.Silvester wrote: I only had a passing interest in Forth until a few years ago when I started to understand it from the ground up by looking at how others had implemented it from scratch. Very simple concept, yet potentially quite powerful and fast. A quick and productive way to get something up and working, but be able to build upon layer by layer. I can see why some used to call it the best kept secret in programming.
Hi SilvesterSilvester wrote:Hi Gerry, Welcome to the forum!
I have a QL system with 3.5/5.25 (360K/720K) disks, if you need any QL/PC disks read.
I've just seen this and those numbers would seem about right. I presume you obtained those numbers via a disassembler. If so could you send the disassembly of the machine code to me or make it available somewhere so I can compare it with the assembler source on GitHub. Apart from different register usage they ought to be very similar if not identical.Silvester wrote: -----
Edit: Additional comment, 2 Feb 2016
Within the 15712 bytes binary file which constitutes the job code area:
25% is actual 68000 source code (executable)
58% FORTH code words (nonsense as 68000)
17% internally overwritten (data and return stacks, etc)
I've already sent you the disassembly done by Silvester. It's being very useful during the development of my Sfera library for SuperForth.gerryjackson wrote: I've just seen this and those numbers would seem about right. I presume you obtained those numbers via a disassembler. If so could you send the disassembly of the machine code to me or make it available somewhere so I can compare it with the assembler source on GitHub. Apart from different register usage they ought to be very similar if not identical.