The programming model employed was key stroke programming by which each key pressed was recorded and later played back. On record multiple key presses were merged into a single programming step. All operations fitted into one program step. The FX-501P could store 128 steps, with 11 memory registers. The FX-502P had twice that capacity with 256 steps and 22 memory registers. Conditional and unconditional jumps as well as subroutines were supported. The FX-502P series supported 10 labels for programs and subroutines called P0 .. P9. Each program or subroutine could have up to 10 local labels called LBL0 .. LBL9 for jumps and branches. The FX-501P and FX-502P supported indirect addressing both for memory access and jumps and therefore the programming model could be considered
Turing complete. Since the FX-501P and FX-502P only employed a
seven-segment display each program step was represented by a special 2-digit codes made up of the digits 0 .. 9 and the character C, E, F and P. The calculator came with a special overlay so the user did not need to memorize the mapping between code and actual command. What differentiated the FX-501 / FX-502P from its competitors was that programming was retained in a battery-buffered memory when the calculator was turned off.
Programming example Here is a sample program that computes the factorial of an integer number from 2 to 69. For 5!, the user would type 5 P0 and get the result 120. The whole program is only 9 bytes long. ==Interface==