Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #53199
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) |
| Date | 2016-12-08 15:58 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2016Dec8.165835@mips.complang.tuwien.ac.at> (permalink) |
| References | <332b84e4-3e3d-426c-9a27-42b25b9979a5@googlegroups.com> <c420c554-9bbc-4f33-903f-0b01cb2a8d9c@googlegroups.com> <o2941d$pth$1@dont-email.me> |
Alex <alex@rivadpm.com> writes:
>There are other ways of writing FSAVE though, and I would suggest the
>method that a number of other Forth's use. Write an FSAVE that creates
>an image file of your design; and write an EXE that can load & execute
>it. IIRC that's the mechanism gforth uses. This also has the advantage
>of possibly making it easier to support both a 32bit and 64bit Forth
>with a single image (or very similar images).
Gforth has different images for 32-bit and 64-bit, as well as
different byte orders. You can use the same image on different
architectures, as long as cell size and byte order agree; if the image
includes an assember or disassembler, you can still run it on a
different architecture, but of course the assembler and disassembler
won't be very useful.
A common image format for different cell sizes and byte orders is
possible, but not easy. The cell size is particularly troublesome:
Consider a structure with a mixture of cell-sized and char-sized
elements, with alignment padding. How do you represent field
offsets in a cell-size-parametric way?
>Regardless of which method you choose, these are still considerations
>that make the task complex. Initialisation needs to be done to make the
>newly restored environment look like the FSAVEd environment.
>. File handles do not persist
>. Dynamically allocated memory (heaps for instance) does not persist,
>and repeating allocations doesn't guarantee the same memory addresses
>. The stack and rstack may be difficult to copy & restore
These are all things that could be restored, if we wanted to.
However, Forth systems have traditionally not done so, and I have
heard few complaints about that.
>. Error recovery may not work correctly on the saved EXE.
What do you mean with that?
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2016: http://www.euroforth.org/ef16/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
how to create standalone EXE from inside forth with actual working environment (in forth or c) make.kmatze@gmail.com - 2016-12-07 02:55 -0800
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) Julian Fondren <julian.fondren@gmail.com> - 2016-12-07 03:26 -0800
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) make.kmatze@gmail.com - 2016-12-07 05:31 -0800
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) Julian Fondren <julian.fondren@gmail.com> - 2016-12-07 05:50 -0800
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) Alex <alex@rivadpm.com> - 2016-12-07 13:50 +0000
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) stephen@mpeforth.com (Stephen Pelc) - 2016-12-07 20:24 +0000
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) Alex <alex@rivadpm.com> - 2016-12-07 22:05 +0000
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) stephen@mpeforth.com (Stephen Pelc) - 2016-12-08 09:13 +0000
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) "Elizabeth D. Rather" <erather@forth.com> - 2016-12-07 14:59 -1000
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) Ron Aaron <rambamist@gmail.com> - 2016-12-08 06:50 +0200
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) JUERGEN <epldfpga@aol.com> - 2017-04-29 04:58 -0700
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2016-12-08 15:58 +0000
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) Alex <alex@rivadpm.com> - 2016-12-08 23:04 +0000
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-04-29 13:09 +0200
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) Alex <alex@rivadpm.com> - 2017-04-29 18:46 +0100
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-04-30 12:09 +0200
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) "Elizabeth D. Rather" <erather@forth.com> - 2017-04-30 09:35 -1000
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) Alex <alex@rivadpm.com> - 2017-04-30 22:23 +0100
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) "Elizabeth D. Rather" <erather@forth.com> - 2017-04-30 13:50 -1000
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) stephen@mpeforth.com - 2017-01-02 03:59 -0800
Re: how to create standalone EXE from inside forth with actual albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-01-02 15:10 +0100
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) "Elizabeth D. Rather" <erather@forth.com> - 2017-01-02 07:43 -1000
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) stephen@mpeforth.com - 2017-01-02 04:01 -0800
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2016-12-07 15:58 +0100
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) make.kmatze@gmail.com - 2016-12-08 01:32 -0800
Re: how to create standalone EXE from inside forth with actual working environment (in forth or c) make.kmatze@gmail.com - 2017-01-02 03:39 -0800
csiph-web