Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > Re: Snapshot 5....
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 6 Topic 4036 of 4053
Post > Topic >>

Re: Snapshot 5.37 of xina

by Robert Spykerman <robert.spykerman@[EMAIL PROTECTED] > May 5, 2008 at 03:06 AM

On May 5, 2:00 pm, Robert Spykerman <robert.spyker...@[EMAIL PROTECTED]
>
wrote:
<SNIP>

> The test suite has uncovered at least one problem with CREATE-FILE.
> (Wow, that test suite is pretty rigorous).
>
> I will be checking this out. No doubt this is related to syscalls. Oh
> what fun :)

Yep, syscalls. What fun.

OSX does not have creat anymore. So I've added functionality via the
open syscall. This appears to work now. Will test more.

Also, the open syscall behaves slightly differently on OSX cmp linux.
For example, if you try and open a non-existent file on linux you get
a negative return (error). On osx, you get a 2 returned in EAX when
you open a non-existent file or if you try and open a directory. I
assume it means stderr. Any file that exists appears to get a fid >=
4.

Now of course, one could add some extra cheat logic to cope for the
difference, like I did for the fork syscall. This however means less
genericity in the syscall words, as each substantially different
syscall will have to have a word of its own.

Alternatively have a jumptable in just one word ie XOS which will
dispatch the syscall to its appropriate patch within just to mantain
lina compatibility (ie so the forth.lab syscalls don't break).

It sure looks like the only way to get consistency here may be
ultimately to call c and abandon syscalls altogether. Linux may be
consistent with linux, but OS X and linux.... OS X is certaintly
turning out to be quite the black box at syscall level and I have been
warned by a guy at apple not to do this. hmmm....

I'll stick at this for a while, but I'll aim to link to c down the
line. From what I know the big *nix forths, gforth, iForth (I think -
have't got a copy yet) and VFX link to c libs.

Robert Spykerman




 6 Posts in Topic:
Snapshot 5.37 of xina
Albert van der Horst <  2008-05-04 10:37:23 
Re: Snapshot 5.37 of xina
Robert Spykerman <robe  2008-05-04 11:53:06 
Re: Snapshot 5.37 of xina
Robert Spykerman <robe  2008-05-04 21:00:15 
Re: Snapshot 5.37 of xina
Robert Spykerman <robe  2008-05-05 03:06:34 
Re: Snapshot 5.37 of xina
Albert van der Horst <  2008-05-05 22:32:51 
Re: Snapshot 5.37 of xina
Bruce McFarling <agila  2008-05-05 06:20:32 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 1:29:20 CDT 2008.