Question about WP-34S firmware



#6

I've been reading through the source code for the WP-34S, playing around and making (mostly minor) changes. A question has occurred to me: where do the variables in the C code - things like i, j, n, s, v, status, etc. - actually live? There doesn't seem to be space for them in the calculator RAM, but if they're stored in flash how will the memory cope with the constant changing of these variables every time the program runs?

I'm sorry if this question reveals my ignorance, but I'd still love to know the answer! Thank you.

Nigel (UK)


#7

The C local variables live in volatile RAM on the stack.


- Pauli


#8

Thank you! I've learned something. Does the WP-34S code go close to the limit? I've looked at the compiler output logs but I'm not quite sure how to use them to answer this question. I can see a line that says

.volatileram    0x002001b0      0x210
Is the 0x210 the number of bytes used by static variables?

Nigel (UK)


#9

The WP 34S code goes very close to the limit d:-)

#10

Not entirely. We have a few in non-volatile RAM as well.

The 34S firmware does go very close to the limit. We almost certainly overwrite some of these volatile static variables during some operations -- e.g. the matrix code uses a lot of stack space and I'd be very surprised if it didn't. The statistical code used to be close to overflowing volatile RAM too but that will have changed after the conversion to xrom. This isn't a problem, the state in volatile RAM is mostly for the keyboard engine and xrom code neither of which are in operation during these times

BTW: some of the keyboard engine state gets copied into LCD buffer RAM so that volatile RAM can be powered down between keystrokes.


- Pauli


Possibly Related Threads…
Thread Author Replies Views Last Post
  [WP-34S] Unfortunate key damage with update to V3 :( svisvanatha 5 3,282 12-10-2013, 11:37 PM
Last Post: Les Bell
  WP-34S (Emulator Program Load/Save) Barry Mead 1 1,847 12-09-2013, 05:29 PM
Last Post: Marcus von Cube, Germany
  Strange Battery Icon during updaate of Prime Firmware. Harold A Climer 7 3,598 12-05-2013, 04:40 PM
Last Post: Michael de Estrada
  How to update PRIME Firmware using Files on PC Harold A Climer 2 2,047 12-04-2013, 12:05 PM
Last Post: Erwin Ried
  DIY HP 30b WP 34s serial flash/programming cable Richard Wahl 2 2,591 12-04-2013, 11:14 AM
Last Post: Barry Mead
  New firmware for HP 39gII Mic 6 2,898 11-26-2013, 06:23 PM
Last Post: DeboT
  Another wish for next Prime firmware release Jose Gonzalez Divasson 0 1,151 11-21-2013, 06:55 AM
Last Post: Jose Gonzalez Divasson
  HP-Prime firmware update on a Mac Javier Goizueta 5 2,221 11-15-2013, 10:52 AM
Last Post: Javier Goizueta
  WP 34S/43 ?'s Richard Berler 3 2,119 11-10-2013, 02:27 AM
Last Post: Walter B
  My FrankenCulator (wp-34s) FORTIN Pascal 4 2,244 11-09-2013, 06:18 PM
Last Post: FORTIN Pascal

Forum Jump: