Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.forth    |    Forth programmers eat a lot of Bratwurst    |    117,927 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 116,389 of 117,927    |
|    Krishna Myneni to Hans Bezemer    |
|    Re: DLSHIFT and DRSHIFT    |
|    02 Apr 24 06:33:46    |
      From: krishna.myneni@ccreweb.org              On 4/2/24 03:56, Hans Bezemer wrote:       > On 02-04-2024 02:56, Krishna Myneni wrote:       >> On 4/1/24 10:18, Hans Bezemer wrote:       >> ...       >>> The only viable alternative is:       >>>       >>> : DLSHIFT ( xd1 n -- xd2) 0 ?do d2* loop ;       >>> : DRSHIFT ( xd1 n -- xd2) 0 ?do d2/ loop ;       >>>       >>       >> DRSHIFT cannot be coded with D2/ which is an arithmetic right shift,       >> i.e. it preserves the sign bit. DRSHIFT has to pad from the left with       >> zero bits.       >       > True, but if you know my coding style - this is not it. And it is       > acknowledged as such in the source:       >       > \ DXForth MISC.SCR, Copyright Ed, 2011-03-25       > \ Albert van der Horst, Thursday 09 April 2015 19:57:13, c.l.f       >       > So it's not uncommon to define it like this. Apart from that - "D2/" is       > not a standardized word - so it can mean anything. Although I do agree       > with you that your definition is the most likely one.       >       > Hans Bezemer              D2/ is a standardized word, since ANS Forth:              8.6.1.1100       D2/       “d-two-slash”       DOUBLE       ( xd1 – – xd2 )       xd2 is the result of shifting xd1 one bit toward the least-significant       bit, leaving the most-significant bit unchanged.              --       KM              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca