🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #7213

Re: byte vs word movs

#7213
From: Arthur Rubin
Date: Fri, 21 Jun 1991 15:45
20 lines
1076 bytes
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.
Technical Details
Message-ID: <a_rubin.677519140@dn71>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!orion.oac.uci.edu!beckman.com!dn71!a_rubin
References: <1991Jun21.030948.10951@cs.mcgill.ca> <1991Jun21.031758.11264@cs.mcgill.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <a_rubin.677519140@dn71>
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