# Old Canon-660 Driver/software



## Calderon (Feb 6, 2010)

Hi! tryin to port driver from Linux to old 660 Canon printer.

First i got this io.h missing stuff.


```
gcc  -O2 -s lbp660.c -o lbp660
lbp660.c:25:47: error: sys/io.h: No such file or directory
lbp660.c: In function 'get_bitmap':
lbp660.c:162: warning: incompatible implicit declaration of built-in function 'memset'
lbp660.c: In function 'errorexit':
lbp660.c:410: warning: incompatible implicit declaration of built-in function 'exit'
lbp660.c: In function 'main':
lbp660.c:949: warning: incompatible implicit declaration of built-in function 'strcpy'
*** Error code 1

Stop in /kakkonen/leffat/lbp660-0.3.1.
bsdkone#
```

Replacing io.h with ioctl.h

produced following.


```
bsdkone# make
gcc  -O2 -s lbp660.c -o lbp660
lbp660.c: In function 'get_bitmap':
lbp660.c:162: warning: incompatible implicit declaration of built-in function 'memset'
lbp660.c: In function 'errorexit':
lbp660.c:410: warning: incompatible implicit declaration of built-in function 'exit'
lbp660.c: In function 'main':
lbp660.c:949: warning: incompatible implicit declaration of built-in function 'strcpy'
/var/tmp//cccICL2w.o(.text+0x16e): In function `statusin':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x18e): In function `ctrlin':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x1b5): In function `ctrlout':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1d5): In function `dataout':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x50e): In function `checkstatus':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x58e): In function `checkctrl':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0xc2a): In function `cmddataouts':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0xc81): In function `cmddataouts':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0xc96): In function `cmddataouts':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0xca2): In function `cmddataouts':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0xd27): In function `cmdout':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0xd80): In function `cmdout':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0xd8e): In function `cmdout':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0xe1e): In function `checkcmddataouts':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0xe75): In function `checkcmddataouts':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0xe8a): In function `checkcmddataouts':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0xe96): In function `checkcmddataouts':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0xf46): In function `cmddataout':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0xfa0): In function `cmddataout':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0xfb3): In function `cmddataout':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0xfbf): In function `cmddataout':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x103b): In function `checkcmdout':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1093): In function `checkcmdout':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x10a1): In function `checkcmdout':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x117e): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1192): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x11f2): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1206): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x121a): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x127d): more undefined references to `outb' follow
/var/tmp//cccICL2w.o(.text+0x1289): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x12ab): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1306): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x1344): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x1366): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x137a): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x138e): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x13e6): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x1426): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x1448): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x14a0): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x152c): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x1552): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1566): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x15c0): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x15fd): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1655): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x1663): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x16d4): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1704): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1764): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1770): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x17ae): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x17c2): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x17d6): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x182e): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x186e): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x1890): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x18e8): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x1941): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x19a4): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x19ec): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x19f8): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x1a1a): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1a4a): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1aa2): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x1aea): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1af6): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x1b18): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1b48): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1ba0): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x1be8): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1bf4): In function `reset_printer':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x1c16): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1c62): In function `reset_printer':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1dbb): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1dc7): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x1de9): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1e41): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x1e57): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1e85): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1ee0): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x1f10): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1f68): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x1f7e): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1fd6): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1fea): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x1ff6): In function `print_band':
```
Any help would be appriciated.


----------



## Calderon (Feb 6, 2010)

```
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x201b): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x20de): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2144): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2176): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x21a6): more undefined references to `inb' follow
/var/tmp//cccICL2w.o(.text+0x21e7): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x21fb): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x220f): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2223): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x223f): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2253): more undefined references to `outb' follow
/var/tmp//cccICL2w.o(.text+0x2273): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2295): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x22f3): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2309): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2337): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2367): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x23c0): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x23f0): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2408): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2437): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x246e): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x247a): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x249c): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x24f4): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x250a): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2562): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x25c0): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x25f0): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2648): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x265e): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x268c): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x26a0): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x26d2): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2730): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2746): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x27be): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2807): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x281f): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2837): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2852): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2870): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x28c8): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x28de): In function `print_band':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x28f8): In function `print_band':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x299b): In function `checkcmddataout':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x29f3): In function `checkcmddataout':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2a08): In function `checkcmddataout':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2a14): In function `checkcmddataout':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2ade): In function `data64out':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2b36): In function `data64out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2b48): In function `data64out':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2b54): In function `data64out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2ba0): In function `data64out':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2bb4): In function `data64out':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2c10): In function `data64out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2c1e): In function `data64out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2c51): In function `data64out':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2cb0): In function `data64out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2cc2): In function `data64out':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2cce): In function `data64out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2cfe): In function `data64out':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2d12): In function `data64out':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2d70): In function `data64out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2d7e): In function `data64out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2db0): In function `data64out':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2e08): In function `data64out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2e1a): In function `data64out':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2e26): In function `data64out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2e69): In function `data64out':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2e7d): In function `data64out':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2ed5): In function `data64out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2ee3): In function `data64out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2f13): In function `data64out':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x2f6b): In function `data64out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x2f79): In function `data64out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x30d7): In function `data6out':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x3130): In function `data6out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x3145): In function `data6out':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x3151): In function `data6out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x3181): In function `data6out':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x31e8): In function `data6out':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x3240): In function `data6out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x324e): In function `data6out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x327e): In function `data6out':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x32d6): In function `data6out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x32e4): In function `data6out':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x3310): In function `data6out':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x3458): In function `print_page':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x34b0): In function `print_page':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x34bc): In function `print_page':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x34e0): In function `print_page':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x3538): In function `print_page':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x3546): In function `print_page':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x3788): In function `print_page':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x37e0): In function `print_page':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x37f2): In function `print_page':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x37fe): In function `print_page':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x382e): In function `print_page':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x388e): In function `print_page':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x38e6): In function `print_page':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x38f4): In function `print_page':
: undefined reference to `inb'
```


----------



## Calderon (Feb 6, 2010)

And the last part:

```
/var/tmp//cccICL2w.o(.text+0x3924): In function `print_page':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x397c): In function `print_page':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x398a): In function `print_page':
: undefined reference to `inb'
/var/tmp//cccICL2w.o(.text+0x39ba): In function `print_page':
: undefined reference to `outb'
/var/tmp//cccICL2w.o(.text+0x3c1d): In function `main':
: undefined reference to `ioperm'
/var/tmp//cccICL2w.o(.text+0x2faf): In function `data64out':
: undefined reference to `outb'
*** Error code 1
```


----------

