The Museum of HP Calculators

HP Forum Archive 17

[ Return to Index | Top of Index ]

converted 32sii program for 35s
Message #1 Posted by gteague on 13 Aug 2007, 7:25 p.m.

[mods, if this is inappropriate for the forum, please let me know]

going through the software archives to find some programs for my new 35s i came across this netmask calculator which will really help me as i'm taking my ccna test in the next month or two.

all i basically did was substitute 'goto line#' for the labels (original labels are noted to the right). i'm not enough of a programmer to condense it further although i see some possibilities using the indirect or index registers perhaps.

here is the original copyright notice:

This program is Copyright 2001 by Borja Marcos and is used here by permission. This program is supplied without representation or warranty of any kind. Borja Marcos and The Museum of HP Calculators therefore assume no responsibility and shall have no liability, consequential or otherwise, of any kind arising from the use of this program material or any part thereof.

Overview: This is my first 32Sii program, so don't blame me ;-) It calculates the netmask from the number of bits. For example, 24 gives

To run it, type the number of bits and "XEQ M". Enjoy it. Who said calculators aren't useful when you end college? ;-)

and here is the converted (for 35s) program:

001:	LBL M
002:	RPN
003:	STO B		'LBL M'
004:	0
005:	STO R
006:	STO M
007:	9
008:	STO E
009:	RCL B		'LBL A'
010:	8
011:	x>y?
012:	GTO M015
013:	8
014:	GTO M016
015:	RCL B		'LBL B'
016:	STO M		'LBL C'
017:	STO- B
018:	2
019:	RCL M
020:	y^x
021:	1
022:	-
023:	2
024:	ENTER
025:	8
026:	RCL M
027:	-
028:	y^x
029:	X
030:	RCL E
031:	10^x
032:	X
033:	STO+ R
034:	3
035:	STO- E
036:	RCL B
037:	x>0?
038:	GTO M009
039:	RCL R
040:	RTN


LBL M LN=129 CK=F049


[ Return to Index | Top of Index ]

Go back to the main exhibit hall