Pages: 1
|
 |
|
Author
|
Topic: Work on 9.2 (Read 3731 times)
|
Charles Childers
Administrator
Sr. Member
    
Karma: +2/-0
Offline
Posts: 745
|
I've begun work on the 9.2 codebase (hosted only at the moment; once I have the bootstrap modules organized the way I want, I'll update the native system). For those who want to check it out, the repo is at http://retroforth.org/get/repos/902
I am making some changes to the filenamings in Rx, and also to the modules. This release will be more configurable at build time. I would recommend looking at MODULES and selecting the ones you want in modules.inc. There are some new words to play with in the std-ext and terse modules, including e: (from HelFORTH), [[ ]] (for creating internal, anonymous definitions, and some new control structures that may be handy.
I do plan to provide some words for manipulating strings and maybe others. Any ideas?
The help system will be redone in a far nicer fashion. I have added a :doc field to the dictionary which is intended to point to either a string containing documentation or the actual source of a word (possibly in Native). I may drop/change some things from 9.1; depending on input of course. (9.1 compatibility should be maintainable, with an optional compat module).
If there's anyone who wants to try a pre-built binary release, I can upload a snapshot. Otherwise using darcs to fetch the repo is the best way to keep up with development.
|
|
|
|
|
Logged
|
|
|
|
Icefall
Newbie

Karma: +0/-0
Offline
Posts: 1
|
I'd like to see invoke word which calls external stdcall functions in the Windows port. It would be useful when using COM interfaces for example.
|
|
|
|
|
Logged
|
|
|
|
Charles Childers
Administrator
Sr. Member
    
Karma: +2/-0
Offline
Posts: 745
|
I can add that. Any suggestions on other improvements to the FFI?
|
|
|
|
|
Logged
|
|
|
|
Charles Childers
Administrator
Sr. Member
    
Karma: +2/-0
Offline
Posts: 745
|
My changes have allowed me to drastically simplify the port-specific code. Each port now has three files (except netbsd, which has four at the moment), an assembly, a forth, and a dictionary file. Things are significantly more organized as a result. In addition, I pulled over the library/import macros from FreeForth for Windows, so the entire 'include' directory is now gone. This saves a lot of space in the file tree 
And now I am working on the FFI. For invoke, I am thinking of ...args.... #args xt as the stack form. Does that seem reasonable?
|
|
|
|
|
Logged
|
|
|
|
|
|
SmallSqueak
Newbie

Karma: +0/-0
Offline
Posts: 2
|
Hi Charles,
Would you please consider to add underscore to these procs in the librx*.asm files: rx_setup, rx_evaluate, rx_push, rx_pop, rx_define, rx_get_xt, rx_call_xt so that they can be linked to c programs.
Maybe librx.asm and librx_dll.asm can share a common file, say, librx_core.asm
Also, how about moving rx directory out of hosted directory and meant to be used for librx as well.
Is it possible to have 3 directories at the top level: RX, librx and RetroForth?
Would you also please consider to move the forth words out of the binary so that there is no need to build a new binary when there are changes in these forth words (currently embeded in the binary). the draw back is that librx will need file and memory words implemented in assembly (like revacore) but this would make librx more flexible and powerful.
Many thanks for bringing RetroForth to the current state.
Best regards,
SmallSqueak
|
|
|
|
|
Logged
|
|
|
|
Charles Childers
Administrator
Sr. Member
    
Karma: +2/-0
Offline
Posts: 745
|
Would you please consider to add underscore to these procs in the librx*.asm files: rx_setup, rx_evaluate, rx_push, rx_pop, rx_define, rx_get_xt, rx_call_xt so that they can be linked to c programs. Certainly. (Note: the underscore is not needed on the systems I work with the most, Linux and the *BSD's).
Maybe librx.asm and librx_dll.asm can share a common file, say, librx_core.asm Quite possible. I'll look into this for the next update.
Also, how about moving rx directory out of hosted directory and meant to be used for librx as well.
Is it possible to have 3 directories at the top level: RX, librx and RetroForth?
Hmm. I had packaged the source as I did, since RetroForth needs to be compilable on many platforms, some of which don't support symlinks. (And I didn't want to rely too heavily on directory structure outside the main project directory). Since I'm reworking the file tree in 9.2, I'll see what can be done.
Would you also please consider to move the forth words out of the binary so that there is no need to build a new binary when there are changes in these forth words (currently embeded in the binary). the draw back is that librx will need file and memory words implemented in assembly (like revacore) but this would make librx more flexible and powerful. This would require reworking parts of the Rx initialization stuff, apart from just librx. I'm not sure that I want to change this. The core words in Rx don't change that often, (a few relatively minor changes in each release). I do see some value in separating this out though. I will think on this more before making a final decision.
|
|
|
|
|
Logged
|
|
|
|
Charles Childers
Administrator
Sr. Member
    
Karma: +2/-0
Offline
Posts: 745
|
Suggestions 1, 2, and the first half of 3 are done and the results are on http://rx-core.org
|
|
|
|
|
Logged
|
|
|
|
SmallSqueak
Newbie

Karma: +0/-0
Offline
Posts: 2
|
> Suggestions 1, 2, and the first half of 3 are done and the results are on http://rx-core.org Thanks for your considerations and quick response.
BTW, I experimenttally commented out from windows.asmL
; pusha
; push dword 0 ; call [GetModuleHandle] ; mov [hinstance], eax
; push dword eax ; push dword 5 ; call [SetConsoleMode]
; push dword title_string ; call [SetConsoleTitle] ; popa
... ...
; hinstance rd 1 ; StdIn rd 1 ; StdOut rd 1 ; emit_buffer rd 1 ; written_buffer rd 1 ; tempX rd 1
... ...
; GetModuleHandle,'GetModuleHandleA',\ ; GetStdHandle, 'GetStdHandle',\ ; SetConsoleMode, 'SetConsoleMode',\ ; SetConsoleTitle, 'SetConsoleTitleA',\ ; GetLastError,'GetLastError',\
and added codes to io.forth to make up for these.
They seem to be OK.
Cheers, SmallSqueak
|
|
|
|
|
Logged
|
|
|
|
Charles Childers
Administrator
Sr. Member
    
Karma: +2/-0
Offline
Posts: 745
|
Excellent. I'll do this in my source tree tonight.
|
|
|
|
|
Logged
|
|
|
|
|
|
Charles Childers
Administrator
Sr. Member
    
Karma: +2/-0
Offline
Posts: 745
|
And now I have begun to work on documentation. See http://retroforth.org/book.html
This so far is focusing on the Rx Core. I do plan to expand it to cover RetroForth 9.2 as well. Suggestions welcome.
|
|
|
|
|
Logged
|
|
|
|
Pages: 1
|
|
|
|
|