home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / msdos / programm / 10504 < prev    next >
Encoding:
Text File  |  1992-11-11  |  793 b   |  28 lines

  1. Newsgroups: comp.os.msdos.programmer
  2. Path: sparky!uunet!psgrain!hippo!ufhx1!cssjs2
  3. From: cssjs2@ufhx1.ufh.ac.za (Mr I Scheepers)
  4. Subject: Re: 386 Assembler Question - Easy one...
  5. Organization: University of Fort Hare, Alice, Ciskei
  6. Date: Wed, 11 Nov 92 11:48:31 GMT
  7. Message-ID: <1992Nov11.114831.6643@ufhx1.ufh.ac.za>
  8. References: <1992Nov9.162931.1@camins.camosun.bc.ca>
  9. Lines: 17
  10.  
  11. In <1992Nov9.162931.1@camins.camosun.bc.ca> morley@camins.camosun.bc.ca writes:
  12. >In 386 assembler I need to fill an extended register with 4 copies
  13. >of the same byte.  Right now I'm using the following:
  14.  
  15. >   mov  al,VALUE
  16. >   mov  ah,VALUE
  17. >   shl  eax,16
  18. >   mov  al,VALUE
  19. >   mov  ah,VALUE
  20.  
  21. >I'm curious... is there a better/faster way to stuff the register?
  22.  
  23. How about:
  24.     mov al,VALUE
  25.     mov ah,al
  26.     mov eax,ax
  27.  
  28.