home bbs files messages ]

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,401 of 117,927   
   albert@spenarnc.xs4all.nl to dxforth@gmail.com   
   Re: DLSHIFT and DRSHIFT   
   12 Apr 24 10:27:49   
   
   In article <66188ab1$1@news.ausics.net>, dxf   wrote:   
   >On 12/04/2024 1:11 am, albert@spenarnc.xs4all.nl wrote:   
   >>   
   >> While others indulge in endless discussions about DRSHIFT   
   >> I thought to attempt some literate programming.   
   >   
   >It didn't prompt you to test your own implementation?   
   >   
   >  ( D0= D0<> D0< D= D< D- M+ DRSHIFT DLSHIFT DU< ) \ AvdH B6Mar22   
   >   
   >  : DLSHIFT >R SWAP DUP R@ LSHIFT SWAP 8 CELLS R@ - RSHIFT ROT R>   
   >      LSHIFT OR ;   
   >   
   >  : DRSHIFT >R DUP R@ RSHIFT SWAP 8 CELLS R@ - LSHIFT ROT R>   
   >      RSHIFT OR SWAP ;   
   >   
   >0 4 d. 17179869184  ok   
   >0 4 0 drshift d. 17179869188  ok   
   >   
   >4 0 d. 4  ok   
   >4 0 0 dlshift d. 17179869188  ok   
   >   
      
   Good catch! Shifting over 8 CELLS is an ambiguous condition.   
   insert   
       DUP 0= IF EXIT THEN   
   in front of the code.   
   --   
   Don't praise the day before the evening. One swallow doesn't make spring.   
   You must not say "hey" before you have crossed the bridge. Don't sell the   
   hide of the bear until you shot it. Better one bird in the hand than ten in   
   the air. First gain is a cat purring.            - the Wise from Antrim -   
      
   --- 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