Message-ID: <017e01bda453$6cd54940$364e08c3@arthur> From: "Arthur" To: "DJGPP Mailing List" Subject: Re: 64k demo Date: Tue, 30 Jun 1998 18:43:33 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Precedence: bulk >>I have noticed, though, that the PC only has one type of shifting command. >>On the Motorola, there's ASL, ASR (arethmetic), LSL and LSR (logical), along >>with the rolling commands ROL and ROR and all the shifting commands that >>change different bits depending on the values entered into them. Are there >>any of these on the PC? > >This is rather machine dependent. Don't know how this is on the PC, but on my >Amiga it depended on the type of the variable you used. I'm not sure which on >were really used but when you declared "unsigned int" then the >> used ASL and >with "signed int" it used LSL (or vice versa, I'm not sure exactly anymore >about this). 80x86 has also a logical and an arithmetic shift and I guess that >compilers use this as well. It was probably the case on my ST; but I skipped C because ASM on the M68k is FAR easier. :^) If you'd tried graphics programming on your Amiga, you'd have used the shifting a LOT more. In case anybody's wondering why I need to know about data shifting in C, I don't. I'm simply curious and when the subject came up I wanted to fill a gap in my knowledge... James Arthur jaa AT arfa DOT clara DOT net