Quantcast
Channel: stardot.org.uk
Viewing all articles
Browse latest Browse all 2345

programming • Re: Function causing Beeb to crash

$
0
0
ProgTip: I managed to wrangle some code together to do left-shifts on pre-32bit BASIC:
((num%AND&3FFFFFFF)*2)OR(((num%AND&40000000)<>0)AND&80000000)

I thought I'd done a similar right shift, but can't find it. Let's think....
((num%AND&7FFFFFFF)DIV2)OR(&40000000 AND (num%<0))

Better put these on the wiki.
...and in typing them up to make into a library, I ended up optimising them and built the full set of 5 shift/rots. ;)
mdfs.net/blib/Shift when I get around to uploading it.

(I''ve been isolating, and through the boredom have been going through loads of unsorted code snippets and tidying them up and documenting them.)

Statistics: Posted by jgharston — Tue Jan 16, 2024 12:28 am



Viewing all articles
Browse latest Browse all 2345

Trending Articles