TIP: Click on subject to list as thread! ANSI
echo: power_bas
to: OLIVIER DAGENAIS
from: TIM HUTZLER
date: 1997-02-19 09:00:00
subject: Re: Assy access of strin

OD>Huh? What is ADX? It is the 32bit version of DX, as EAX is of AX?
TH>Sorry, "adx" is short for the address of the instruction data, and
OD>Address of the instruction data?  Please elaborate...
The 80xxx CPU gets its data from either it's registers, or from
memory. The 'address' of the registers go by name: AX, BX, SI, etc.
The 'address' of the memory is an offset. An 'offset' is a relative
distance from a segment; that is, the actual address is the segment
location plus the offset. That gives you what is called the
'absolute' address.
The absolute address can result from the 'effective address' which is
what the machine calculates depending on the addressing mode. This
brings us full circle, for it is the addressing mode that specifies
whether the data comes from a register (AX, BX, SI, etc.) or a memory
location specified by one of the registers, either BX, SI, or DI, or
from a immdiate value, that is, the data "adx" immediately follows
the inscruction.
TH>Well, the effective addresses for instructions requiring a far
TH>address are always in the form [segment:offset]. The offset is the
TH>first two butes and the segment follows. Instructions that come to
TH>mind are the LEA, LDS, LES, and the various FAR jumps and calls.
OD>So, I can use ADX like any other register, then?
In many respects, yes. But, remember that effient programming
requires the manipulation of data in the CPUs internal registers.
Data, "adx", is a memory location; thus the instruction has more
bytes and take longer to execute. Also, you can't use memory
locations exclusively. For instance "ADD MyNumber,YourNumber" is not
supported by the 80xxx family of microprocessors, unless "YourNumber"
is an immediate value that follows the instruction. In that case the
"adx" in implied to be Pctr+4, because the instruction and 1st "adr"
offset take up four bytes.
TH>These instructions get their data either as an imediate operand,
TH>or are referenced from some other location, ie. indirect. In
TH>either case it is the instructions data, ie. the pointer.
OD>Funky. Funky how a three-character mnemonic can signify that much
OD>over another of no less characters.. :)
The number of characters is ilrelavent. Assemblers are "symbolic"
languages just like BASIC or "C." The mnemonics are short, easy to
remember codes that mean something just like words in the english
language do.
Also, just like all languages, assembly has a syntax, or 'rules to
the language.' Thus, the mnemonic "ADD" tells the assembler that it
must code for an addition operation and to expect two arguments. The
1st must be the destination, and the second must be the source. There
ar a number of instructions that require this particular syntax,
"AND," "OR," "SUB," to name a few. And there are other instructions
that require a different syntax. The point is that the mnemonic
simply tells the assembler what to do, it doesn't tell it what to
code. That still depends on the syntax, and other things.
TH>nice built in features QuickBASIC doesn't have. PB also has some
TH>irritating bugs.
OD>Like what?
Well, the documentation is not very well "synchronized" to the actual
product. There are a few commands and statements that do not work
consistently as decomented in the manual. Nothing serious, but
irritating, because I write come code and it doesn't work even though
I meet the 'proper' syntax as documented in the manual. The CHDRIVE
command is the latest example.
(cont.)
___ Blue Wave/QWK v2.12
--- Maximus/2 3.01
---------------
* Origin: Madman BBS * Chico, California * 916-893-8079 * (1:119/88)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.