HP16C: Retrieving WSIZE (and a note about CCD ROM)


Hi, HP16C enthusiasts.

When I bought an HP16C in the 80's I read the entire manual contents and tested all examples. Then I tried my own programs and found that there was no direct way to retrieve current WSIZE to X-register (or any other), although it could be checked through [f][STATUS]. So I wrote the following program:

[g] LBL 0
[g] LJ counts how many bits are necessary to justify #1
x<>y this and next step are used to place #1 in the X-register...
[f] RL ... and preserve at least two previous values in stack
+ current word size
[g] RTN
It works fine and returns current word size despite of the current base and representation mode. Anyway, I always felt it could be smaller and with a different approach. After delving a bit with the CCD ROM functions designed for binary integer operations, I tried to replicate some of the HP16C features and found a better way to retrieve WSIZE to the X-register in the HP16C with three program steps only, LBL and RTN not counted.
[g] LBL 0
0 (or [g] CLx if you want to overwrite X)
[f] NOT
[g] #B the #B function does the trick
[g] RTN
The CCD ROM note is about the way WSIZE is saved in the HP41, and chances are that this is well known to the 'in-deep' users reading this. I noticed that at least three registers in main memory (program memory) were lost everytime I worked with the CCD's features mentioned above. I used CCD´s 'B?' and noticed buffers #1 and #5 (maybe buffer #6, don´t remember correctly) were not cleared. After clearing both buffers I noticed that the borrowed registers were back to main memory. I also noticed that the highest numbered buffer amongst the ones mentioned above (#5 or #6; sorry not having an HP41 in hands right now) was used after setting word size, meaning that somehow the word size is stored there. Does anybody kow something about this? I did not read the CCD ROM manual yet, just the QRG, and I did not read 'MCODE for beginners' entirely yet. Do these documents have extra information about buffers? Any other documents I should look for?

Thanks for any information.

Luiz (Brazil)

Edited: 7 Aug 2006, 11:27 a.m.

Possibly Related Threads...
Thread Author Replies Views Last Post
  An easy course in using the HP16c-wanted- Frank 4 813 10-29-2013, 11:50 AM
Last Post: Mark Hardman
  HP16C (NOS !!) Mike Powell 22 2,107 09-30-2013, 02:18 AM
Last Post: Paul Dale
  Advantage/CCD Matrix Challenge Ángel Martin 1 470 08-09-2013, 06:22 PM
Last Post: Thomas Klemm
  HP85 Programmable ROM cardtridge 82929A-service ROM not working- inaki 2 691 04-25-2013, 08:08 AM
Last Post: inaki
  Free HP39gII online note editor Mic 0 409 02-25-2013, 05:48 AM
Last Post: Mic
  shelf life time of a ROM, EEPROM, EPROM vs Mask Rom Guido (Canada) 6 1,005 01-11-2013, 04:09 PM
Last Post: Thomas Falk
  Big ROM - 41 System DEMO ROM Ángel Martin 5 917 10-16-2012, 05:28 AM
Last Post: Ángel Martin
  CCD and Advantage Pac Matrix Functions mark brethen 2 505 03-07-2012, 04:13 PM
Last Post: mbrethen
  CCD OS/X SAVEROM and GETROM doubt. robertoataulfo 2 444 01-11-2012, 01:47 PM
Last Post: robertoataulfo
  CCD OS/X Revisited Ángel Martin 0 264 06-11-2011, 02:46 PM
Last Post: Ángel Martin

Forum Jump: