A chart for displaying the number 308:

          VARIABLES                                          COMMAND                          7-SEG.
pf            save              pn                                                                                    disp.

134            *                    *                                  printf(308);                                *
134            *                  1E                                  pn = pf / 10;                                *
134          1E                  1E                                  save = pn;                                    *
134          1E                  3                                    pn = pn / 10;                              *
134          1E                  3                                    printn();                                      3
134          1E                  3                                    delay();                                        3
134          1E                  0                                    pn = save ^/ 10;                          3
134          1E                  0                                    printn();                                      0
134          1E                  0                                    delay();                                        0
134          1E                  8                                    pn = pf ^/ 10;                              0
134          1E                  8                                    printn();                                      8
134          1E                  8                                    delay();                                        8



*  Random number (unknown value)

Note that in the chart all values are in hex (so the 134 in 'pf' is actually 308).  But see how it works?  It will print the '3' out first, wait, get the next number and print that out (in this case '0'), wait again, then get the last number, print it out (an '8') and wait for the last time.

Here's another example that displays the number 49:

        VARIABLES                                    COMMAND                                  7-SEG.
pf            save            pn                                                                                          disp.

31            *                *                                printf(49);                                            *
31            *                4                                pn = pf / 10;                                          *
31            4                4                                save = pn;                                              *
31            4                0                                pn = pn / 10;                                          *
31            4                0                                printn();                                                  0
31            4                0                                delay();                                                  0
31            4              4                                  pn = save ^/ 10;                                      0
31            4                4                                printn();                                                  4
31            4              4                                  delay();                                                  4
31            4                9                                pn = pf ^/ 10;                                          4
31            4                9                                printn();                                                  9
31              4              9                                  delay();                                                    9

* Random number (unknown value)               
Please click here

Home Page  |  Walt's Page