home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.msdos.programmer
- Path: sparky!uunet!psgrain!hippo!ufhx1!cssjs2
- From: cssjs2@ufhx1.ufh.ac.za (Mr I Scheepers)
- Subject: Re: 386 Assembler Question - Easy one...
- Organization: University of Fort Hare, Alice, Ciskei
- Date: Wed, 11 Nov 92 11:48:31 GMT
- Message-ID: <1992Nov11.114831.6643@ufhx1.ufh.ac.za>
- References: <1992Nov9.162931.1@camins.camosun.bc.ca>
- Lines: 17
-
- 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?
-
- How about:
- mov al,VALUE
- mov ah,al
- mov eax,ax
-
-