From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] Fresh (relatively speaking) Graphviz From: "Russ Cox" Date: Thu, 6 Mar 2008 12:07:15 -0500 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20080306170803.647D11E8C51@holo.morphisms.net> Topicbox-Message-UUID: 714c1880-ead3-11e9-9d60-3106f5b1d025 > I'm now getting to the 386 syscalls. The following comment in the > mkfile needs addressing. Suggestions? Change the loop to rename the generated assembly stub __seek and treat it like any other system call (no special code; just the name change). Then add this C function: int _seek(vlong*, int, vlong, int); vlong seek(int fd, vlong off, int whence) { vlong ret; if(_seek(&ret, fd, off, whence) == -1) return -1; return ret; } You should never ask "how do I write this in assembly?" You should ask "how do I *not* write this in assembly?" Russ P. S. You might also change gcc not to prefix all the C functions with underscores. (I'm sure there's an option.) Real systems gave that up a long time ago.