Phoenix Edition v3.1 released!
#15
(09-05-2022, 01:32 AM)OldMoses Wrote: I can recall, from back in the days when I attempted to fool with Assembly, that most CPU's had ROL & ROR in their instruction set. Also known as 'circular shifting' or 'rotate no carry'. However, I can't recall ever using it. The mathematics of doing it is pretty squirrely, and I can't for the life of me think of a mathematical application.
Rotates are used in combination with shifts when you want to shift say a 16 bit number that is contained in two bytes. Shift left the LS byte and the left most bit get pushed out into the carry bit. Then rotate left the MS byte and that pulls the carry bit into the right most position of the MS byte. The left most bit of the MS byte is pushed out into the carry bit. So basically shift doesn't pull the (possibly unknown) carry bit into the byte. Dunno how the carry bit is with BASIC, but that's how it generally works with micros using assembly anyway.
Reply


Messages In This Thread
Phoenix Edition v3.1 released! - by SMcNeill - 09-04-2022, 02:46 AM
RE: Phoenix Edition v3.1 released! - by SMcNeill - 09-04-2022, 03:26 AM
RE: Phoenix Edition v3.1 released! - by bplus - 09-04-2022, 04:59 PM
RE: Phoenix Edition v3.1 released! - by OldMoses - 09-04-2022, 05:53 PM
RE: Phoenix Edition v3.1 released! - by bplus - 09-04-2022, 06:59 PM
RE: Phoenix Edition v3.1 released! - by SMcNeill - 09-04-2022, 08:31 PM
RE: Phoenix Edition v3.1 released! - by OldMoses - 09-05-2022, 01:32 AM
RE: Phoenix Edition v3.1 released! - by Stuart - 09-04-2022, 06:18 PM
RE: Phoenix Edition v3.1 released! - by Coolman - 09-04-2022, 06:28 PM
RE: Phoenix Edition v3.1 released! - by Stuart - 09-05-2022, 12:19 AM
RE: Phoenix Edition v3.1 released! - by Coolman - 09-05-2022, 10:45 AM
RE: Phoenix Edition v3.1 released! - by Gets - 09-05-2022, 01:31 AM
RE: Phoenix Edition v3.1 released! - by SMcNeill - 09-05-2022, 02:05 AM
RE: Phoenix Edition v3.1 released! - by Circlotron - 09-05-2022, 11:40 AM
RE: Phoenix Edition v3.1 released! - by Coolman - 09-05-2022, 02:02 PM
RE: Phoenix Edition v3.1 released! - by OldMoses - 09-05-2022, 03:19 PM
RE: Phoenix Edition v3.1 released! - by SMcNeill - 09-05-2022, 04:13 PM
RE: Phoenix Edition v3.1 released! - by a740g - 09-05-2022, 04:44 PM
RE: Phoenix Edition v3.1 released! - by Ikerkaz - 09-05-2022, 02:08 PM
RE: Phoenix Edition v3.1 released! - by Coolman - 09-05-2022, 06:09 PM
RE: Phoenix Edition v3.1 released! - by SMcNeill - 09-05-2022, 06:29 PM
RE: Phoenix Edition v3.1 released! - by SMcNeill - 09-05-2022, 11:25 PM
RE: Phoenix Edition v3.1 released! - by SMcNeill - 09-06-2022, 08:37 PM
RE: Phoenix Edition v3.1 released! - by mnrvovrfc - 09-08-2022, 03:54 AM
RE: Phoenix Edition v3.1 released! - by bert22306 - 09-05-2022, 10:00 PM
RE: Phoenix Edition v3.1 released! - by Stuart - 09-06-2022, 01:38 AM
RE: Phoenix Edition v3.1 released! - by SMcNeill - 09-06-2022, 02:44 AM
RE: Phoenix Edition v3.1 released! - by Stuart - 09-06-2022, 05:24 PM
RE: Phoenix Edition v3.1 released! - by SMcNeill - 09-06-2022, 04:43 AM
RE: Phoenix Edition v3.1 released! - by Stuart - 09-06-2022, 05:49 PM
RE: Phoenix Edition v3.1 released! - by Gets - 09-07-2022, 04:01 PM
RE: Phoenix Edition v3.1 released! - by Stuart - 09-08-2022, 10:01 AM
RE: Phoenix Edition v3.1 released! - by a740g - 09-10-2022, 07:10 PM
RE: Phoenix Edition v3.1 released! - by Stuart - 09-10-2022, 11:26 PM



Users browsing this thread: 14 Guest(s)