Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!orion.oac.uci.edu!beckman.com!dn71!a_rubin From: a_rubin@dsg4.dse.beckman.com (Arthur Rubin) Newsgroups: comp.os.msdos.programmer Subject: Re: byte vs word movs Message-ID: Date: 21 Jun 91 15:45:40 GMT References: <1991Jun21.030948.10951@cs.mcgill.ca> <1991Jun21.031758.11264@cs.mcgill.ca> Lines: 20 Nntp-Posting-Host: dn71.dse.beckman.com In <1991Jun21.031758.11264@cs.mcgill.ca> 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] You need : MOV DX, WORD PTR SECTOR[BX] ; the assembler knows that SECTOR is a byte address. -- 2165888@mcimail.com 70707.453@compuserve.com arthur@pnet01.cts.com (personal) a_rubin@dsg4.dse.beckman.com (work) My opinions are my own, and do not represent those of my employer.