Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #41795 > unrolled thread

Abersoft Forth disassembled

Started byMarcos Cruz <null_email_so_use_my_contact_page@programandala.net>
First post2015-09-06 17:30 +0000
Last post2015-09-19 19:09 +0000
Articles 10 — 7 participants

Back to article view | Back to comp.lang.forth


Contents

  Abersoft Forth disassembled Marcos Cruz <null_email_so_use_my_contact_page@programandala.net> - 2015-09-06 17:30 +0000
    Re: Abersoft Forth disassembled Coos Haak <chforth@hccnet.nl> - 2015-09-07 00:21 +0200
      Re: Abersoft Forth disassembled Marcos Cruz <null_email_so_use_my_contact_page@programandala.net> - 2015-09-07 00:20 +0000
    Re: Abersoft Forth disassembled Hans Bezemer <the.beez.speaks@gmail.com> - 2015-09-07 17:54 +0200
      Re: Abersoft Forth disassembled Marcos Cruz <null_email_so_use_my_contact_page@programandala.net> - 2015-09-07 20:58 +0000
    Re: Abersoft Forth disassembled Alexander Skobelev <al.skobelev@gmail.com> - 2015-09-09 15:11 +0300
      Re: Abersoft Forth disassembled Mark Wills <markwills1970@gmail.com> - 2015-09-09 08:47 -0700
        Re: Abersoft Forth disassembled hughaguilar96@gmail.com - 2015-09-10 21:32 -0700
          Re: Abersoft Forth disassembled "Rod Pemberton" <boo@fasdfrewar.cdm> - 2015-09-11 01:30 -0400
      Re: Abersoft Forth disassembled Marcos Cruz <null_email_so_use_my_contact_page@programandala.net> - 2015-09-19 19:09 +0000

#41795 — Abersoft Forth disassembled

FromMarcos Cruz <null_email_so_use_my_contact_page@programandala.net>
Date2015-09-06 17:30 +0000
SubjectAbersoft Forth disassembled
Message-ID<msht75$ci6$1@speranza.aioe.org>
Some months ago I disassembled Abersoft Forth, a fig-Forth 1.1
implementation customized for ZX Spectrum, written by John Jones-Steele
and published by Melbourne House in 1983.

The data input files required by the Z80 disassembler (labels, branches,
zones...) were created by programs I wrote in Abersoft Forth, then
postprocessed by some programs written in Vim. Most of the complex
toolchain is automatic, done by `make` and a Makefile. The final Z80
source is tidy and ready to be assembled back. I added some notes about
bug fixes and possible optimizations. You can browse the result source
code on the webpage and download a ZIP archive with all the files of the
project:

http://programandala.net/en.program.abersoft_forth.html

Regards,

--  
Marcos Cruz
http://programandala.net

[toc] | [next] | [standalone]


#41801

FromCoos Haak <chforth@hccnet.nl>
Date2015-09-07 00:21 +0200
Message-ID<bg2dtt6inuui.py85s3y66tgw.dlg@40tude.net>
In reply to#41795
Op Sun, 6 Sep 2015 17:30:13 +0000 (UTC) schreef Marcos Cruz:

> Some months ago I disassembled Abersoft Forth, a fig-Forth 1.1
> implementation customized for ZX Spectrum, written by John Jones-Steele
> and published by Melbourne House in 1983.
> 
> The data input files required by the Z80 disassembler (labels, branches,
> zones...) were created by programs I wrote in Abersoft Forth, then
> postprocessed by some programs written in Vim. Most of the complex
> toolchain is automatic, done by `make` and a Makefile. The final Z80
> source is tidy and ready to be assembled back. I added some notes about
> bug fixes and possible optimizations. You can browse the result source
      ^^^^^ Something like : 2OVER >R >R 2DUP >R >R 2SWAP ;
> code on the webpage and download a ZIP archive with all the files of the
> project:
> 
> http://programandala.net/en.program.abersoft_forth.html
> 
> Regards,
> 
> --  
> Marcos Cruz
> http://programandala.net

I used that in 1985 as base for my own (Meta)Forth, courtisy of the
Metaforth in the Dutch Vijgeblad 3,4,5. So I could dispose of Abersoft
Forth and use my own with microdrives instead of cassette tape.
Later Lennart Benschop rewrote my Forth for the 128 K Spectrum.

groet Coos

[toc] | [prev] | [next] | [standalone]


#41802

FromMarcos Cruz <null_email_so_use_my_contact_page@programandala.net>
Date2015-09-07 00:20 +0000
Message-ID<msil90$30d$1@speranza.aioe.org>
In reply to#41801
En/Je/On 2015-09-06, Coos Haak <chforth@hccnet.nl> escribió/skribis/wrote:
> Op Sun, 6 Sep 2015 17:30:13 +0000 (UTC) schreef Marcos Cruz:
>
>> Some months ago I disassembled Abersoft Forth,

> I used that in 1985 as base for my own (Meta)Forth, courtisy of the
> Metaforth in the Dutch Vijgeblad 3,4,5. So I could dispose of Abersoft
> Forth and use my own with microdrives instead of cassette tape.
> Later Lennart Benschop rewrote my Forth for the 128 K Spectrum.

RAM disk and tapes were a big limitation, indeed, and microdrives were
the only alternative at the time.

In order to write an improved remake of a program I wrote for Abersoft
Forth in 1985, I've written a library for it that makes it work on the
Spectrum 128 and with the +D disk interface, among other improvements
that make it more comfortable and powerful. I will publish it soon.

I've been in touch with Lennart Benschop since I discovered his Spectrum
Forth-83 some years ago, in order to make it more visible in the
Spectrum retro-scene, because it was totally unknown. He recently
translated the manual to English.

By the way, I sent you an email one month ago (to the address you use
here, because Lennart didn't have it, and I didn't find one on your web
or in the documenation of CH Forth), but I guess the message was
filtered out and never reached you. I wanted to inform you about two
modified versions of your Z80 assembler I have written, and ask you
details about the Forth you wrote it for and when. Do you have other
contact email?  You can find mine on the contact page of my website.

Regards,

-- 
Marcos Cruz
http://programandala.net

[toc] | [prev] | [next] | [standalone]


#41817

FromHans Bezemer <the.beez.speaks@gmail.com>
Date2015-09-07 17:54 +0200
Message-ID<55edb2f9$0$23755$e4fe514c@news.xs4all.nl>
In reply to#41795
Marcos Cruz wrote:

> Some months ago I disassembled Abersoft Forth, a fig-Forth 1.1
> implementation customized for ZX Spectrum, written by John Jones-Steele
> and published by Melbourne House in 1983.
Ever heard of "Advanced Spectrum Forth" by Don Thomasson? It also features a
disassembly - at least up to U.R.

So far I can't find any significant differences (random checks).

Hans Bezemer

[toc] | [prev] | [next] | [standalone]


#41836

FromMarcos Cruz <null_email_so_use_my_contact_page@programandala.net>
Date2015-09-07 20:58 +0000
Message-ID<msktoo$aeo$1@speranza.aioe.org>
In reply to#41817
En/Je/On 2015-09-07, Hans Bezemer <the.beez.speaks@gmail.com>
escribió/skribis/wrote:

> Marcos Cruz wrote:
>
>> Some months ago I disassembled Abersoft Forth, a fig-Forth 1.1
>> implementation customized for ZX Spectrum, written by John
>> Jones-Steele and published by Melbourne House in 1983.

> Ever heard of "Advanced Spectrum Forth" by Don Thomasson? 

Of course. It's an excellent book on Abersoft Forth.  It was very
helpful during the long process writting the programs to extract the
data needed to recreate the original Z80 source.  The book includes a
disassembly, but it uses a kind of abbreviated pseudo-code for the
low-level code, and no actual memory addresses at all except for the
fig-Forth parameter area and user variables.

The book has few errors, but one of them is especially funny: The author
shows the definition of `EXIT` with a warning, but without realizing the
word is buggy. I fixed this bug as part of a library I wrote for
Abersoft Forth:

  \ ............................................
  \ Fix the `EXIT` bug

  \ `EXIT` must do `R> DROP`, not `>R DROP`
  \
  \ Even Don Thomasson's _Advanced Spectrum Forth_ (1984) shows
  \ the wrong definition of `EXIT` (page 131)... and with the
  \ following notice: "This word needs to be used with extreme
  \ care." Indeed, because it crashes the system. The fix is
  \ easy:

' R> CFA ' EXIT !

-- 
Marcos Cruz
http://programandala.net

[toc] | [prev] | [next] | [standalone]


#41894

FromAlexander Skobelev <al.skobelev@gmail.com>
Date2015-09-09 15:11 +0300
Message-ID<m2io7j7pxo.fsf@gmail.com>
In reply to#41795
Marcos Cruz <null_email_so_use_my_contact_page@programandala.net>
writes:

> Some months ago I disassembled Abersoft Forth, a fig-Forth 1.1
> implementation customized for ZX Spectrum, written by John Jones-Steele
> and published by Melbourne House in 1983.
>
> The data input files required by the Z80 disassembler (labels, branches,
> zones...) were created by programs I wrote in Abersoft Forth, then
> postprocessed by some programs written in Vim. Most of the complex
> toolchain is automatic, done by `make` and a Makefile. The final Z80
> source is tidy and ready to be assembled back. I added some notes about
> bug fixes and possible optimizations. You can browse the result source
> code on the webpage and download a ZIP archive with all the files of the
> project:
>
> http://programandala.net/en.program.abersoft_forth.html
>
> Regards,
>
> --  
> Marcos Cruz
> http://programandala.net

The ZX Spectrums came to USSR relatively lately. I saw the first one in
1989, when I returned home from military service. Those were the clones of
the original computer made by local artisans. In Leningard (now
Saint-Petersburg) you can bought them on the local radio-market near the
Avtovo subway station. There were also a lot of software for them on the tape
cassettes and 5" disks.

When I initially found Abersort Fig-Forth on the one cassette I bought
there, I thought it was some implementation of FORTRAN. And was very
surprised after I had loaded it and didn't find anything relevant to
it. That was how I knew about Forth. :)

Then I found a pair of books about Forth: Starting Forth by Leo
Brodie and Design and Programming Personal Expert Systems by Carl
Townsend and Dennis Feucht, translated to Russian. The second one was
dedicated to the expert systems, but the authors used Forth to implement
the Lisp programming language, which they used in turn to implement
Prolog. They alos write a lot about how the Forth works internally.
I still have these two books on my bookshelf.

I modified the Abersoft fig-Forth, moved it by 256 bytes above to get
space for my LP driver so a could print and added words to work with 5"
disks. Or I moved it because of disk support. I don't rememeber. But I
was impressed that I was able to do it at all by means of Forth itself
in semi-authomatic way.

In fact those were the only more or less practical tasks I solved in
Forth: to debug my printer driver and to implement support for TR-DOS to
work with disks from Forth. But it was a lot of fun! :)






[toc] | [prev] | [next] | [standalone]


#41896

FromMark Wills <markwills1970@gmail.com>
Date2015-09-09 08:47 -0700
Message-ID<11acd7ee-735d-4006-87df-bb44665e82b7@googlegroups.com>
In reply to#41894
They used Forth to implement Lisp... Did anyone else go warm and fuzzy when they read that? :-)

[toc] | [prev] | [next] | [standalone]


#41943

Fromhughaguilar96@gmail.com
Date2015-09-10 21:32 -0700
Message-ID<e9b45088-8183-4e88-8702-12d590e568b1@googlegroups.com>
In reply to#41896
On Wednesday, September 9, 2015 at 8:47:16 AM UTC-7, Mark Wills wrote:
> They used Forth to implement Lisp... Did anyone else go warm and fuzzy when they read that? :-)

Do you know Lisp, Mark?

I know a little Lisp, but not enough to implement Lisp (in any language) --- I'm not aware of any reason why Forth couldn't be used though --- C was used in AutoLisp (derived from XLisp).

[toc] | [prev] | [next] | [standalone]


#41946

From"Rod Pemberton" <boo@fasdfrewar.cdm>
Date2015-09-11 01:30 -0400
Message-ID<op.x4r9lsgdyfako5@localhost>
In reply to#41943
On Fri, 11 Sep 2015 00:32:51 -0400, <hughaguilar96@gmail.com> wrote:

> On Wednesday, September 9, 2015 at 8:47:16 AM UTC-7, Mark Wills wrote:

>> They used Forth to implement Lisp...
>> Did anyone else go warm and fuzzy when they read that? :-)
>
> Do you know Lisp, Mark?
>
> I know a little Lisp, but not enough to implement Lisp (in any language)

If the two of you remember, I posted a list here years ago which showed
that more than a few Lisps were built up from a very small set of words,
much like some interpreted implementations of Forth.  The list included
the words used.

I.e., it's bottom of this post:
https://groups.google.com/d/msg/comp.lang.forth/KHw28PKZXUk/JrXcjrYshxAJ
Usenet msg-id <g4gqv4$qk9$1@aioe.org>

> --- I'm not aware of any reason why Forth couldn't be used though ---

...

> C was used in AutoLisp (derived from XLisp).

Imagine that ...  Clearly, it's far from the first time C has been
used to implement a language in whole or part.  Stop trolling me
Hugh.


Rod Pemberton

-- 
Just how many texting and calendar apps does humanity need?

[toc] | [prev] | [next] | [standalone]


#42089

FromMarcos Cruz <null_email_so_use_my_contact_page@programandala.net>
Date2015-09-19 19:09 +0000
Message-ID<mtkbta$b4q$1@speranza.aioe.org>
In reply to#41894
En/Je/On 2015-09-09, Alexander Skobelev <al.skobelev@gmail.com>
escribió/skribis/wrote:

> The ZX Spectrums came to USSR relatively lately. I saw the first one
> in 1989

Several clones have been built in Russia, with much improved features
and TR-DOS included (Pentagon, Scorpion...). They are still used and
several emulators support them.

> I modified the Abersoft fig-Forth, moved it by 256 bytes above to get
> space for my LP driver so a could print and added words to work with
> 5" disks. Or I moved it because of disk support. I don't rememeber.
> But I was impressed that I was able to do it at all by means of Forth
> itself in semi-authomatic way.

If I remember correctly, TR-DOS uses some memory near the system
variables. If so, the whole Forth system has to be moved up as you say.
That is not a trivial task.

That reminds me Abersoft Forth has an undocumented free space, 856
bytes, at the top of the memory, between the user defined graphics and
the RAM-disc:

| 0xFFFF (65535) |         | Top of memory
| ...            |         | User defined graphics (168 bytes)
| 0xFF58 (65368) | `UDG`   | Start of user defined graphics (168 bytes)
| ...            |         | Unused space (856 bytes)
| 0xFBFF (64511) | `HI`    | End of screens area (RAM-disc)
| ...            |         | RAM-disc (11 KiB)
| 0xD000 (53248) | `LO`    | Start of screens area (RAM-disc)
| 0xD000 (53248) | `LIMIT` | End of buffer area plus 1
| ...            |         | Disk buffers
| 0xCBE0 (52192) | `FIRST` | Start of buffer area (lowest buffer start)

856 bytes is a useful chunk of memory, because Abersoft Forth has only
18919 bytes free!  I wonder why the author didn't move everything up
from the data stack, to make that free space part of the dictionary.  I
did it with a module of a library I wrote for the system.

> to implement support for TR-DOS to work with disks from Forth.

Did you modify the system just to use the disk instead of the tape, to
read and write the internal RAM-disk?  Or did you a deeper modification
to use the real disk instead of the RAM-disk, thus removing the
RAM-disk?  I did only the first modification, for GDOS and G+DOS, also
optionally moving the RAM-disk to paged memory on the 128K model.

Regards,

-- 
Marcos Cruz
http://programandala.net

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.forth


csiph-web