[retroforth] Re: Request for Linux specific words

  • From: Ton ´t Lam <ton.tlam@xxxxxxxxx>
  • To: retroforth@xxxxxxxxxxxxx
  • Date: Thu, 20 Jan 2005 19:42:36 +0100

Charles Childers wrote:

>I might be able to pull off the argc/argv words, but they'd be part of
>an extended system, not the core release. (I could probably include a
>binary with this in RetroForth 8 if enough interest is expressed. I
>already have several binaries which I'll detail soon)
>
>Allowing the set of return code is a bit trickier. I don't want to
>change the syntax of bye, but I could provide another word for Linux
>that sets the return value. Perhaps "exit"?
>  
>
You can decide to have 'return' because that is what 'we' do. I novice 
with fasm,
but think it is not that tricky.

code 'return',return
        upop ebx
        mov eax, 1
        int 80h
;

It is in my rf now :-)

: bye 0 return ;

Of course you can leave 'bye' as it is. 'return' is a cheap word.

>I haven't delved into a pipe syscall yet, but some useful words for
>files and interfacing with a shell are at
>http://www.uni-duisburg.de/~sa796ol/rf/ Many of these will be included
>in the code library for RetroForth 8.
>  
>
Fantastic !

>--
>Charles
>  
>
Best Regards,
Ton

Other related posts: