home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / msdos / programm / 10691 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  1.1 KB

  1. 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
  2. From: bradl@neptune.informix.com (Brad Levy)
  3. Newsgroups: comp.os.msdos.programmer
  4. Subject: Re: 386 Assembler Question - Easy one...
  5. Message-ID: <1992Nov17.060124.11423@informix.com>
  6. Date: 17 Nov 92 06:01:24 GMT
  7. References: <1992Nov9.162931.1@camins.camosun.bc.ca> <1992Nov11.114831.6643@ufhx1.ufh.ac.za> <1992Nov12.145342.17642@merlin.dev.cdx.mot.com>
  8. Sender: news@informix.com (Usenet News)
  9. Organization: Informix Software, Inc.
  10. Lines: 18
  11.  
  12. > In <1992Nov9.162931.1@camins.camosun.bc.ca> morley@camins.camosun.bc.ca writes:
  13. >In 386 assembler I need to fill an extended register with 4 copies
  14. >of the same byte.  Right now I'm using the following:
  15. >   mov  al,VALUE
  16. >   mov  ah,VALUE
  17. >   shl  eax,16
  18. >   mov  al,VALUE
  19. >   mov  ah,VALUE
  20. >I'm curious... is there a better/faster way to stuff the register?
  21.  
  22. If VALUE is a constant, the fastest would be:
  23.  
  24.    mov   eax, VALUEVALUEVALUEVALUE
  25. i.e., an immediate 32-bit load.    
  26.  
  27. - brad
  28.