Re: newbie: I/O with nasm
- From: ArarghMail603NOSPAM@xxxxxxxxxxxxxxxxx
- Date: Wed, 08 Mar 2006 00:08:12 -0600
On Tue, 07 Mar 2006 19:14:26 -0500, Frank Kotler
<fbkotler@xxxxxxxxxxx> wrote:
<snip>
For more practical purposes, if we're allowed to call availabe OSWindows Readfile & WriteFile (from MSDN):
services, dos and Linux are easy. For Windows, I think we're going to
have to call GetStdHandle with -10 for stdin, and -11 for stdout (that
seems too insane to be true!). Then, ReadFile and WriteFile might take a
parameter to say whether it's unicode or not, and I think ReadFile wants
a parameter telling it where to put "status" - number of characters read
or errno - rather than returning it in eax... Otherwise not too much
different than the read()/write() example.
BOOL ReadFile(
HANDLE hFile, // handle to file
LPVOID lpBuffer, // data buffer
DWORD nNumberOfBytesToRead, // number of bytes to read
LPDWORD lpNumberOfBytesRead, // number of bytes read
LPOVERLAPPED lpOverlapped // overlapped buffer
);
BOOL WriteFile(
HANDLE hFile, // handle to file
LPCVOID lpBuffer, // data buffer
DWORD nNumberOfBytesToWrite, // number of bytes to write
LPDWORD lpNumberOfBytesWritten, // number of bytes written
LPOVERLAPPED lpOverlapped // overlapped buffer
);
<snip>
--
ArarghMail603 at [drop the 'http://www.' from ->] http://www.arargh.com
BCET Basic Compiler Page: http://www.arargh.com/basic/index.html
To reply by email, remove the garbage from the reply address.
.
- Follow-Ups:
- Re: newbie: I/O with nasm
- From: Frank Kotler
- Re: newbie: I/O with nasm
- References:
- newbie: I/O with nasm
- From: TK
- Re: newbie: I/O with nasm
- From: James Daughtry
- Re: newbie: I/O with nasm
- From: santosh
- Re: newbie: I/O with nasm
- From: Frank Kotler
- Re: newbie: I/O with nasm
- From: James Daughtry
- Re: newbie: I/O with nasm
- From: Frank Kotler
- newbie: I/O with nasm
- Prev by Date: Re: newbie: I/O with nasm
- Next by Date: Re: newbie: I/O with nasm
- Previous by thread: Re: newbie: I/O with nasm
- Next by thread: Re: newbie: I/O with nasm
- Index(es):
Relevant Pages
|