Post Reply 
(16C) show which bits are set in a number
03-30-2019, 11:33 PM
Post: #16
RE: (16C) show which bits are set in a number
Having seen mfleming's (to whom thanks) recently-posted program to work out the current WSIZE, I realised that you get this almost for free with the program I posted here.

All that's needed — I think — is something like:
Code:
LBL B    # WSIZE?
1
RR
GSB A    # or however my program is labelled
and then add one to get the word size. Haven't checked whether there are any nasties depending on complement, yet. No need to clear carry as A should do that (as Sylvain suggested)

I might change my original program so that it doesn't recall the original number, and then the above could do the addition to present the WSIZE directly.

Any good?

Cambridge, UK
41CL/DM41X 12/15C/16C DM15/16 17B/II/II+ 28S 42S/DM42 32SII 48GX 50g 35s WP34S PrimeG2 WP43S/pilot
Casio, Rockwell 18R
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (16C) show which bits are set in a number - cdmackay - 03-30-2019 11:33 PM



User(s) browsing this thread: 1 Guest(s)