Electronic configuration of an atom for DM15L

Contributed software for the DM10, DM11, DM12, DM15 and DM16 goes here.

Please prefix the subject of your post with the model of the calculator that your program is for.
Post Reply
paf
Posts: 9
Joined: Mon Mar 27, 2023 7:07 am
Location: Armentières (North of France)

Electronic configuration of an atom for DM15L

Post by paf »

I wrote a small program for my DM15L in order to find the Klechkowski electronic configuration of an atom. This may not be the shortest way to code this...

I decided to stack the numbers into matrix A, where the line number is the primary quantic number (n) and the row number is the secondary quantic number (l). 1s stand then for A1,1, 2s for A2,1 and so on...

At the end, the display shows the different atomic orbitals on the screen with the electron content, the matrix is however still available and may be erased when the user does not need it anymore.

I tested it on several atoms, it worked fine so far, but exception to the klechkowski rules are not taken into account for the moment.

I know that it may not be the shortest way to deal with it, but I am quite new to RPN and HP-15C/DM15L (15 days...) and if you think modifications can be done to shorten the program feel free to share.

Thanks.

Code: Select all

# ------------------------------------------------------------------------------
# HEWLETT·PACKARD 15C Simulator program
# Created with version 4.5.00
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------

   000 {             } 
   001 {    42 21 15 } f LBL E
   002 {       42 34 } f REG
   003 {    43  5  0 } g CF 0
   004 {    44 48  0 } STO .0
   005 {       44  8 } STO 8
   006 {    42 16  0 } f MATRIX 0
   007 {           7 } 7
   008 {          36 } ENTER
   009 {           4 } 4
   010 {    42 23 11 } f DIM A
   011 {           2 } 2
   012 {       44  4 } STO 4
   013 {           1 } 1
   014 {       44  5 } STO 5
   015 {           1 } 1
   016 {       44  6 } STO 6
   017 {       32  8 } GSB 8
   018 {    43  6  0 } g F? 0
   019 {       22  7 } GTO 7
   020 {           2 } 2
   021 {       44  4 } STO 4
   022 {           2 } 2
   023 {       44  5 } STO 5
   024 {           1 } 1
   025 {       44  6 } STO 6
   026 {       32  8 } GSB 8
   027 {    43  6  0 } g F? 0
   028 {       22  7 } GTO 7
   029 {           6 } 6
   030 {       44  4 } STO 4
   031 {           2 } 2
   032 {       44  5 } STO 5
   033 {           2 } 2
   034 {       44  6 } STO 6
   035 {       32  8 } GSB 8
   036 {    43  6  0 } g F? 0
   037 {       22  7 } GTO 7
   038 {           2 } 2
   039 {       44  4 } STO 4
   040 {           3 } 3
   041 {       44  5 } STO 5
   042 {           1 } 1
   043 {       44  6 } STO 6
   044 {       32  8 } GSB 8
   045 {    43  6  0 } g F? 0
   046 {       22  7 } GTO 7
   047 {           6 } 6
   048 {       44  4 } STO 4
   049 {           3 } 3
   050 {       44  5 } STO 5
   051 {           2 } 2
   052 {       44  6 } STO 6
   053 {       32  8 } GSB 8
   054 {    43  6  0 } g F? 0
   055 {       22  7 } GTO 7
   056 {           2 } 2
   057 {       44  4 } STO 4
   058 {           4 } 4
   059 {       44  5 } STO 5
   060 {           1 } 1
   061 {       44  6 } STO 6
   062 {       32  8 } GSB 8
   063 {    43  6  0 } g F? 0
   064 {       22  7 } GTO 7
   065 {           1 } 1
   066 {           0 } 0
   067 {       44  4 } STO 4
   068 {           3 } 3
   069 {       44  5 } STO 5
   070 {           3 } 3
   071 {       44  6 } STO 6
   072 {       32  8 } GSB 8
   073 {    43  6  0 } g F? 0
   074 {       22  7 } GTO 7
   075 {           6 } 6
   076 {       44  4 } STO 4
   077 {           4 } 4
   078 {       44  5 } STO 5
   079 {           2 } 2
   080 {       44  6 } STO 6
   081 {       32  8 } GSB 8
   082 {    43  6  0 } g F? 0
   083 {       22  7 } GTO 7
   084 {           2 } 2
   085 {       44  4 } STO 4
   086 {           5 } 5
   087 {       44  5 } STO 5
   088 {           1 } 1
   089 {       44  6 } STO 6
   090 {       32  8 } GSB 8
   091 {    43  6  0 } g F? 0
   092 {       22  7 } GTO 7
   093 {           1 } 1
   094 {           0 } 0
   095 {       44  4 } STO 4
   096 {           4 } 4
   097 {       44  5 } STO 5
   098 {           3 } 3
   099 {       44  6 } STO 6
   100 {       32  8 } GSB 8
   101 {    43  6  0 } g F? 0
   102 {       22  7 } GTO 7
   103 {           6 } 6
   104 {       44  4 } STO 4
   105 {           5 } 5
   106 {       44  5 } STO 5
   107 {           2 } 2
   108 {       44  6 } STO 6
   109 {       32  8 } GSB 8
   110 {    43  6  0 } g F? 0
   111 {       22  7 } GTO 7
   112 {           2 } 2
   113 {       44  4 } STO 4
   114 {           6 } 6
   115 {       44  5 } STO 5
   116 {           1 } 1
   117 {       44  6 } STO 6
   118 {       32  8 } GSB 8
   119 {    43  6  0 } g F? 0
   120 {       22  7 } GTO 7
   121 {           1 } 1
   122 {           4 } 4
   123 {       44  4 } STO 4
   124 {           4 } 4
   125 {       44  5 } STO 5
   126 {           4 } 4
   127 {       44  6 } STO 6
   128 {       32  8 } GSB 8
   129 {    43  6  0 } g F? 0
   130 {       22  7 } GTO 7
   131 {           1 } 1
   132 {           0 } 0
   133 {       44  4 } STO 4
   134 {           5 } 5
   135 {       44  5 } STO 5
   136 {           3 } 3
   137 {       44  6 } STO 6
   138 {       32  8 } GSB 8
   139 {    43  6  0 } g F? 0
   140 {       22  7 } GTO 7
   141 {           6 } 6
   142 {       44  4 } STO 4
   143 {           6 } 6
   144 {       44  5 } STO 5
   145 {           2 } 2
   146 {       44  6 } STO 6
   147 {       32  8 } GSB 8
   148 {    43  6  0 } g F? 0
   149 {       22  7 } GTO 7
   150 {           2 } 2
   151 {       44  4 } STO 4
   152 {           7 } 7
   153 {       44  5 } STO 5
   154 {           1 } 1
   155 {       44  6 } STO 6
   156 {       32  8 } GSB 8
   157 {    43  6  0 } g F? 0
   158 {       22  7 } GTO 7
   159 {           1 } 1
   160 {           4 } 4
   161 {       44  4 } STO 4
   162 {           5 } 5
   163 {       44  5 } STO 5
   164 {           4 } 4
   165 {       44  6 } STO 6
   166 {       32  8 } GSB 8
   167 {    43  6  0 } g F? 0
   168 {       22  7 } GTO 7
   169 {           1 } 1
   170 {           0 } 0
   171 {       44  4 } STO 4
   172 {           6 } 6
   173 {       44  5 } STO 5
   174 {           3 } 3
   175 {       44  6 } STO 6
   176 {       32  8 } GSB 8
   177 {    43  6  0 } g F? 0
   178 {       22  7 } GTO 7
   179 {           6 } 6
   180 {       44  4 } STO 4
   181 {           7 } 7
   182 {       44  5 } STO 5
   183 {           3 } 3
   184 {       44  6 } STO 6
   185 {       32  8 } GSB 8
   186 {    42 21  8 } f LBL 8
   187 {    45 48  0 } RCL .0
   188 {       44  3 } STO 3
   189 {       45  4 } RCL 4
   190 {       44  2 } STO 2
   191 { 44 30 48  0 } STO − .0
   192 {    45 48  0 } RCL .0
   193 {    43 30  2 } g TEST x<0
   194 {       32  9 } GSB 9
   195 {       45  5 } RCL 5
   196 {       44  0 } STO 0
   197 {       45  6 } RCL 6
   198 {       44  1 } STO 1
   199 {       45  2 } RCL 2
   200 {       44 11 } STO A
   201 {    45 48  0 } RCL .0
   202 {    43 30  2 } g TEST x<0
   203 {    43  4  0 } g SF 0
   204 {       43 32 } g RTN
   205 {    42 21  9 } f LBL 9
   206 {       45  3 } RCL 3
   207 {       44  2 } STO 2
   208 {       43 32 } g RTN
   209 {    42 21  7 } f LBL 7
   210 {       45  8 } RCL 8
   211 {    42 16  1 } f MATRIX 1
   212 { 42 21 48  7 } f LBL .7
   213 {       42 31 } f PSE
   214 {    45 11  u } RCL A
   215 {    22 48  7 } GTO .7
   216 {       43 32 } g RTN

# ------------------------------------------------------------------------------

HP-15C CE
HP-32S
HP-42S (2 of them...)
Post Reply