home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!uwm.edu!cs.utexas.edu!sun-barr!olivea!gossip.pyramid.com!pyramid!infmx!neptune!bradl
- From: bradl@neptune.informix.com (Brad Levy)
- Newsgroups: comp.os.msdos.programmer
- Subject: Re: 386 Assembler Question - Easy one...
- Message-ID: <1992Nov17.060124.11423@informix.com>
- Date: 17 Nov 92 06:01:24 GMT
- References: <1992Nov9.162931.1@camins.camosun.bc.ca> <1992Nov11.114831.6643@ufhx1.ufh.ac.za> <1992Nov12.145342.17642@merlin.dev.cdx.mot.com>
- Sender: news@informix.com (Usenet News)
- Organization: Informix Software, Inc.
- Lines: 18
-
- > In <1992Nov9.162931.1@camins.camosun.bc.ca> morley@camins.camosun.bc.ca writes:
- >In 386 assembler I need to fill an extended register with 4 copies
- >of the same byte. Right now I'm using the following:
- >
- > mov al,VALUE
- > mov ah,VALUE
- > shl eax,16
- > mov al,VALUE
- > mov ah,VALUE
- >
- >I'm curious... is there a better/faster way to stuff the register?
-
- If VALUE is a constant, the fastest would be:
-
- mov eax, VALUEVALUEVALUEVALUE
- i.e., an immediate 32-bit load.
-
- - brad
-