Where to start? (Compiling a DOS touch screen driver)

Started by PopeXXIII, February 28, 2005, 07:53:26 PM

Previous topic - Next topic

PopeXXIII

I have a ASM file that I am trying to compile. It is a touch screen driver for DOS. The default driver only works with COM1 or 2. I have a computer where it is wired on COM6. IO base 338 and IRQ 11. I tried using the ASM code from ASM.ZIP on:
http://www.elotouch.com/support/dnld_archive.asp

After modifying the lines I believe enable the TSR to load using 338/11 it won't compile, even the original ASM file won't work. I am probably using the wrong type of assembling program as I have no idea what I am doing.

Just to fill in some potental questions:

I modified line 82 and 86 to point to my hardware configuration.

BASEPORT equ 338h ; COM1
BAUDH equ BAUD9600H ; 9600 baud
BAUDL equ BAUD9600L
OTHERPARAMS equ 3 ; 8/1/N
IRQ equ 11 ; IRQ4 = COM1

This is what MASM spits out:

C:\elosix.asm(101) : error A2070: invalid instruction operands
C:\elosix.asm(118) : error A2070: invalid instruction operands
C:\elosix.asm(239) : error A2006: undefined symbol : nullproc
C:\elosix.asm(415) : warning A4023: with /coff switch, leading underscore required for start address : Start

MichaelW

I'm not sure what the cause of the invalid instruction operands error might be, but the undefined symbol problem is just what is being reported. The symbol (a label) is defined on line 169, but the definition is inside a procedure, so it is not visible outside of the procedure, where it is referenced on line 231.

I suspect the warning A4023 is because you are attempting to link a 16-bit DOS application with a 32-bit linker. You can assemble a 16-bit DOS application with MASM 6.xx, but you must have a 16-bit linker to link it. One is available for download here:

http://spiff.tripnet.se/~iczelion/download.html

And you should be able to assemble and link it with a batch file like this:

ML /c ucomtsr.asm
pause
LINK16 /tiny ucomtsr.obj,ucomtsr.com;
Pause


But the source definitely has at least one problem, and it is not commented very well, and it is IMO a fairly serious mess. If I were doing this I think I would try to get one of the BASIC examples working first, or at least a simple ASM version based on one of the BASIC examples.
eschew obfuscation