SR-52 vs 15c: more questions of NIMB



#8

first of all the program code from the sr-52 in condensed form:

000 LBL D
002 CMS
003 LBL E
005 CLR
006 RCL 99
009 HLT
010 STO 98
013 STO 99
016 LBL A
018 INV STF 1
021 RCL 98
024 HLT
025 -
026 4
027 )
028 IF+
029 A
030 +
031 3
032 )
033 INV IF+
035 A
036 +
037 1
038 )
039 +/-
040 SUM 98
043 RCL 98
046 IFZ
047 9'
048 .2
050 IND SUM 98
054 LBL B
056 STF 1
058 RCL 98
061 STO 00
064 E'
065 E'
066 E'
067 STO 19
070 RCL 98
073 STO 00
076 RCL 97
079 INV D/R
081 -
082 C'
083 +
084 .5
086 )
087 STO 97
090 *
091 RCL 19
094 )
095 +/-
096 LBL LST
098 DSZ
099 0
100 +
101 IND RCL 00
105 INV LNX
107 )
108 INV IF+
110 LST
111 RCL 00
114 IFZ
115 9'
116 .1
118 IND SUM 00
122 RCL 00
125 STO 98
128 GTO A
130 LBL C'
132 FIX 0
134 EE
135 INV EE
137 INV FIX
139 RTN
140 LBL E'
142 DSZ
143 0
144 IND RCL 00
148 INV LNX
150 +
151 RTN
152 LBL 9'
154 RCL 99
157 STO 00
160 LBL GTO
162 1
163 STO 19
166 IND RCL 00
170 -
171 C'
172 IND STO 00
176 -
177 .1
179 )
180 INV IF+
182 DSZ
183 INV IFZ
185 1'
186 1
187 +/-
188 PRD 19
191 LBL 1'
193 RCL 19
196 IFF 1
198 2'
199 +/-
200 LBL 2'
202 IND SUM 00
206 LBL DSZ
208 DSZ
209 GTO
210 IFF 1
212 E
213 PI
214 C
215 HLT

i am still interested in the conversion of this program to a 15c program.

in line 64, 65, 66 the subroutine E' is three times consecutive requested. in E' the DSZ (line 142) performs decrement and skips branching, according to some fellow members of the forum.

with the multiple decrement, the register reaches zero, and, that is the question, goes into the negative realm ...

the 15c performs allways a decrement, so if nullified branching with, for example, a LBL .0 (the poor man's NOP ;) ), the program continues.

this is part one. the other question is, which register content is returned in line 144, if the pointer register contains a negative number. the 15c takes the absolute value and returns it or if out of range, error 3.

additional short interpretation:

- r[97] is ran#

- line 76 performs kind of random number ...

- C' performs an INT(x + 0.5)


Edited: 23 May 2012, 4:49 p.m.


#9

Hello Nina,

When register zero becomes zero, it will stay zero. I've tested this on my SR-52.

Marc.


#10

hi marc,

very nice. thank you! :)

kind regards,

nina

Edited: 24 May 2012, 9:10 a.m.


#11

Nina,

If you could post the 15C ported version when it's completed, that would be very nice indeed.


#12

TI calculators normally decrement the magnitude of the number, thus approaching zero by decrementing positive and incrementing negative numbers. As a consequence, they stop at zero. If the number has a fraction, that fraction will be nullified in the last pass, thus 3.5 counts as 4, for example.

#13

To my knowledge, the DSZ command always counts towards zero. A negative value will e incremented.


#14

I assume it's known here that the SR-52 always decrements R00 when using the Dsz command? It's not like the TI-59, which could use R00-R09 (officially) and all registers except R40 with a trick.


Possibly Related Threads...
Thread Author Replies Views Last Post
  [alpha]SR wp34s Andrew Nikitin 9 766 06-17-2013, 11:48 PM
Last Post: Andrew Nikitin
  Optimization questions - HP-15C Marcel Samek 49 2,309 11-08-2012, 07:45 AM
Last Post: Luiz C. Vieira (Brazil)
  HP-15C/DM-15CC Memory questions x34 2 349 07-24-2012, 06:28 PM
Last Post: Jeroen Van Nieuwenhove
  SR-52 flaky display Colin Verrilli 11 911 07-24-2012, 01:22 PM
Last Post: Colin Verrilli
  Help wanted SR-52 nina scholz 29 1,729 05-16-2012, 07:48 AM
Last Post: Anders Persson
  OT--TI's SR-60 Matt Agajanian 8 678 04-25-2012, 11:34 AM
Last Post: Joerg Woerner
  Emu28 v1.25 and Emu48 v1.52 update Christoph Giesselink 2 314 04-05-2012, 02:01 AM
Last Post: Gilles Carpentier
  HP vs TI's SR-50 Matt Agajanian 15 1,020 03-28-2012, 06:45 PM
Last Post: Bill Carter
  HP 15C LE firmware and memory questions Lode 10 690 01-28-2012, 07:24 PM
Last Post: uhmgawa
  Original 15C Keyboard Test Works With 15C LE!!! DigiGal 5 613 09-26-2011, 07:33 PM
Last Post: M. Joury

Forum Jump: