I am trying to assemble a long written code.. it is like shown below,
under test.equ file:
.XLIST
IO_BUFR struc ; i/o buffer structure
input dw ? ; input address
output dw ? ; output address
count dw ? ; count
bufr dw IO_BUFSIZE dup(?) ; data buffer
IO_BUFR ends
.LIST
under test.asm
.DATA
PUBLIC rx2bufr, tx2bufr, tx5bufr
;
rx2bufr IO_BUFR <0,0,0,>
tx2bufr IO_BUFR <0,0,0,>
tx5bufr IO_BUFR <0,0,0,>
.CODE
...
mov [di].input,ax
mov [di].output,ax
mov [di].count,ax
On Assembling I get the following error,
test.asm(81): error A2006: undefined symbol : input
test.asm(82): error A2006: undefined symbol : output
test.asm(83): error A2006: undefined symbol : count
Pls guide me how to clear this error. Thanks a lot in Advance
Is this code very old and written for TASM?
TASM does not require you to use assume or full structure name BUT it requires unique strcture member names for this to work.
Try using assume directive or a full structure name.
Something like this
assume edi ptr IO_BUFR
mov [di.input],ax
or:
mov [di + IO_BUFR.input],ax
And if you use ASSUME don't forget to cancel the assumption when you are finished with it so it will not affect later uses of DI.
assume di:nothing
Quote from: BogdanOntanu on January 31, 2011, 07:35:00 AM
Is this code very old and written for TASM?
I guess it was written for Masm v5.1 or below.
Masm v6 and above might be able to assemble the unmodified source if the -Zm cmdline switch is used:
ml -c -Zm test.asm
MASM 5.1 can assemble it OK, at least with the code I substituted for the missing pieces.
assume di ptr IO_BUFR
mov [di.input],ax
assume di:nothing