Is there a way i can convince masm (6.15) that i have a table of WORDS and not DWORDS?

mov si, OFFSET cs_tab
cmp al, 0FFh
je Exit
out 022h, al
mov al, ah
out 023h, al
jmp cs_init1

cs_tab db 003h,0C5h
db 012h,080h
db 0FFh,0FFh

MASM thinks the table has dwords (so mov esi, OFFSET cs_tab doesn't generate an error, but i dont want to access the table in dword format). MASM also translates lodsw to lodsd.

This is all very annoying.

Posted on 2004-10-09 05:20:18 by Slash0r
It's nothing to do with the size of cs_tab. Offset is returning a 32 bit value (because presumably you've set MASM to be 32 bit).
Also, note that db is a byte, not a word, use dw instead (although remember to swap the bytes over because of endian-ness).

Posted on 2004-10-09 05:48:40 by Mirno
Hi Mirno,

MASM 'thinks' that i want 32 code (because i used the .486P cpu type). Isn't there a way to use 16 code in the 32 code? A386 seems to do it (i don't have it, but i must translate a A386 program to masm).

Posted on 2004-10-10 12:23:03 by Slash0r
you can define at startup

.model small

now MASM is in 16 bit "mode", but you can use 32bit regs (if you want)

BTW, you will have to use an OMF linker
Posted on 2004-10-10 13:07:21 by japheth