2 Copyright © 1995-2010, The AROS Development Team. All rights reserved.
7 #include <clib/exec_protos.h>
9 #include <clib/dos_protos.h>
12 static void hexdump(UBYTE
*data
, LONG len
)
16 for (i
= 0; i
< len
; i
++)
17 printf("%02X ", data
[i
]);
22 int main(int argc
, char **argv
)
26 LONG r1
=0,r2
=0,r3
=0,r4
=0;
27 char *name
= "testfile";
32 file
=Open(name
, MODE_NEWFILE
);
35 r1
=Write(file
,"hello, world\n",13);
36 r2
=Seek(file
,0,OFFSET_BEGINNING
);
37 r3
=Read(file
,buffer
,19);
43 printf("Results: %d %d %d %d \'%s\'\n",(int)r1
,(int)r2
,(int)r3
,(int)r4
,buffer
);