Go to the documentation of this file.
7 print "Error: Could not access file: '" +
filename +
"'"
12 dim as integer f =
freefile()
13 if (
open(
filename,
for binary,
access read,
as #f))
then
17 dim as ubyte ptr p = NULL
18 dim as integer size =
lof(f)
23 dim as integer result =
get(#f, , *
p,
size,
size)
24 if (result
or (
size <= 0))
then
36 dim as integer f =
freefile()
37 if (
open(
filename,
for output,
as #f))
then
44 if (
__FB_ARGC__ <> 3)
then
45 print "Usage: makedriver fbportio.sys fbportio-driver.h"
56 emit +=
"#define FBPORTIO_DRIVER_SIZE " +
str(
size) + !
"\n"
57 emit += !
"const unsigned char fbportio_driver[FBPORTIO_DRIVER_SIZE] = {\n"
59 for i
as integer = 0
to (
size - 1)
60 if ((i
mod 16) = 0)
then
65 emit +=
"0x" +
hex(
p[i], 2)
67 if (i < (
size - 1))
then
70 if (((i + 1)
mod 16) = 0)
then