Casio Calculator Program Library

Program name: TLGLOBAL (v. 1.1)  --(Back to Index)--

CTF file name: tlglobal.ctf
Author: Tom Lynn
Date: 1995-7
Last update: 18 September 1998
Models: 7000, 7700, 9700, 9800 (9750, 9850, 9950)

Description:

   This is a compilation of useful subroutines which can be used in your own
   programs.  They have been designed so that they do not use any variables
   unless it is absolutely necessary, so if a subroutine's only input is X and Y,
   it should only affect these variables unless stated otherwise.
   
   All subroutines except for +ALPHASET will work with any of the above models.
   +ALPHASET will not work with 9750, 9850 or 9950 calculators.
   
   Contents:
     "+ACVARS"        Sets up variables for direct pixel-editing on any range.
     "+ALPHASET"      Sets A to 1, B to 2, etc.
     "+BOX"           Draws a shadowed box, using "+RECT".
     "+RECT"          Draws a rectangular frame one pixel wide.
     "+RECTFILLED"    Draws a filled rectangle.
     "+THKRECT"       Draws a rectangular frame two pixels wide.
     "+TEXT55"        Draws 5-by-5 pixel characters (A to I).
       "55J~R"          Draws characters J to R.
       "55S~Z"          Draws characters S to Z.
       "55SYMBOLS"      Draws the symbols '"~*/#?.:
     "+TEXT35"        Draws 3-by-5 pixel ASCII characters.
       "35SMALL"        Draws lower-case ASCII characters.
       "35SYMBOLS"      Draws non-alphanumeric ASCII characters.
     "+NUMB35"        Draws numbers of up to three digits, using "+TEXT35".
              

* Graph ranges *

   Any graphical subroutines expect to be used on the standard range unless
   stated otherwise.  On widescreen calculators, this is given by
   
     Range 1,127,0,1,63,0
   
   On non-widescreen calculators, the standard range is given by
   
     Range 1,95,0,1,63,0
   
   Note that 9x50 calculators use the word "ViewWindow" instead of "Range".
              

* Examples of text subroutines *

   Examples of the output from +TEXT35 and +TEXT55 can be seen with the programs
   +TTEST35 and +TTEST55.  You may find it useful to type them in first, so that
   you can test +TEXT35 and +TEXT55 as you type them in.
              
Program source code:
Program "+ACVARS" [Sets up variables for direct pixel-editing on any range.]

   # After using this program, the variables C and F will represent the
   # increment needed to move exactly one pixel horizontally and vertically.
   # This means that the pixel at A+(X-1)C, D+(Y-1)F is the Xth pixel from the
   # left and Y pixels up from the bottom.
   #
   # The 126 should be changed to 94 for use on non-widescreen calcs.
   #
   # % is the CTF symbol for the fractions symbol (eg 1%2%3 = 1 and 2 thirds)
   
   Xmin->A
   Xmax->B
   (B-A)%126->C
   Ymin->D
   Ymax->E
   (E-D)%62->F
              
Program "+ALPHASET" [Sets A to 1, B to 2, etc.]

   25->A
   Lbl 0
   A+1->A[A]
   Dsz A
   Goto 0
   Isz A
              
Program "+BOX" [Draws a shadowed box, using "+RECT".]

   # Top-left pixel at (T,U), bottom-right at (X+1,Y+1).  Only the variables
   # X and Y are changed by this subroutine.
   
   Prog "+RECT"
   U+Y\i->U
   ReP U-2->Y     ;It might appear that this could be simplified to
   Plot X+1,Y     ;"Plot X+1,ReP U-2", but the calc doesn't like it...
   ImP U-1->Y
   Plot X,Y
   Line
   Plot T+2,Y
   Line
   ReP U->U
              
Program "+RECT" [Draws a rectangular frame one pixel wide.]

   # Top-left pixel at (T,U), bottom-right at (X,Y).  Only the variables X
   # and Y are changed by this subroutine.
   
   ReP T+X\i->T
   ReP U+Y\i->U
   Plot X,Y
   ReP T->X
   Plot X,Y
   Line
   ReP U->Y
   Plot X,Y
   Line
   ImP T->X
   Plot X,Y
   Line
   ImP U->Y
   Plot X,Y
   Line
   ReP T->T
   ReP U->U
              
Program "+RECTFILLED" [Draws a filled rectangle.]

   # Top-left pixel at (T,U), bottom-right at (X,Y).  Only the variables X and
   # Y are changed by this subroutine.
   
   T+X\i->T
   Lbl 0
   ImP T->X
   Plot X,Y
   ReP T->X
   Plot X,Y
   Line
   Isz Y
   Y<=U=>Goto 0
   ReP T->T
              
Program "+THKRECT" [Draws a rectangular frame two pixels wide.]

   # Top-left pixel at (T,U), bottom-right at (X,Y).
   
   Prog "+RECT"
   Isz T
   Dsz U
   Plot X-1,Y+1
   Prog "+RECT"
   Isz U
   Dsz T
              
Program "+TEXT55" [Draws 5-by-5 pixel characters A to I.]

   # This, together with its subroutines ("55J~R", "55S~Z" and "55SYMBOLS"),
   # allows the entry of any capital letter and some symbols within a rectangle
   # of 5 x 5 pixels.
   #
   # The symbol code is specified in \r and the bottom-left pixel of the 5 x 5
   # rectangle should be at (A,B).  The symbol code for a capital letter is its
   # position in the alphabet (eg A=1, B=2, C=3, etc.).  Only the variables A,
   # B, X and Y are changed by this subroutine.
   #
   # The program "~TTEST55" in ttest55.ctf will display all of the available
   # characters.
   #
   # Some programs may only use a few characters from this subroutine
   # so you might not need to type in the entire subroutine.
   
   \r>=28=>Goto A
   \r>=19=>Goto B
   \r>9=>Goto C
   \r=0=>Goto 0
   \r=1=>Goto 1
   \r=2=>Goto 2
   \r=3=>Goto 3
   \r=4=>Goto 4
   \r=5=>Goto 5
   \r=6=>Goto 6
   \r=7=>Goto 7
   \r=8=>Goto 8
   \r=9=>Goto 9
   Goto 0
   Lbl A
   Prog "55SYMBOLS"
   Goto 0
   Lbl B
   Prog "55S~Z"
   Goto 0
   Lbl C
   Prog "55J~R"
   Goto 0
   Lbl 1
   Plot A+1,B
   Plot X,B+3
   Line
   Plot A+2,B+4
   Plot A+3,Y
   Plot A+4,B+3
   Plot X,B
   Line
   Plot A+2,B+2
   Plot A+3,Y
   Line
   Goto 0
   Lbl 2
   Plot A+1,B
   Plot X,B+4
   Line
   Plot A+3,Y
   Line
   Plot A+4,B+3
   Plot A+2,B+2
   Plot A+3,Y
   Plot A+4,B+1
   Plot A+3,B
   Plot A+1,B
   Line
   Goto 0
   Lbl 3
   Plot A+4,B+3
   Plot A+3,B+4
   Plot A+2,Y
   Plot A+1,B+3
   Plot X,B+1
   Line
   Plot A+2,B
   Plot A+3,B
   Plot A+4,B+1
   Line
   Goto 0
   Lbl 4
   Plot A+1,B
   Plot X,B+4
   Line
   Plot A+3,Y
   Line
   Plot A+4,B+3
   Plot X,B+1
   Line
   Plot A+3,B
   Plot A+1,B
   Line
   Goto 0
   Lbl 5
   Plot A+4,B
   Plot A+1,B
   Line
   Lbl 6
   Plot A+1,B
   Plot X,B+4
   Line
   Plot A+4,Y
   Line
   Plot A+2,B+2
   Plot A+3,Y
   Line
   Goto 0
   Lbl 7
   Plot A+4,B+4
   Plot A+2,Y
   Line
   Plot A+1,B+3
   Plot X,B+1
   Line
   Plot A+2,B
   Plot A+3,B
   Plot A+4,B+1
   Plot A+4,B+2
   Plot A+3,Y
   Line
   Goto 0
   Lbl 8
   Plot A+1,B
   Plot X,B+4
   Line
   Plot X,B+2
   Plot A+4,Y
   Line
   Plot X,B+4
   Plot X,B
   Line
   Goto 0
   Lbl 9
   Plot A+1,B+4
   Plot A+3,Y
   Line
   Plot A+2,Y
   Plot X,B
   Line
   Plot A+1,B
   Plot A+3,B
   Line
   Lbl 0
              
Program "55J~R" [Draws 5-by-5 pixel characters J to R.]

   \r=10=>Goto 0
   \r=11=>Goto 1
   \r=12=>Goto 2
   \r=13=>Goto 3
   \r=14=>Goto 4
   \r=15=>Goto 5
   \r=16=>Goto 6
   \r=17=>Goto 7
   \r=18=>Goto 8
   Goto 9
   Lbl 0
   Plot A+2,B+4
   Plot A+4,Y
   Plot A+3,Y
   Plot X,B+1
   Line
   Plot A+2,B
   Plot A+1,B+1
   Line
   Goto 9
   Lbl 1
   Plot A+1,B
   Plot X,B+4
   Line
   Plot A+4,Y
   Plot A+2,B+2
   Line
   Plot A+4,B
   Line
   Goto 9
   Lbl 2
   Plot A+1,B+4
   Plot X,B
   Line
   Plot A+4,B
   Line
   Goto 9
   Lbl 3
   Plot A,B
   Plot A,B+4
   Line
   Plot A+2,B+2
   Line
   Plot A+4,B+4
   Line
   Plot X,B
   Line
   Goto 9
   Lbl 4
   Plot A,B
   Plot A,B+4
   Line
   Plot A+4,B
   Line
   Plot X,B+4
   Line
   Goto 9
   Lbl 5
   Plot A+1,B+4
   Plot A+3,Y
   Line
   Plot A+4,B+3
   Plot X,B+1
   Line
   Plot A+3,B
   Plot A+1,B
   Line
   Plot A,B+1
   Plot A,B+3
   Line
   Goto 9
   Lbl 8
   Plot A+4,B+1
   Plot X,B
   Lbl 6
   Plot A+1,B
   Plot X,B+4
   Line
   Plot A+3,Y
   Line
   Plot A+4,B+3
   Plot A+3,B+2
   Plot A+2,Y
   Line
   Goto 9
   Lbl 7
   Plot A+2,B
   Plot A+1,B
   Plot A,B+1
   Plot A,B+3
   Line
   Plot A+1,B+4
   Plot A+2,Y
   Plot A+3,B+3
   Plot X,B+1
   Line
   Plot A+4,B
   Line
   Goto 9
   Lbl 9
              
Program "55S~Z" [Draws 5-by-5 pixel characters S to Z.]

   \r=19=>Goto 9
   \r=20=>Goto 0
   \r=21=>Goto 1
   \r=22=>Goto 2
   \r=23=>Goto 3
   \r=24=>Goto 4
   \r=25=>Goto 5
   \r=26=>Goto 6
   \r=27=>Goto 7
   Goto 8
   Lbl 9
   Plot A+4,B+4
   Plot A+1,Y
   Line
   Plot A,B+3
   Plot A+1,B+2
   Plot A+3,Y
   Line
   Plot A+4,B+1
   Plot A+3,B
   Plot A,B
   Line
   Goto 8
   Lbl 0
   Plot A,B+4
   Plot A+4,Y
   Line
   Plot A+2,B+4
   Plot X,B
   Line
   Goto 8
   Lbl 1
   Plot A+1,B+4
   Plot X,B+1
   Line
   Plot A+2,B
   Plot A+3,B
   Plot A+4,B+1
   Plot X,B+4
   Line
   Goto 8
   Lbl 2
   Plot A,B+4
   Plot A,B+2
   Line
   Plot A+2,B
   Line
   Plot A+4,B+2
   Line
   Plot X,B+4
   Line
   Goto 8
   Lbl 3
   Plot A,B+4
   Plot A,B
   Line
   Plot A+2,B+2
   Line
   Plot A+4,B
   Line
   Plot X,B+4
   Line
   Goto 8
   Lbl 4
   Plot A,B+4
   Plot A+4,B
   Line
   Plot A,B
   Plot A+4,B+4
   Line
   Goto 8
   Lbl 5
   Plot A,B+4
   Plot A+2,B+2
   Line
   Plot A+4,B+4
   Line
   Plot A+2,B+2
   Plot X,B
   Line
   Goto 8
   Lbl 6
   Plot A,B+4
   Plot A+4,Y
   Line
   Plot A,B
   Line
   Plot A+4,B
   Line
   Goto 8
   Lbl 7
   Plot A+2,B+4
   Plot X,B+2
   Line
   Plot X,B
   Lbl 8
              
Program "55SYMBOLS" [Draws the 5-by-5 pixel symbols '"~*/#?.:]

   \r=28=>Goto 8
   \r=29=>Goto 9
   \r=30=>Goto 0
   \r=31=>Goto 1
   \r=32=>Goto 2
   \r=33=>Goto 3
   \r=34=>Goto 4
   \r=35=>Goto 5
   \r=36=>Goto 6
   Goto 7
   Lbl 8
   '       '
   Plot A+3,B+4
   Plot A+2,B+3
   Goto 7
   Lbl 9
   ' ""
   Plot A+1,B+4
   Plot X,B+3
   Plot A+3,Y
   Plot X,B+4
   Goto 7
   Lbl 0
   ' ~
   Plot A+1,B+2
   Plot A+3,Y
   Plot A+2,B+3
   Plot A+4,Y
   Goto 7
   Lbl 1
   ' \*
   Plot A+1,B+1
   Plot A+3,B+3
   Plot A+1,Y
   Plot A+3,B+1
   Line
   Goto 7
   Lbl 2
   ' \/
   Plot A+1,B+1
   Plot A+4,B+4
   Line
   Goto 7
   Lbl 3
   ' #
   Plot A+1,B+4
   Plot X,B
   Line
   Plot A+3,B+4
   Plot X,B
   Line
   Plot A,B+3
   Plot A+4,Y
   Line
   Plot A,B+1
   Plot A+4,Y
   Line
   Goto 7
   Lbl 4
   ' ?
   Plot A+1,B+3
   Plot A+2,B+4
   Plot A+3,Y
   Plot A+4,B+3
   Plot A+3,B+2
   Plot X,B
   Plot X,B
   Goto 7
   Lbl 5
   ' .
   Plot A+1,B
   Goto 7
   Lbl 6
   ' Colon
   Plot A+1,B+3
   Plot A+1,B+1
   Lbl 7
              
Program "+TEXT35" [Draws ASCII characters.]

   # This, together with its two subroutines ("35SMALL" and "35SYMBOLS"),
   # allows the entry of (almost) any printable ASCII character within a
   # rectangle of 3 x 5 pixels.
   #
   # The ASCII code is specified in \r and the top-left pixel of the 3 x 5
   # rectangle should be at (X,Y).  Due to some slight tweaking, if you use
   # a capital letter or numeric digit, the top-left pixel will always be black,
   # so you can use a "Plot" command to set the values of X and Y.  Only the
   # variables X and Y are changed by this subroutine.
   #
   # The program "~TTEST35" in ttest35.ctf will display all of the available
   # characters.
   #
   # Some programs may only use a few characters from this subroutine
   # so you might not need to type in the entire subroutine.
   
   \r>=48=>\r<=57=>Goto A
   \r>=65=>\r<=90=>Goto A
   \r>96=>Prog "35SMALL"
   \r>96=>Goto \th
   Prog "35SYMBOLS"
   Goto \th
   Lbl A
   Plot X,Y
   \r>=64=>Goto O
   \r>=75=>Goto R
   \r>=83=>Goto \r
   \r=48=>Goto N
   \r=49=>Goto 1
   \r=50=>Goto 2
   \r=51=>Goto 3
   \r=52=>Goto 4
   \r=53=>Goto 5
   \r=54=>Goto 5
   \r=55=>Goto 7
   \r=56=>Goto N
   \r=57=>Goto 7
   Lbl O
   \r=65=>Goto N
   \r=66=>Goto N
   \r=67=>Goto C
   \r=68=>Goto D
   \r=69=>Goto F
   \r=70=>Goto F
   \r=71=>Goto G
   \r=72=>Goto H
   \r=73=>Goto I
   \r=74=>Goto I
   Lbl R
   \r=75=>Goto X
   \r=76=>Goto L
   \r=77=>Goto H
   \r=78=>Goto N
   \r=79=>Goto N
   \r=80=>Goto P
   \r=81=>Goto Q
   \r=82=>Goto X
   Lbl \r
   \r=83=>Goto 5
   \r=84=>Goto I
   \r=85=>Goto U
   \r=86=>Goto V
   \r=87=>Goto H
   \r=88=>Goto X
   \r=89=>Goto X
   \r=90=>Goto Z
   Goto \th
   Lbl C
   Plot X+2,Y
   Plot X-2,Y
   Line
   Plot X,Y-4
   Line
   Plot X+2,Y
   Line
   Goto \th
   Lbl D
   Plot X,Y-4
   Line
   Plot X+1,Y
   Plot X+1,Y+1
   Plot X,Y+2
   Line
   Plot X-1,Y+1
   Plot X-1,Y
   Goto \th
   Lbl F
   Plot X+2,Y
   Plot X-2,Y
   Line
   Plot X,Y-2
   Line
   Plot X+2,Y
   Line
   Plot X-2,Y
   Plot X,Y-2
   Line
   \r<>69=>Goto \th
   Plot X+2,Y
   Line
   Goto \th
   Lbl G
   Plot X+2,Y
   Plot X-2,Y
   Line
   Plot X,Y-4
   Line
   Plot X+2,Y
   Line
   Plot X,Y+2
   Line
   Goto \th
   Lbl H
   Plot X,Y-4
   Line
   Plot X+2,Y+4
   Plot X,Y-4
   Line
   \r=72=>Plot X-1,Y+2
   \r=77=>Plot X-1,Y+3
   \r=87=>Plot X-1,Y+1
   Goto \th
   Lbl I
   Plot X+2,Y
   Plot X-1,Y
   Plot X,Y-4
   Line
   \r=84=>Goto \th
   Plot X-1,Y
   \r=73=>Plot X+2,Y
   Goto \th
   Lbl L
   Plot X,Y-4
   Line
   Plot X+2,Y
   Line
   Goto \th
   Lbl N
   Plot X,Y-4
   Plot X,Y+4
   Line
   Plot X+2,Y
   Line
   Plot X,Y-4
   Line
   \r=48=>Goto 0
   \r=56=>Goto 0
   \r=66=>Goto 0
   \r=79=>Goto 0
   \r=65=>Plot X-1,Y+2
   Goto \th
   Lbl P
   Plot X,Y-4
   Plot X,Y+4
   Line
   Plot X+2,Y
   Line
   Plot X,Y-2
   Line
   Plot X-2,Y
   Line
   Goto \th
   Lbl Q
   Plot X,Y-3
   Plot X,Y+3
   Line
   Plot X+2,Y
   Line
   Plot X,Y-2
   Line
   Plot X-1,Y-1
   Plot X+1,Y-1
   Goto \th
   Lbl U
   Plot X,Y-4
   Line
   Plot X+2,Y
   Line
   Plot X,Y+4
   Line
   Goto \th
   Lbl V
   Plot X,Y-3
   Line
   Plot X+1,Y-1
   Plot X+1,Y+1
   Plot X,Y+3
   Line
   Goto \th
   Lbl X
   Plot X,Y-1
   Plot X+2,Y
   Plot X,Y+1
   Plot X-1,Y-2
   \r=89=>Goto Y
   Plot X-1,Y-1
   Plot X,Y-1
   Plot X+2,Y+1
   Plot X,Y-1
   \r=75=>Plot X-2,Y+2
   \r=82=>Plot X-2,Y+2
   \r=82=>Plot X+1,Y+2
   Goto \th
   Lbl Y
   Plot X,Y-2
   Line
   Goto \th
   Lbl Z
   Plot X+2,Y
   Line
   Plot X,Y-1
   Plot X-2,Y-2
   Line
   Plot X,Y-1
   Plot X+2,Y
   Line
   Goto \th
   Lbl 0
   Plot X-2,Y
   Line
   \r=56=>Plot X+1,Y+2
   \r=66=>Plot X+1,Y+2
   Goto \th
   Lbl 1
   Plot 1+X,Y
   Plot X,Y-4
   Line
   Plot X-1,Y
   Plot X+2,Y
   Goto \th
   Lbl 2
   Plot X+2,Y
   Line
   Plot X,Y-2
   Line
   Plot X-2,Y
   Line
   Plot X,Y-2
   Line
   Plot X+2,Y
   Line
   Goto \th
   Lbl 3
   Plot X+2,Y
   Line
   Plot X,Y-4
   Line
   Plot X-2,Y
   Line
   Plot X,Y+2
   Plot X+1,Y
   Goto \th
   Lbl 4
   Plot X,Y-3
   Line
   Plot X+1,Y
   Plot X+1,Y+3
   Plot X,Y-4
   Line
   Goto \th
   Lbl 5
   Plot X+2,Y
   Plot X-2,Y
   Line
   Plot X,Y-2
   Line
   Plot X+2,Y
   Line
   Plot X,Y-2
   Line
   Plot X-2,Y
   Line
   \r<>54=>Goto \th
   Plot X,Y+2
   Line
   Goto \th
   Lbl 7
   Plot X+2,Y
   Line
   Plot X,Y-4
   Line
   \r=57=>Goto 9
   Goto \th
   Lbl 9
   Plot X,Y+2
   Plot X-2,Y
   Line
   Plot X,Y+2
   Line
   Goto \th
   Lbl \th
   Plot 0,0
              
Program "35SMALL" [Draws lower-case ASCII characters.]

   # This is a subroutine of "+TEXT35".  It contains code to draw the
   # lower-case letters.  If your program does not use lower-case letters it
   # can be excluded without affecting "+TEXT35".  Only the variables X and
   # Y are changed by this subroutine.
   
   \r<101=>Goto P
   \r<105=>Goto \r
   \r<109=>Goto E
   \r<113=>Goto J
   \r<117=>Goto R
   \r<121=>Goto Q
   \r<123=>Goto W
   Goto \th
   Lbl P
   \r=97=>Goto A
   \r=98=>Goto B
   \r=99=>Goto C
   \r=100=>Goto D
   Goto \th
   Lbl \r
   \r=101=>Goto C
   \r=102=>Goto F
   \r=103=>Goto G
   \r=104=>Goto H
   Goto \th
   Lbl E
   \r=105=>Goto I
   \r=106=>Goto I
   \r=107=>Goto K
   \r=108=>Goto L
   Goto \th
   Lbl J
   \r=109=>Goto N
   \r=110=>Goto N
   \r=111=>Goto N
   \r=112=>Goto N
   Goto \th
   Lbl R
   \r=113=>Goto N
   \r=114=>Goto N
   \r=115=>Goto S
   \r=116=>Goto T
   Goto \th
   Lbl Q
   \r=117=>Goto U
   \r=118=>Goto V
   \r=119=>Goto U
   \r=120=>Goto X
   Goto \th
   Lbl W
   \r=121=>Goto Y
   \r=122=>Goto Z
   Goto \th
   Lbl A
   Plot X,Y-2
   Plot X,Y-1
   Plot X+2,Y
   Line
   Plot X,Y+2
   Line
   Plot X-1,Y
   Goto \th
   Lbl B
   Plot X,Y
   Plot X,Y-3
   Line
   Plot X+2,Y
   Line
   Plot X,Y+1
   Plot X-1,Y+1
   Goto \th
   Lbl C
   Plot X+2,Y-1
   Plot X-1,Y
   Plot X-1,Y-1
   Plot X,Y-1
   Plot X+2,Y
   Line
   \r=101=>Plot X-1,Y+1
   Goto \th
   Lbl D
   Plot X+2,Y
   Plot X,Y-3
   Line
   Plot X-2,Y
   Line
   Plot X,Y+1
   Plot X+1,Y+1
   Goto \th
   Lbl F
   Plot X+2,Y
   Plot X-1,Y-1
   Plot X,Y-2
   Line
   Plot X-1,Y+1
   Plot X+2,Y
   Goto \th
   Lbl G
   Plot X+1,Y-2
   Plot X-1,Y
   Plot X,Y+1
   Plot X+2,Y
   Line
   Lbl O
   Plot X,Y-2
   Line
   Plot X-1,Y-1
   Plot X-1,Y
   Goto \th
   Lbl H
   Plot X,Y
   Plot X,Y-3
   Line
   Plot X+1,Y+2
   Plot X+1,Y-1
   Plot X,Y-1
   Goto \th
   Lbl I
   Plot X+1,Y
   Plot X,Y-2
   Plot X,Y-1
   \r=106=>Plot X-1,Y-1
   Goto \th
   Lbl K
   Plot X,Y
   Plot X,Y-3
   Line
   Plot X+1,Y+2
   Plot X,Y-1
   Plot X+1,Y-1
   Goto \th
   Lbl L
   Plot X+1,Y
   Plot X,Y-2
   Line
   Plot X+1,Y-1
   Goto \th
   Lbl M
   Plot X+1,Y
   \r=114=>Goto \th
   Plot X,Y-2
   Line
   \r=109=>Plot X-1,Y+1
   \r>=111=>Plot X-2,Y
   Line
   \r=113=>Plot X+2,Y-1
   Goto \th
   Lbl N
   Plot X,Y-3
   Plot X,Y+2
   Line
   Plot X+1,Y
   \r<>110=>\r<>112=>Goto M
   Plot X+1,Y-1
   Plot X,Y-1
   \r=112=>Plot X-2,Y
   Line
   \r=112=>Plot X,Y-1
   Goto \th
   Lbl S
   Plot X+2,Y-1
   Plot X-1,Y
   Plot X,Y-2
   Line
   Plot X-1,Y
   Goto \th
   Lbl T
   Plot X+1,Y
   Plot X,Y-2
   Line
   Plot X+1,Y-1
   Plot X,Y+2
   Plot X-2,Y
   Goto \th
   Lbl U
   Plot X,Y-1
   Plot X,Y-2
   Line
   Plot X+2,Y
   Line
   Plot X,Y+2
   Line
   \r=119=>Plot X-1,Y-1
   Goto \th
   Lbl V
   Plot X,Y-1
   Plot X,Y-1
   Plot X+1,Y-1
   Plot X+1,Y+1
   Plot X,Y+1
   Goto \th
   Lbl X
   Plot X,Y-1
   Plot X+2,Y-2
   Line
   Plot X-2,Y
   Plot X+2,Y+2
   Goto \th
   Lbl Y
   Plot X+1,Y-2
   Plot X-1,Y+1
   Plot X+2,Y
   Goto O
   Lbl Z
   Plot X,Y-1
   Plot X+1,Y
   Plot X,Y-2
   Line
   Plot X+1,Y
   Lbl \th
              
Program "35SYMBOLS" [Draws non-alphanumeric ASCII characters.]

   # This is a subroutine of "+TEXT35".  It contains code to draw the non-
   # alpha-numeric ASCII characters.  If your program uses only text or numbers
   # it can be excluded without affecting "+TEXT35".  Only the variables X and
   # Y are changed by this subroutine.
   
   \r=32=>Goto \th
   \r=33=>Goto 0
   \r=34=>Goto 1
   \r=35=>Goto 2
   \r=36=>Goto 3
   \r=37=>Goto 4
   \r=39=>Goto 6
   \r=40=>Goto 7
   \r=41=>Goto 8
   \r=42=>Goto 9
   \r=43=>Goto A
   \r=44=>Goto B
   \r=45=>Goto C
   \r=46=>Goto D
   \r=47=>Goto E
   \r=58=>Goto F
   \r=59=>Goto F
   \r=60=>Goto G
   \r=61=>Goto H
   \r=62=>Goto I
   \r=63=>Goto J
   \r=64=>Goto K
   \r=91=>Goto L
   \r=92=>Goto M
   \r=93=>Goto N
   \r=94=>Goto O
   \r=95=>Goto P
   \r=96=>Goto Q
   Goto \th
   Lbl 0
   '!
   Plot X,Y
   Plot X,Y-2
   Line
   Plot X,Y-2
   Goto \th
   Lbl 1
   '""
   Plot X,Y
   Plot X,Y-1
   Plot X+2,Y+1
   Plot X,Y-1
   Goto \th
   Lbl 2
   'Hash
   Plot X,Y
   Plot X,Y-4
   Line
   Plot X+1,Y+1
   Plot X,Y+2
   Plot X+1,Y+1
   Plot X,Y-4
   Line
   Goto \th
   Lbl 3
   'Dollar
   Plot X+2,Y
   Plot X-2,Y-1
   Plot X+2,Y-1
   Plot X-2,Y-1
   Plot X+1,Y-1
   Plot X,Y+4
   Line
   Goto \th
   Lbl 4
   ' '\/,
   Plot X,Y
   Plot X,Y-3
   Plot X+2,Y+2
   Line
   Plot X,Y-3
   Goto \th
   Lbl 6
   '
   Plot X+1,Y
   Plot X-1,Y-1
   Goto \th
   Lbl 7
   '(
   Plot X+2,Y
   Plot X-1,Y-1
   Plot X,Y-2
   Line
   Plot X+1,Y-1
   Goto \th
   Lbl 8
   ')
   Plot X,Y
   Plot X+1,Y-1
   Plot X,Y-2
   Line
   Plot X-1,Y-1
   Goto \th
   Lbl 9
   '\*
   Plot X,Y-1
   Plot X+2,Y-2
   Line
   Plot X,Y+2
   Plot X-2,Y-2
   Goto \th
   Lbl A
   '+
   Plot X,Y-2
   Plot X+2,Y
   Plot X-1,Y+1
   Plot X,Y-2
   Line
   Goto \th
   Lbl B
   ',
   Plot X+1,Y-3
   Plot X-1,Y-1
   Goto \th
   Lbl C
   '(-)
   Plot X,Y-2
   Plot X+2,Y
   Line
   Goto \th
   Lbl D
   '.
   Plot X,Y-4
   Goto \th
   Lbl E
   '\/
   Plot X,Y-3
   Plot X+2,Y+2
   Line
   Goto \th
   Lbl F
   'Colon
   Plot X+1,Y-1
   Plot X,Y-2
   \r=58=>Goto \th
   ';
   Plot X-1,Y-1
   Goto \th
   Lbl G
   '<
   Plot X+2,Y
   Plot X-2,Y-2
   Line
   Plot X+2,Y-2
   Line
   Goto \th
   Lbl H
   '=
   Plot X,Y-1
   Plot X+2,Y
   Line
   Plot X,Y-2
   Plot X-2,Y
   Line
   Goto \th
   Lbl I
   '>
   Plot X,Y
   Plot X+2,Y-2
   Line
   Plot X-2,Y-2
   Line
   Goto \th
   Lbl J
   '?
   Plot X,Y
   Plot X+2,Y
   Line
   Plot X,Y-2
   Line
   Plot X-2,Y
   Line
   Plot X,Y-2
   Goto \th
   Lbl K
   'At
   Plot X+2,Y-4
   Plot X-2,Y
   Line
   Plot X,Y+4
   Line
   Plot X+2,Y
   Line
   Plot X,Y-2
   Line
   Goto \th
   Lbl L
   '[
   Plot X+1,Y
   Plot X-1,Y
   Plot X,Y-4
   Line
   Plot X+1,Y
   Goto \th
   Lbl M
   'Back\/
   Plot X,Y-1
   Plot X+2,Y-2
   Line
   Goto \th
   Lbl N
   ']
   Plot X,Y
   Plot X+1,Y
   Plot X,Y-4
   Line
   Plot X-1,Y
   Goto \th
   Lbl O
   '^
   Plot X,Y-1
   Plot X+1,Y+1
   Plot X+1,Y-1
   Goto \th
   Lbl P
   'Underscore
   Plot X,Y-4
   Plot X+2,Y
   Line
   Goto \th
   Lbl Q
   'Back'
   Plot X,Y
   Plot X+1,Y-1
   Lbl \th
              
Program "+NUMB35" [Draws numbers of up to three digits, using "+TEXT35".]

   # This takes a number with up to three digits in \r and plots it on the
   # screen using "+TEXT35".  The top-left pixel of the number should be at
   # (T,U).  Only the variables X and Y are changed by this subroutine.
   
   T->X
   X+\r\i->T
   U->Y
   Int (\r/(10^)2->\r
   \r=0=>Goto 0
   \r+48->\r
   Prog "+TEXT35"
   Lbl 0
   Int (10Frac (.01(ImP T->\r
   ReP T+4->X
   ImP T<10=>Goto 1
   \r+48->\r
   U->Y
   Prog "+TEXT35"
   Lbl 1
   48+10Frac (.1(ImP T->\r
   ReP T+8->X
   U->Y
   Prog "+TEXT35"
   ImP T->\r
   ReP T->T
              


This page was created by Tom Lynn (tom-calcs@mythic-beasts.com).
This page last updated: Friday, 30 April, 1999

Written in notepad and compiled with WTA, for clean, consistent HTML.
Part of the Casio Graphical Calculator Encyclopaedia.

Best Viewed With Any Browser