Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: "Arthur" , djgpp AT delorie DOT com Date: Fri, 3 Jul 1998 12:13:35 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: 64k demo In-reply-to: <010701bda68f$7a7ba6a0$e44e08c3@arthur> Precedence: bulk "Arthur" wrote: > >Sorry, you're wrong. The Intel 80x86 machines are 2's complement. > >This means that -2 is 11111110. Shifted left this produces 11111100, or > >-4. > >SHL and SAL are the same bytecode on Intel 80x86. > >CF <- register <- 0 (high bit is shifted into the CF (carry flag), > >zero is shifted into the least significant bit) > > > >SHR and SAR are different bytecodes however. > >SHR produces > >0 -> register -> CF (0 is shifted into high bit, low bit is shifted > >into CF (carry flag)) > >whereas SAR produces > >sign bit -> register -> CF (the sign bit is replicated in the high > >bit, low bit is shifted into CF (carry flag)) > > > Oh, for a decent processor. I'm sorely tempted to go back to my ST. > > >> These are obviously different to arethmetic shifts. > >Only on the Motorola (and similar) chips. Not on the Intel 80x86. > > > You say "only." I know of no other processor other than the x86 (and > compatibles) that have such an illogical and unfriendly instruction set. That's because you don't know much about RISC processors. SET ------------------------------------ 0 -------------------------------- Visit my home page: http://set-soft.home.ml.org/ or http://www.geocities.com/SiliconValley/Vista/6552/ Salvador Eduardo Tropea (SET). (Electronics Engineer) Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org ICQ: 2951574 Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA TE: +(541) 759 0013