A note about the future of ecsoft2.org

ecsoft2.org runs on software (Drupal 7 and PHP 7.4) that reached its end of life years ago and no longer receives security updates. Keeping the site online safely is getting harder.

Giving it a future means migrating it to a current platform — and that is only worth doing if people still use it and want to help keep it alive.

If you care about ecsoft2.org, as a user, a contributor, or someone willing to lend a hand, please ggambaattiscali [dot] it (get in touch) by January 31, 2027.

If no one comes forward by then, the site will be turned into a read-only archive, so that its content stays available.

CDriver Plotter Sample

Versione: 
0.0.1
Data rilascio: 
Sabato, 12 Gennaio, 1991

Licenza:

Interfaccia:

Driver per controllare l'interfaccia di stampanti plotter ad alta velocità per grandi formati. Usata per l'interfaccia dell'adattatore Ikon 10092. Codice sorgente per driver di periferica reale OS/2 scritto in linguaggio C e assembler incluso.

Questo software è distribuito come pacchetto compresso, da scaricare e installare manualmente; se ci sono prerequisiti da soddisfare, andranno anch'essi scaricati e installati manualmente.

Installazione manuale

Il programma è distribuito come pacchetto ZIP: scaricare in una cartella temporanea e scompattare nella cartella di destinazione. Vedi sotto per il(i) link di download.

Qui di seguito trovi i link di download per l'installazione manuale del software:

CDriver Plotter Sample v. 0.0.1 (14/11/2026, Martin Iturbide) Readme/What's new
01-12-91 ras - initial entry This set of modules comprise an example OS/2 Device Driver, written primarily in 'C'. The purpose of this distribution is to give other OS/2 developers an example of a 'real' device driver that they can use to build other drivers. The source code is copyrighted, and part of a product that we market for many thousands of dollars. However, I feel that the code is so special purpose in application, that no real competitive advantage would be lost by distributing it to other interested OS/2 developers. Feel free to use it to explore how to build OS/2 device drivers in C. Obviously we make no warranties regarding its correctness nor usefulness, and assume no liabilities for any uses you might make of the code. I will not provide any support and may or may not redistribute any corrections I or others find. If you wish to make any comments regarding the driver, I can usually be contacted as following: Richard Stafford Byers Engineering Company 6285 Barfield Rd Atlanta, GA 30328 or: CompuServe: 73750,2305 OS/2 Shareware BBS 703-385-4325 This driver is an early version of a driver I use to control the interface to large format, high speed raster plotters. It is used to output monochrome bit map images of up to about 20,000 pixels wide, by any number of pixels long, at a data rate of up to 700,000 bytes per second. The driver is used with an Ikon 10092 interface adaptor for the ISA bus. This adaptor is operated under Interrupt control, and uses DMA for transferring the raster images from memory buffers to the raster plotter. Some information regarding the operation of the adaptor can be gleaned from the BIKONC.C module #def's. Please note that this driver is intended to operate in Protected mode only. It does not properly handle the case of being called from the DOS box in real mode, nor does its Interrupt Service routine handle interrupts while in real mode. The target environment for this product is a protected mode only machine, and having to handle the real mode cases would complicate the driver with no real gain. Using this driver as an example, it should be possible to write other OS/2 drivers using only the OS/2 PM Toolkit, and the book "Writing OS/2 Device Drivers" by Raymond Westwater. The Microsoft OS/2 Device Driver Kit is not necessary, though it is useful as an alternative view of some of the things in Westwater's book. However, neither of these sources address development of drivers in C. After having written several OS/2 drivers in both MASM and C, I greatly recommend the C approach. Only if you have to handle the real mode case, where you have to be really careful with segment registers, would I see any benefit to MASM code. This driver handles a fairly complicated device, using Interrupts, DMA, and IOCTL, and still is only about 3600 bytes long, including data structures. It would not benefit much in either speed or size by having been written solely in MASM. The following files are included in this distribution: CDRIVER.DOC this file CDRIVER.H general include file for writing C drivers BYTYPES.H include file defining some names for int, long, etc BIKON.H include file specific to this driver BIKONA.ASM primary interface between the C modules and OS/2, includes the strategy entry point and some interfaces between C and OS/2 DevHlp modules BIKONC.C all adaptor interface code resides in this module BIKON.DEF a linker .DEF file TEST_IK.C a module to demonstrate calls to the device driver As we use the Polytron MAKE tool, not the Microsoft MAKE tool, I have not included the complete set of make instructions. However, the following should be sufficient for anyone knowledgeble enough to write a driver: To produce BIKONA.OBJ MASM BIKONA, BIKONA/ZI; To produce BIKONC.OBJ CL -Ox -Zip -G2s -W2 -J -FPi -AL -Aw -c BIKONC.c To produce BIKON.OS2 LINK BIKONA+BIKONC, bikon.os2, bikon.map, \msc\lib\os2.lib, bikon.def /EXEPACK/NOE/NOD There are several methods for testing of OS/2 device drivers. One method is to use the Debug Kernal that comes with the OS/2 2.0 SDK or the Device Driver Kit from Microsoft. An alternative method that we used involved the RAMSCOPE tool. This shareware tool allows you to display, in a PM window, the contents of any area of physical memory. We used this tool to watch the driver data structures and gain hints as to what was going on. This tool is available on the OS/2 Shareware BBS. The following tools were used to perform this development: IBM OS/2 1.3 on a 486/33 clone with 8mb ram and 300mb disk MSC 6.00A MASM 5.10 MS Segmented-Executable Linker 5.10 MS PM Toolkit 1.2 Brief 3.0 Ramscope 2.0 I hope you find this information useful. Good luck on your device driver development. ---------------------------------------------------------------- # BYIKON Driver Changes ## Version 0.0.1 (14 Nov 2026) - Initial Open Watcom 2 Port ### Step 1: Build the driver with Open Watcom 2 (no logic change) **Files changed:** - `src/BIKONA.ASM` - Changed all `PUBLIC` symbols to uppercase to match C compiler symbol naming - `src/BIKONC.C` - Added `-zc` flag to preserve case (in Makefile.wat) **Build modifications:** - Created `Makefile.wat` with Open Watcom 2 flags - Added `compile_wat.cmd` with environment setup - Created `src/bldlevel.lnk` with version info - Removed `option def=` directive (not supported by wlink for this use case) **Binary produced:** - `bin/bikon.sys` - 4900 bytes - NE format 16-bit OS/2 character device driver - BLDLEVEL: OS2World:0.0.1 ### Notes The original driver was written for Microsoft C. Porting to Open Watcom 2 required: 1. **Large model (`-ml`)** - Required because the original used MSC `-AL` (large model). Small model compilation gave `E1091 *** MUST COMPILE IN LARGE MODEL ONLY` 2. **Symbol case** - Watcom's default symbol mangling didn't match MASM's `PUBLIC` declarations. Added `-zc` flag to preserve case. 3. **Symbol names** - Changed assembly `public` names from mixed case to uppercase to match Watcom's default output naming. 4. **Link script** - The original used a DEF file which wlink handled differently. Switched to inline link commands with bldlevel.lnk included. 5. **Header includes** - Updated include paths to use Watcom's OS/2 1.x headers (`%WATCOM%\h\os21x`) --- ### Step 2: Add boot messages, version.h, test program (14 Nov 2026) **Files changed:** - `src/BIKONC.C` - Added boot message infrastructure (`L_Emit`, `L_ParseArgs`, `L_WaitKey`, helpers) - `src/version.h` - Created version header (VER_STRING, VER_DATE, DEVICE_NAME) - `src/bldlevel.lnk` - Updated device description **Boot message features (following IBMRA1 pattern):** - `/V` - Verbose mode (version + build date, hardware status) - `/Q` - Quiet mode (no output) - `/W` - Wait for keypress before continuing - `/AA` - Announce with audible beep - All messages prefixed with `BYIKON:` and wrapped at 79 columns - Hardware detection at default I/O base 0x0300 - Error messages if adaptor not found **Binary produced:** - `bin/bikon.sys` - 6910 bytes (+2010 bytes for boot message code) - NE format 16-bit OS/2 character device driver - BLDLEVEL: OS2World:0.0.1 - SHA256: 3126d933f3d51c607eb308eef25db447c91d23bd407b1c9d3bca7bee5b471c07 **Test infrastructure:** - `test/test_bikon.c` - Test program using IOCTL to query IKON config - `test/compile_test.cmd` - Compile test program - `test/test_vm.cmd` - VM test script **Known limitations:** - Hardware test impossible (no IKON 10092 adaptor in the VM) - Only error path tested (ERR_IK_NO_ADAPTOR = 2003) - Boot messages will display "No IKON adaptor was found at I/O base 0x0300 (port reads 0xFF)" - Need VM reboot to test boot-time messages
 hobbesgram.org/download/os2/dev-4/samples-2/drivers-3/CDriver_0-0-1.zip  local copy
Scheda aggiornata l'ultima volta il: 15/11/2026 - 05:42

Aggiungi un commento