Article View: comp.os.msdos.programmer
Article #7189byte vs word movs
From: Marc WANDSCHNEIDER
Date: Fri, 21 Jun 1991 03:17
Date: Fri, 21 Jun 1991 03:17
35 lines
1533 bytes
1533 bytes
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 book I am reading claims that this is because SECTOR is a byte label...
I learned to program Assembler on the PDP11 where I could do the following:
SECTOR: .byte 10, 11, 12, 13, 14, 15, 16, 17, 18 ..etc
MOV #SECTOR, r1
MOVB (r1)+, r2
or
MOV (R1)+, r2
Can somebody give me an explanation..?
[If possible, please forward all replies to storm@sizone.UUCP please. Thanks]
./*-
storm@bart.cs.mcgill.ca
storm@sizone.UUCP
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
storm@cs.mcgill.ca McGill University It's 11pm, do YOU
Marc Wandschneider Montreal, CANADA know what time it is?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Technical Details
Message-ID:
<1991Jun21.031758.11264@cs.mcgill.ca>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!quiche!stormReferences:
<1991Jun21.030948.10951@cs.mcgill.ca>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!quiche!storm From: storm@cs.mcgill.ca (Marc WANDSCHNEIDER) Newsgroups: comp.os.msdos.programmer Subject: byte vs word movs Message-ID: <1991Jun21.031758.11264@cs.mcgill.ca> Date: 21 Jun 91 03:17:58 GMT References: <1991Jun21.030948.10951@cs.mcgill.ca> Sender: news@cs.mcgill.ca (Netnews Administrator) Organization: SOCS, McGill University, Montreal, Canada Lines: 35