2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 #include <proto/exec.h>
10 #include <proto/alib.h>
11 #include <proto/aros.h>
13 int main (int argc
, char ** argv
)
23 fh
= Open ("test.bed", MODE_NEWFILE
);
27 printf ("Couldn't open file (1)\n");
32 WriteWord (fh
, 0x1122);
33 WriteLong (fh
, 0x11223344);
34 WriteString (fh
, "Hello world.");
36 WriteDouble (fh
, 1.75);
40 fh
= Open ("test.bed", MODE_OLDFILE
);
44 printf ("Couldn't open file (2)\n");
49 kprintf ("Byte = %02x\n", b
);
51 kprintf ("Word = %04x\n", w
);
53 kprintf ("Long = %08lx\n", l
);
55 kprintf ("String = \"%s\"\n", s
);
57 kprintf ("Float = %08lx\n", ((ULONG
*)&f
)[0]);
59 kprintf ("Double = %08lx%08lx\n", ((ULONG
*)&d
)[1], ((ULONG
*)&d
)[0]);