Article View: comp.os.msdos.programmer
Article #7232Re: byte vs word movs
From: Andy Vaught
Date: Fri, 21 Jun 1991 22:54
Date: Fri, 21 Jun 1991 22:54
22 lines
1261 bytes
1261 bytes
storm@cs.mcgill.ca (Marc WANDSCHNEIDER) writes:
>
> Given the following code:
>
> DATA_SEG SEGMENT PUBLIC
> PUBLIC SECTOR
> SECTOR DB 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22
> DATA_SEG ENDS
>
> Why is the following instruction illegal.... (assuming BX has the value 4)
>
> MOV DX, SECTOR[BX]
>
The above is perfectly legal. The problem is convincing MASM of its
legality. You might need an "OFFSET" keyword before "SECTOR". I don't
know, I use Turbo Assembler, which has much more rational syntax.
------------------------------------------------------------------
Andy Vaught (Fuzzy Andy) :: C Code. C Code Run. Run C code, Run...
Grad Student on Vacation :: before I whip out my 12-Gauge
andy@bluemoon.uucp :: Dynamic Debugging Tool!
Technical Details
Message-ID:
<ysyw42w164w@bluemoon.uucp>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!n8emr!bluemoon!andyReferences:
<1991Jun21.031758.11264@cs.mcgill.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!n8emr!bluemoon!andy From: andy@bluemoon.uucp (Andy Vaught) Newsgroups: comp.os.msdos.programmer Subject: Re: byte vs word movs Message-ID: <ysyw42w164w@bluemoon.uucp> Date: 21 Jun 91 22:54:09 GMT References: <1991Jun21.031758.11264@cs.mcgill.ca> Sender: bbs@bluemoon.uucp (BBS Login) Organization: Blue Moon BBS ((614) 868-998[0][2][4]) Lines: 22