NASM Forum > Using NASM

Where to start?

(1/1)

Adam Christensen:
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. Any suggestions?

Adam Christensen:
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

Frank Kotler:
You'd probably get better answers to your Masm questions on a Masm forum. If you wanna "translate" it to Nasm syntax, maybe we can help (PITA - looks like it uses a lot of "Masmisms")

Lines 101 and 118 wouldn't assemble with Nasm (without modification), but they look okay to me for Masm - maybe a different version(?). There's some kind of command line switch or directive to make newer versions behave like older versions, I think. If you can find that, it might help.

Line 239 may be because Masm differentiates between labels and variable names - try it without the "offset".

The reference to "coff" is a sign of trouble. You don't want this assembled to coff format! Find out what switch you need for OMF output. One advantage of translating the whole mess to Nasm is that we could spit out a .com file directly, without messing with a linker and "exe2bin"...

Best,
Frank

nobody:
the offset you can remove in all lines with just do

%define offset


so its define offset as nothing... :P

Navigation

[0] Message Index

Go to full version