%%HP: T(3)A(D)F(.);
DIR
  JHBS
    DIR
      JH100 { 100
90.714444444 100
21550.3587085
27978.7881742 0 }
    END
  PPAR {
(-6.5,-3.1)
(6.5,3.2) X 0 (0,0)
FUNCTION Y }
  SETUP
    \<< -57 CF -3 SF
-40 CF CLLCD
"    Control Point"
3 DISP
"      Jump Hub" 5
DISP 2 FREEZE { ""
CP "" "" JH "" }
TMENU -1 WAIT \-> k
      \<< 1 MENU k
EVAL
        IF 12.1
SAME
        THEN
"Instrument North ?"
INNO 4 FIX \->STR {
-5 1 } V 3 \->LIST
INPUT OBJ\-> 'INNO'
STO
"Instrument East ?"
INEA 4 FIX \->STR {
-5 1 } V 3 \->LIST
INPUT OBJ\-> 'INEA'
STO
        ELSE k EVAL
          IF 15.1
SAME
          THEN JHBS
2 MENU "Jump Hub ?"
"" INPUT OBJ\-> EVAL
UPDIR 1.02 MENU
'ELEV' STO 'INEA'
STO 'INNO' STO
'DIST' STO 'AZ' STO
            IF AZ
180 >
            THEN
'AZ' 180 STO-
            ELSE
'AZ' 180 STO+
            END AZ
\->HMS 6 FIX 'AZ' STO
"BS \<)   = " AZ
            IF 27
FC?
            THEN
DUP 180
              IF <
              THEN
180 HMS+
              ELSE
180 HMS-
              END
            END IP
0 RND STD \->STR "\^o"
AZ FP 10 SQ * IP 0
RND DUP 10
            IF <
            THEN
"0" SWAP \->STR +
            ELSE
\->STR
            END "'"
AZ 10 SQ * FP 10 SQ
* 2 FIX 2 RND DUP
10
            IF <
            THEN
"0" SWAP \->STR +
            ELSE
\->STR
            END + +
+ + + CLLCD 3 DISP
"DIST   = " DIST 3
FIX \->STR + 5 DISP
"ELEV   = " ELEV 3
FIX + 7 DISP 2
FREEZE DROP
          END
        END
      \>>
    \>>
  PARAM
    \<< "Parameters"
{ { "Distances"
DTYP } { "Azimuths"
AZTYP } {
"Clear old Jumps"
      \<< JHBS VARS
PURGE UPDIR 1 MENU
      \>> } { "Exit"
      \<< 1 MENU
      \>> } } 1
CHOOSE 1
      IF ==
      THEN EVAL
      ELSE 1 MENU
      END CLEAR
    \>>
  AZ.TIE
    \<< -3 SF
"Northing ?" ""
INPUT OBJ\-> DUP
'NOR' STO INNO -
"Easting ?" ""
INPUT OBJ\-> DUP
'EAST' STO INEA - \->
Y X
      \<< Y X \->V2 -16
SF V\-> -16 CF 180 +
\->HMS 'AZ' STO
'DIST' STO INNO 'Y'
STO+ INEA 'X' STO+
CLLCD 3000 .1 BEEP
        DO
"   \<)  = " AZ
          IF 27 FC?
          THEN DUP
180
            IF <
            THEN
180 +
            ELSE
180 -
            END
          END IP 0
RND STD \->STR "\^o" AZ
FP 10 SQ * IP 0 RND
'A' STO
          IF A 10 <
          THEN "0"
A \->STR +
          ELSE A
\->STR
          END "'"
AZ 10 SQ * FP 10 SQ
* 2 FIX 2 RND 'A'
STO
          IF A 10 <
          THEN "0"
A \->STR +
          ELSE A
\->STR
          END + + +
+ + 'A' PURGE 1
DISP "DIST  = "
DIST 3 FIX \->STR + 3
DISP "NORTH = " Y 4
FIX \->STR + 5 DISP
"EAST  = " X 4 FIX
\->STR + 7 DISP
        UNTIL KEY
        END 51 SAME
DROP
      \>> { X Y }
PURGE
    \>>
  INNO
6570.29159304
  INEA
17106.9939035
  TANGENT
    DIR
      PPAR {
(-6.5,-3.1)
(6.5,3.2) X 0 (0,0)
FUNCTION Y }
      STA
-201.199623351
      AZ 210.25
      DIST 1402.14
      OFST .001
      NOR
7781.50990831
      EAST
17813.3555477
      TNAZ 210.25
      PC 201.0501
      PT 187.1782
      PTNO 6570.29
      PTEA
17106.992
      CST { {
"DATA" {
        \<< 21 SF
DATA 1.02 MENU
        \>> } } {
"PARAM" {
        \<< PARAM
TANGENT 1 MENU
        \>> } } {
"SETUP" {
        \<< UPDIR
SETUP TANGENT 1.02
MENU
        \>> } } {
"\<) TIE" {
        \<< AZ.TIE
1.02 MENU
        \>> } } { ""
} { "JUMP" {
        \<< UPDIR
JUMP TANGENT 1.02
MENU
        \>> } } {
"TIES" {
        \<< 11 SF 12
CF 13 CF 16 CF 14
CF PT PC TIES 11 CF
        \>> } } {
"STA" {
        \<< STA 100 *
3 FIX
        \>> } } {
"OFST" {
        \<< OFST 3
FIX
        \>> } } { "\<)"
{
        \<< AZ
          IF 27 FC?
          THEN DUP
180
            IF \<=
            THEN
180 HMS+
            ELSE
180 HMS-
            END
          END 5 FIX
        \>> } } {
"DIST" {
        \<< DIST 3
FIX
        \>> } } {
"RNDM" {
        \<< 11 SF 12
CF 13 CF RNDM 11 CF
        \>> } } {
"UPDAT" {
        \<< 21 SF
UPDATE
        \>> } } {
"SP-IN" {
        \<< 11 CF 12
CF SPIRAL.IN 1.02
MENU
        \>> } } {
"CURVE" {
        \<< 11 CF 13
CF CURVE 1.02 MENU
        \>> } } {
"SP-OU" {
        \<< 11 CF 12
CF SPIRAL.OUT 1.02
MENU
        \>> } } {
"CPSP" {
        \<< 11 CF 12
CF COMP.SPIRAL 1.02
MENU
        \>> } } {
"EXIT" {
        \<< UPDIR
        \>> } } }
    END
  SPIRAL.IN
    DIR
      STA 5001.8487
      AZ
319.1945971
      DIST
264.589457649
      OFST 0
      NOR
19965.22663
      EAST
30034.9815825
      DC
-8.18511111111
      LS 1
      TNAZ
319.844833333
      PSEA
29968.7094
      PSNO
20040.0829
      PS 5000.8487
      CST { {
"DATA" {
        \<< 23 SF
DATA 1.02 MENU
        \>> } } {
"PARAM" {
        \<< PARAM
SPIRAL.IN 1 MENU
        \>> } } {
"SETUP" {
        \<< UPDIR
SETUP SPIRAL.IN
1.02 MENU
        \>> } } {
"\<) TIE" {
        \<< AZ.TIE
1.02 MENU
        \>> } } { ""
} { "JUMP" {
        \<< UPDIR
JUMP SPIRAL.IN 1.02
MENU
        \>> } } {
"TIES" {
        \<< 13 SF 11
CF 12 CF 16 CF 14
CF PSNO PSEA \->V2 PS
PS PS LS + TIES 13
CF
        \>> } } {
"STA" {
        \<< STA 100 *
4 FIX
        \>> } } {
"OFST" {
        \<< OFST 3
FIX
        \>> } } { "\<)"
{
        \<< AZ
          IF 27 FC?
          THEN DUP
180
            IF \<=
            THEN
180 HMS+
            ELSE
180 HMS-
            END
          END 5 FIX
        \>> } } {
"DIST" {
        \<< DIST 3
FIX
        \>> } } {
"RNDM" {
        \<< 13 SF 11
CF 12 CF DC PS PSNO
PSEA \->V2 INNO INEA
\->V2 RNDM 13 CF
        \>> } } {
"UPDAT" {
        \<< 23 SF
UPDATE
        \>> } } {
"TAN" {
        \<< 12 CF 13
CF TANGENT 1.02
MENU
        \>> } } {
"CURVE" {
        \<< 11 CF 13
CF CURVE 1.02 MENU
        \>> } } {
"SP-OU" {
        \<< 11 CF 12
CF SPIRAL.OUT 1.02
MENU
        \>> } } {
"CPSP" {
        \<< 11 CF 12
CF COMP.SPIRAL 1.02
MENU
        \>> } } {
"EXIT" {
        \<< UPDIR
        \>> } } }
    END
  CURVE
    DIR
      STA
4999.202471
      AZ
248.100000542
      DIST
1132.9699583
      OFST 0
      NOR 8202.8655
      EAST
18865.0536
      DC
50.7042305556
      DELTA
82.7275583333
      ENDST
4999.20247112
      TNAZ
237.117308333
      PCEA
29714.8318266
      PCNO
20187.9371202
      PC 4997.5709
      CST { {
"DATA" {
        \<< 22 SF
DATA 1.02 MENU
        \>> } } {
"PARAM" {
        \<< PARAM
CURVE 1 MENU
        \>> } } {
"SETUP" {
        \<< UPDIR
SETUP CURVE 1.02
MENU
        \>> } } {
"\<) TIE" {
        \<< AZ.TIE
1.02 MENU
        \>> } } { ""
} { "JUMP" {
        \<< UPDIR
JUMP CURVE 1.02
MENU
        \>> } } {
"TIES" {
        \<< 12 SF 11
CF 13 CF 16 CF 14
CF PC ENDST TIES 12
CF
        \>> } } {
"STA" {
        \<< STA 100 *
4 FIX
        \>> } } {
"OFST" {
        \<< OFST 3
FIX
        \>> } } { "\<)"
{
        \<< AZ
          IF 27 FC?
          THEN DUP
180
            IF \<=
            THEN
180 HMS+
            ELSE
180 HMS-
            END
          END 5 FIX
        \>> } } {
"DIST" {
        \<< DIST 3
FIX
        \>> } } {
"RNDM" {
        \<< 12 SF 11
CF 13 CF RNDM 12 CF
        \>> } } {
"UPDAT" {
        \<< 22 SF
UPDATE 1.02 MENU
        \>> } } {
"TAN" {
        \<< 12 CF 13
CF TANGENT 1.02
MENU
        \>> } } {
"SP-IN" {
        \<< 11 CF 12
CF SPIRAL.IN 1.02
MENU
        \>> } } {
"SP-OU" {
        \<< 11 CF 12
CF SPIRAL.OUT 1.02
MENU
        \>> } } {
"CPSP" {
        \<< 11 CF 12
CF COMP.SPIRAL 1.02
MENU
        \>> } } {
"EXIT" {
        \<< UPDIR
        \>> } } }
    END
  SPIRAL.OUT
    DIR
      CST { {
"DATA" {
        \<< 24 SF
DATA 1.02 MENU
        \>> } } {
"PARAM" {
        \<< PARAM
SPIRAL.OUT 1 MENU
        \>> } } {
"SETUP" {
        \<< UPDIR
SETUP SPIRAL.OUT
1.02 MENU
        \>> } } {
"\<) TIE" {
        \<< AZ.TIE
1.02 MENU
        \>> } } { ""
} { "JUMP" {
        \<< UPDIR
JUMP SPIRAL.OUT
1.02 MENU
        \>> } } {
"TIES" {
        \<< 11 CF 12
CF 13 SF 16 CF 14
CF PSTNO PSTEA \->V2
PST PST LS NEG -
PST TIES 13 CF
        \>> } } {
"STA" {
        \<< STA 100 *
        \>> } } {
"OFST" {
        \<< OFST 3
FIX
        \>> } } { "\<)"
{
        \<< AZ
          IF 27 FC?
          THEN DUP
180
            IF <
            THEN
180 HMS+
            ELSE
180 HMS-
            END
          END 5 FIX
        \>> } } {
"DIST" {
        \<< DIST 3
FIX
        \>> } } {
"RNDM" {
        \<< 11 CF 12
CF 13 SF DC PST
PSTNO PSTEA \->V2
INNO INEA \->V2 RNDM
13 CF
        \>> } } {
"UPDAT" {
        \<< 24 SF
UPDATE
        \>> } } {
"TAN" {
        \<< 12 CF 13
CF TANGENT 1.02
MENU
        \>> } } {
"SP.IN" {
        \<< 11 CF 12
CF SPIRAL.IN 1.02
MENU
        \>> } } {
"CURVE" {
        \<< 11 CF 13
CF CURVE 1.02 MENU
        \>> } } {
"CPSP" {
        \<< 11 CF 12
CF COMP.SPIRAL 1.02
MENU
        \>> } } {
"EXIT" {
        \<< UPDIR
        \>> } } }
      ENDST
3.363601
      PST
91.6022970728
      PSTNO
374296.454
      PSTEA
953371.7084
      TNAZ
92.781577778
      LS -.75
      DC -15.697475
      EAST
953409.566117
      NOR
374264.695911
      OFST -29.5
      DIST
37.9170883999
      AZ
84.2538223709
      STA 91.2
    END
  COMP.SPIRAL
    DIR
      PI
28.6478888889
      ENDST
202.379239
      PSCEA
162243.979506
      PSCNO
559243.434435
      PSC
202.979239175
      DELTA
7.16197222222
      TNAZ
292.656166111
      LS
-.600000174527
      DC
19.0985944444
      EAST
162187.895
      NOR
559264.679
      OFST 0
      DIST
928.943218986
      AZ
294.282912018
      STA
202.379239
      PCS
202.079239
      CST { {
"DATA" {
        \<< 25 SF
DATA 1.02 MENU
        \>> } } {
"PARAM" {
        \<< PARAM
COMP.SPIRAL 1 MENU
        \>> } } {
"SETUP" {
        \<< UPDIR
SETUP COMP.SPIRAL
1.02 MENU
        \>> } } {
"\<) TIE" {
        \<< AZ.TIE
1.02 MENU
        \>> } } { ""
} { "JUMP" {
        \<< UPDIR
JUMP COMP.SPIRAL
1.02 MENU
        \>> } } {
"TIES" {
        \<< 13 SF
PSCNO PSCEA \->V2 PSC
15 SF 16 CF 14 CF
TIES 13 CF 15 CF
        \>> } } {
"STA" {
        \<< STA 100 *
4 FIX
        \>> } } {
"OFST" {
        \<< OFST 3
FIX
        \>> } } { "\<)"
{
        \<< AZ
          IF 27 FC?
          THEN DUP
180
            IF \<=
            THEN
180 HMS+
            ELSE
180 HMS-
            END
          END 5 FIX
        \>> } } {
"DIST" {
        \<< DIST 3
FIX
        \>> } } {
"RNDM" {
        \<< 13 SF DC
PSC PSCNO PSCEA \->V2
INNO INEA \->V2 RNDM
13 CF
        \>> } } {
"UPDAT" {
        \<< 25 SF
UPDATE
        \>> } } {
"TAN" {
        \<< 12 CF 13
CF TANGENT 1.02
MENU
        \>> } } {
"SP-IN" {
        \<< 11 CF 12
CF SPIRAL.IN 1.02
MENU
        \>> } } {
"CURVE" {
        \<< 11 CF 13
CF CURVE 1.02 MENU
        \>> } } {
"SP-OU" {
        \<< 11 CF 12
CF SPIRAL.OUT 1.02
MENU
        \>> } } {
"EXIT" {
        \<< UPDIR
        \>> } } }
    END
  JUMP
    \<< "Jump Hub ?"
"" INPUT DUP OBJ\->
SWAP "JH" SWAP +
SWAP "Azimuth" ""
INPUT OBJ\-> HMS\->
      IF 27 FC?
      THEN DUP 180
        IF <
        THEN 180 +
        ELSE 180 -
        END
      END DUP 'AZ'
STO "Distance ?" ""
INPUT OBJ\-> DUP
'DIST' STO
"Elevation ?" ""
INPUT OBJ\->
"Instrument HI ?"
"" INPUT OBJ\-> +
"Elevation Diff. (+/-)?"
"" INPUT OBJ\-> +
"Jump Hub HI ?" ""
INPUT OBJ\-> - DUP
'ELEV' STO CLLCD
-15 CF -16 SF 2
PICK 4 PICK \->V2 -16
CF NEG INNO INEA
\->V2 + DUP V\-> 'EAST'
STO 'NOR' STO V\-> 3
ROLL 6 \->LIST DUP 3
ROLL OBJ\-> JHBS STO
UPDIR OBJ\-> DROP
CLLCD "  JH - " 7
ROLL IP STD \->STR +
1 DISP "   \<) = " 6
ROLL 5 FIX \->HMS 5
RND HMS\-> \->HMS DUP
'AZ' STO
      IF 27 FC?
      THEN DUP 180
        IF <
        THEN 180 +
        ELSE 180 -
        END
      END IP 0 RND
STD \->STR "\^o" AZ
      IF 27 FC?
      THEN DUP 180
        IF <
        THEN 180 +
        ELSE 180 -
        END
      END FP 10 SQ
* IP 0 RND DUP 10
      IF <
      THEN "0" SWAP
\->STR +
      ELSE \->STR
      END "'" AZ
      IF 27 FC?
      THEN DUP 180
        IF <
        THEN 180 +
        ELSE 180 -
        END
      END 10 SQ *
FP 10 SQ * 1 FIX 1
RND DUP 10
      IF <
      THEN "0" SWAP
\->STR +
      ELSE \->STR
      END + + + + +
3 DISP "DIST = " 5
ROLL 2 FIX 2 RND
\->STR + 5 DISP CLEAR
0 WAIT CLLCD CLEAR
      DO "NORTH = "
NOR 3 FIX 3 RND
\->STR + 1 DISP
"EAST  = " EAST 3
FIX 3 RND \->STR + 3
DISP "ELEV. = "
ELEV 3 FIX 3 RND +
5 DISP
      UNTIL KEY
      END 51 SAME
1.02 MENU
    \>>
  AZ 210.150003676
  DIST
1402.13630786
  NOR 7781.505
  EAST 17813.352
  ELEV 0
  AZTYP
    \<<
"     Azimuth Type    "
{ { "North" 1 } {
"South" 2 } {
"Bearing" 3 } } 27
FS? 1
      IF ==
      THEN 2
      ELSE 28 FS? 1
        IF ==
        THEN 3
        ELSE 27 FC?
28 FC? + 2
          IF ==
          THEN 1
          END
        END
      END CLLCD
CHOOSE 1
      IF ==
      THEN DUP 1
        IF ==
        THEN
"Azimuths Set To North"
27 CF 28 CF MSGBOX
PARAM
        ELSE 2
          IF ==
          THEN
"Azimuths Set To South"
27 SF 28 CF MSGBOX
PARAM
          ELSE
"Azimuths Set To Bearings"
28 SF 27 CF MSGBOX
PARAM
          END
        END
      ELSE PARAM
      END
    \>>
  DTYP
    \<<
"       Distance Type    "
{ { "Meters" 1 } {
"Feet" 2 } } 26 FS?
0
      IF ==
      THEN 1
      ELSE 2
      END CHOOSE 1
      IF ==
      THEN 1
        IF ==
        THEN
"Distance Set To Meters"
26 CF MSGBOX PARAM
        ELSE
"Distance Set To Feet"
26 SF MSGBOX PARAM
        END
      ELSE PARAM
      END
    \>>
  SR1
    \<<
      IF 28 FS?
      THEN SWAP
\->STR DUP "'NW'"
        IF ==
        THEN SWAP
360 SWAP - SWAP
        END DUP
"'SW'"
        IF ==
        THEN SWAP
180 SWAP + SWAP
        END DUP
"'SE'"
        IF ==
        THEN SWAP
180 SWAP - SWAP
        END DROP
      END DUP 180
      IF <
      THEN 180 +
      ELSE 180 -
      END
    \>>
  SR2
    \<<
      IF 27 FS?
      THEN \->HMS 5
FIX \->STR
      END
      IF 27 FC?
      THEN DUP 180
        IF \<=
        THEN 180 +
        ELSE 180 -
        END
        IF 28 FS?
        THEN DUP
360 < SWAP DUP 270
< SWAP DUP 270 <
SWAP DUP 180 < SWAP
DUP 180 < SWAP DUP
90 < SWAP DUP 90 <
SWAP DUP 0 < SWAP 9
ROLLD
          IF XOR
          THEN
"NE " 8 ROLLD
          END
          IF XOR
          THEN 180
6 ROLL - 5 ROLLD
"SE " 6 ROLLD
          END
          IF XOR
          THEN 180
4 ROLL SWAP - 3
ROLLD "SW " 4 ROLLD
          END
          IF XOR
          THEN 360
SWAP - "NW " SWAP
          END \->HMS
5 FIX \->STR +
        ELSE \->HMS 5
FIX \->STR
        END
      END
    \>>
  UPDATE
    \<<
      IF 21 FS?
      THEN 21 CF
"Update ?" CLLCD 1
DISP { NO "" "" ""
"" YES } TMENU -1
WAIT
        IF 16.1
SAME
        THEN 1.03
MENU CLLCD
"Into : Curve" 1
DISP
"       Spiral" 3
DISP { "" CURVE ""
"" SPRL } TMENU PC
DUP PT - 100 * TNAZ
DUP 3 ROLL SWAP -16
SF \->V2 -16 CF PTNO
PTEA \->V2 SWAP - -1
WAIT DUP \-> k
          \<< 1.02
MENU
            IF 12.1
SAME
            THEN
CURVE V\-> 'PCEA' STO
'PCNO' STO 'TNAZ'
STO 'PC' STO
"Degree of Curve ?
 ( - if left )"
"" INPUT OBJ\-> HMS\->
'DC' STO
"Curve Delta ?" ""
INPUT OBJ\-> ABS HMS\->
'DELTA' STO DELTA
DC / ABS PC + 4 FIX
2 FIX DUP 'ENDST'
STO 'STA' STO 0
'OFST' STO
            ELSE k
EVAL
              IF
15.1 SAME
              THEN
SPIRAL.IN 1.02 MENU
V\-> 'PSEA' STO
'PSNO' STO 'TNAZ'
STO 'PS' STO
"Degree of Curve Ahead 
 ( - If left )"
"" INPUT OBJ\-> HMS\->
'DC' STO
"Length of Spiral ?"
"" INPUT OBJ\-> 100 /
DUP 'LS' STO PS +
'STA' STO 0 'OFST'
STO
              ELSE
CLEAR 1.02 MENU
KILL
              END
            END
"Update Complete."
CLLCD 3 DISP 3000
.1 BEEP 2 FREEZE
          \>>
        END 1.02
MENU
      END
      IF 22 FS?
      THEN 22 CF
"Update ?" CLLCD 1
DISP { NO "" "" ""
"" YES } TMENU -1
WAIT
        IF 16.1
SAME
        THEN 1 MENU
DC PCNO PCEA \->V2
TNAZ ENDST PC 100
R\->D 6 PICK / DUP 5
PICK 90 + DUP 3
ROLL SWAP -16 SF
\->V2 -16 CF 5 PICK 5
ROLL - 8 PICK * DUP
4 ROLL + 4 ROLL
SWAP -16 SF \->V2 -16
CF 6 ROLL + 3 ROLL
- SWAP 4 ROLL + 3
ROLL
"Into : Tangent"
CLLCD 1 DISP
"       Spiral" 3
DISP
"       Compound Curve"
"       Compound Spiral"
7 DISP 5 DISP {
TNGT "SPRL" "" ""
CURVE CPSP } TMENU
-1 WAIT DUP \-> k
          \<< 1.02
MENU
            IF 11.1
SAME
            THEN
TANGENT 'PT' STO
'TNAZ' STO V\->
'PTEA' STO 'PTNO'
STO DROP
"End of Tangent?
 (PC,PS, or POT)"
"" INPUT OBJ\-> 100 /
DUP 'PC' STO 'STA'
STO 0 'OFST' STO
            ELSE k
EVAL
              IF
12.1 SAME
              THEN
SPIRAL.OUT 'PST'
STO DROP DROP 'DC'
STO
"PST North Coordinate ?"
"" INPUT OBJ\->
'PSTNO' STO
"PST East Coordinate ?"
"" INPUT OBJ\->
'PSTEA' STO
"Length of Spiral ?"
"" INPUT OBJ\-> 100 /
NEG 'LS' STO LS ABS
PST + 'PST' STO
"Tangent Azimuth Ahead"
"" INPUT OBJ\-> HMS\->
IF 27 FC?
THEN SR1
END 'TNAZ' STO
CLEAR PST LS +
'STA' STO 0 'OFST'
STO
              ELSE
k EVAL
IF 15.1 SAME
THEN CLEAR ENDST
'STA' STO 0 'OFST'
STO PCNO PCEA \->V2
PC 12 SF 16 SF 14
SF TIES 12 CF 14 CF
16 CF TNAZ
  IF 'DC<0'
  THEN DELTA -
  ELSE DELTA +
  END 'TNAZ' STO
'PCEA' STO 'PCNO'
STO 2 CF
"Curve Delta ?" ""
INPUT OBJ\-> ABS HMS\->
'DELTA' STO
"Degree of Curve ?
  ( - If left )"
"" INPUT OBJ\-> HMS\->
'DC' STO STA 'PC'
STO DELTA DC / ABS
PC + 4 FIX DUP
'STA' STO 'ENDST'
STO
ELSE k EVAL
  IF 16.1 SAME
  THEN 3 ROLL DROP
COMP.SPIRAL
"PSC North Coordinate ?"
"" INPUT OBJ\->
'PSCNO' STO
"PSC East Coordinate"
"" INPUT OBJ\->
'PSCEA' STO
"Degree of Curve Ahead
 ( - IF left )"
"" INPUT OBJ\-> HMS\->
DUP 'DC' STO
"Spiral Delta ?" ""
INPUT OBJ\-> ABS HMS\->
DUP 'DELTA' STO 4
ROLL SWAP
    IF 'DC<0'
    THEN -
    ELSE +
    END 3 ROLLD
"Length of Spiral "
"" INPUT OBJ\-> 100 /
DUP 4 ROLL + DUP
DUP 'STA' STO
'ENDST' STO 'PSC'
STO 2 PICK 5 ROLL -
NEG 2 PICK / INV 3
PICK * DUP 'PSC'
STO+ NEG 2 ROLL
DROP DUP 3 PICK * 2
/ NEG 4 ROLL + DUP
0
    IF <
    THEN 360 +
    END 'TNAZ' STO
'LS' STO 'DC' STO 0
'OFST' STO PSCNO
PSCEA \->V2 PSC 13 SF
14 SF 16 SF TIES 13
CF 14 CF 16 CF SWAP
PSCNO - NEG 'PSCNO'
STO+ PSCEA - NEG
'PSCEA' STO+ PCS
'STA' STO
  ELSE CLEAR KILL
  END
END
              END
            END
"Update Complete"
CLLCD 3 DISP 3000
.1 BEEP 2 FREEZE
1.02 MENU
          \>>
        END 1.02
MENU CLEAR
      END
      IF 23 FS?
      THEN 23 CF
"Update ?" CLLCD 1
DISP { NO "" "" ""
"" YES } TMENU -1
WAIT
        IF 16.1
SAME
        THEN 1.02
MENU CLLCD PS LS +
'STA' STO 0 'OFST'
STO PSNO PSEA \->V2
PS 13 SF 16 SF TIES
3 ROLL DROP 13 CF
16 CF STA DUP PS -
SQ LS / DC * 2 /
TNAZ + DC CURVE
'DC' STO 'TNAZ' STO
'PC' STO 'PCEA' STO
'PCNO' STO
"Curve Delta ?" ""
INPUT OBJ\-> ABS HMS\->
'DELTA' STO DELTA
DC / ABS PC + 4 FIX
DUP 'ENDST' STO
'STA' STO 0 'OFST'
STO
        ELSE 1.02
MENU KILL
        END
"Update Complete."
CLLCD 3 DISP 3000
.1 BEEP 2 FREEZE
1.02 MENU CLEAR
      END
      IF 24 FS?
      THEN 24 CF
"Update ?" CLLCD 1
DISP { NO "" "" ""
"" YES } TMENU -1
WAIT
        IF 16.1
SAME
        THEN 1.02
MENU PST PSTNO
PSTEA TNAZ TANGENT
'TNAZ' STO 'PTEA'
STO 'PTNO' STO 'PT'
STO
"End of Tangent ?
 (PC,PS or POT)"
"" INPUT OBJ\-> 100 /
DUP 'PC' STO 'STA'
STO 0 'OFST' STO
        END
"Update Complete."
CLLCD 3 DISP 3000
.1 BEEP 2 FREEZE
1.02 MENU CLEAR
      END
      IF 25 FS?
      THEN 25 CF
"Update ?" CLLCD 1
DISP { NO "" "" ""
"" YES } TMENU -1
WAIT
        IF 16.1
SAME
        THEN 1.02
MENU 13 SF 14 SF 16
SF ENDST 'STA' STO
0 'OFST' STO PSCNO
PSCEA \->V2 PSC TIES
3 CF 14 CF 16 CF
TNAZ DC LS * NEG 2
/ - DC STA CURVE
"Curve Delta ?" ""
INPUT OBJ\-> ABS HMS\->
'DELTA' STO 'PC'
STO 'DC' STO 'TNAZ'
STO 'PCEA' STO
'PCNO' STO DELTA DC
/ ABS PC + 4 FIX
DUP 'ENDST' STO
'STA' STO 2 0
'OFST' STO CF
"Update Complete."
CLLCD 3 DISP 3000
.1 BEEP 2 FREEZE
        ELSE 1.02
MENU
        END CLEAR
1.02 MENU
      END
    \>>
  RNDM
    \<< -3 SF
"Azimuth ?" ""
INPUT OBJ\->
      IF 27 FC?
      THEN DUP 180
        IF <
        THEN 180
HMS+
        ELSE 180
HMS-
        END
      END HMS\-> DUP
'AZ' STO
"Distance ?" ""
INPUT OBJ\-> DUP
'DIST' STO
      IF 11 FS?
      THEN CLLCD
SWAP -16 SF \->V2 -16
CF INNO INEA \->V2
SWAP - DUP V\->
'EAST' STO 'NOR'
STO PTNO PTEA \->V2
SWAP - -16 SF V\->
TNAZ - \->V2 -16 CF
V\-> 'OFST' STO 100 /
DUP 0
        IF <
        THEN 17 SF
        END PT +
DUP PC
        IF >
        THEN 17 SF
        END
        IF 17 FS?C
        THEN NEG
        END 'STA'
STO CLLCD 11 CF
      END
      IF 12 FS?
      THEN SWAP -16
SF \->V2 TNAZ DUP DC
DUP CLLCD -15 CF
-16 SF 5 ROLL -16
CF INNO INEA \->V2
SWAP - DUP V\->
'EAST' STO 'NOR'
STO 10 SQ R\->D 3
ROLL / 4 ROLL 90 +
-16 SF \->V2 -16 CF
PCNO PCEA \->V2 SWAP
- SWAP - -16 SF V\->
-16 CF DUP 0
        IF <
        THEN 360 +
        END 4 ROLL
- 3 PICK 0
        IF \>=
        THEN 90 +
        ELSE 90 -
        END 360 /
FP 360 * DUP -180
        IF \<=
        THEN 360 +
        END 3 PICK
/ DUP 0
        IF <
        THEN -54 SF
        END PC +
DUP ENDST SWAP
        IF \<=
        THEN -54 SF
        END
        IF -54 FS?C
        THEN NEG
        END SWAP 10
SQ R\->D 4 PICK / ABS
- 3 ROLL 0 SWAP
        IF \<=
        THEN NEG
        END 'OFST'
STO 'STA' STO 12 CF
      END
      IF 13 FS?
      THEN -16 SF
LS TNAZ 3 PICK 5
PICK \->V2 -16 CF NEG
DUP 7 ROLL + DUP V\->
'EAST' STO 'NOR'
STO 7 PICK - -16 SF
V\-> 180 + 4 PICK -
\->V2 -16 CF V\-> DROP
100 /
        DO DUP SQ 5
PICK / 10 PICK * 2
/ DUP D\->R 0 0 0
          DO 4 PICK
2 PICK
            IF \=/
            THEN
DUP 2 / IP -1 SWAP
^ 5 PICK 3 PICK ^ 3
PICK FACT / 3 PICK
2 * 1 + / * 3 ROLL
+ 2 ROLLD
            ELSE
DUP 2 / IP -1 SWAP
^ 5 PICK 3 PICK
FACT / 3 PICK 2 * 1
+ / * 3 ROLL + 2
ROLLD
            END 1 +
DUP 5 PICK
            IF \=/
            THEN
DUP 2 / IP -1 SWAP
^ 5 PICK 3 PICK ^ 3
PICK FACT / 3 PICK
2 * 1 + / * DUP 5
ROLL + 4 ROLLD
            ELSE
DUP 2 / IP -1 SWAP
^ 5 PICK 3 PICK
FACT / 3 PICK 2 * 1
+ / * DUP 5 ROLL +
4 ROLLD
            END
SWAP 1 + SWAP ABS
.00001
          UNTIL <
          END DROP
3 ROLL DROP 4 PICK
100 * DUP 4 ROLL *
3 ROLLD * -15 CF
-16 SF -19 CF 6
PICK \->V2 2 ROLL 6
PICK 90 + -16 SF
\->V2 -16 CF + NEG 9
PICK + 5 PICK 90 +
3 ROLL + DUP 360
          IF \>=
          THEN 360
-
          END SWAP
NOR EAST \->V2 - -16
SF V\-> -16 CF 3 ROLL
- -16 SF \->V2 -16 CF
V\-> 100 / NEG DUP 4
ROLL + 3 ROLLD SWAP
'OFST' STO ABS
.0001
        UNTIL <
        END DUP 9
ROLL + 'STA' STO 4
ROLL / DUP 0
        IF <
        THEN 54 SF
        END 1 - DUP
0
        IF >
        THEN 54 SF
        END STA
        IF 54 FS?C
        THEN NEG
        END 'STA'
STO CLEAR STA ABS
'STA' STO 13 CF
      END CLEAR
CLLCD 3000 .1 BEEP
      DO
        IF 26 FS?
        THEN
"STA    = " STA IP
0 RND STD \->STR "+"
STA ABS FP 10 SQ *
3 FIX DUP 10
          IF <
          THEN "0"
SWAP DUP 10
            IF <
            THEN
"0" SWAP \->STR + + +
+
            END
          ELSE \->STR
+ + +
          END
        ELSE
"STA    = " STA 10
/ IP 0 RND STD \->STR
"+" STA ABS 10 / FP
1000 * 4 FIX DUP
100
          IF <
          THEN "0"
SWAP DUP 10
            IF <
            THEN
"0" SWAP \->STR + + +
+ +
            ELSE
\->STR + + + +
            END
          ELSE \->STR
+ + +
          END
        END 1 DISP
"OFFSET = " OFST 3
RND 3 FIX 'OFST'
STO OFST DUP ABS 2
ROLL 0
        IF \=/
        THEN OFST 0
          IF <
          THEN \->STR
" Left" +
          ELSE \->STR
" Right" +
          END
        END + 3
DISP "NORTH  = "
NOR 4 FIX 'NOR' STO
NOR \->STR + 5 DISP
"EAST   = " EAST 4
FIX 'EAST' STO EAST
\->STR + 7 DISP
      UNTIL KEY
      END 51 SAME
    \>>
  TIES
    \<<
      IF 16 FC?
      THEN
"Tie Sta.?" STA 100
* 4 FIX \->STR { -5 1
} V 3 \->LIST INPUT
OBJ\-> 100 / 'STA'
STO
        IF 15 FC?
        THEN STA
DUP DUP 5 ROLL < 4
ROLL 3 ROLL < 3
ROLL DROP
          IF XOR
          THEN
"Outside Line Segment"
3 DISP 100 2 BEEP
          END
        END
"Offset ([+/-] If Left)"
OFST 3 FIX \->STR {
-5 1 } V 3 \->LIST
INPUT OBJ\-> 'OFST'
STO
      END
      IF 11 FS?
      THEN 11 CF 0
PTNO PTEA \->V2 TNAZ
DUP STA PT - 100 *
SWAP -15 CF -16 SF
-19 CF \->V2 -16 CF
SWAP 90 + OFST SWAP
-16 SF \->V2 -16 CF +
- 1 CF DUP V\->
      END
      IF 12 FS?
      THEN 12 CF 0
DC DUP TNAZ 90 +
DUP 100 R\->D 4 ROLL
/ DUP 3 ROLL -15 CF
-16 SF -19 CF \->V2
-16 CF STA PC - 5
ROLL * 4 ROLL + 3
ROLL OFST - SWAP
-16 SF \->V2 -16 CF
PCNO PCEA \->V2 SWAP
+ SWAP - DUP V\->
      END
      IF 13 FS?
      THEN 13 CF 0
0 0 'NOR' STO
'EAST' STO 'DIST'
STO STA SWAP - DUP
SQ LS / DC * 2 /
DUP D\->R 0
        DO 2 PICK 2
PICK
          IF \=/
          THEN DUP
2 / IP -1 SWAP ^ 3
PICK 3 PICK ^ 3
PICK FACT / 3 PICK
2 * 1 + / * 'NOR'
STO+
          ELSE DUP
2 / IP -1 SWAP ^ 3
PICK 3 PICK FACT /
3 PICK 2 * 1 + / *
'NOR' STO+
          END 1 +
DUP 3 PICK
          IF \=/
          THEN DUP
2 / IP -1 SWAP ^ 3
PICK 3 PICK ^ 3
PICK FACT / 3 PICK
2 * 1 + / * DUP
'EAST' STO+ 'DIST'
STO
          ELSE DUP
2 / IP -1 SWAP ^ 3
PICK 3 PICK FACT /
3 PICK 2 * 1 + / *
DUP 'EAST' STO+
'DIST' STO
          END 1 +
        UNTIL DIST
ABS .00001 <
        END DROP
DROP 2 ROLL 100 *
DUP 'NOR' STO*
'EAST' STO* -15 CF
-16 SF -19 CF NOR
TNAZ \->V2 -16 CF
EAST TNAZ 90 + DUP
'NOR' STO -16 SF
\->V2 -16 CF + 3 ROLL
SWAP - 2 PICK NOR +
OFST SWAP -16 SF
\->V2 -16 CF - DUP V\->
13 CF
      END
      IF 16 FC?
      THEN 'EAST'
STO 'NOR' STO INNO
INEA \->V2 SWAP - -16
SF V\-> -16 CF SWAP
'DIST' STO DUP 0
        IF <
        THEN 360 +
        END SWAP
DROP \->HMS 5 FIX
HMS\-> \->HMS 'AZ' STO
        IF 14 FC?
        THEN
          IF 26 FS?
          THEN
"STA   = " STA IP 0
RND STD \->STR "+"
STA ABS FP 10 SQ *
3 FIX DUP 10
            IF <
            THEN
"0" SWAP DUP 10
              IF <
              THEN
"0" SWAP \->STR + + +
+
              END
            ELSE
\->STR + + +
            END
          ELSE
"STA   = " STA 10 /
IP 0 RND STD \->STR
"+" STA ABS 10 / FP
1000 * 4 FIX DUP
100
            IF <
            THEN
"0" SWAP DUP 10
              IF <
              THEN
"0" SWAP \->STR + + +
+ +
              ELSE
\->STR + + + +
              END
            ELSE
\->STR + + +
            END
          END 3000
.1 BEEP CLLCD 1
DISP 5 FIX
          IF 27 FS?
          THEN
"   \<)  = " AZ IP 0
RND STD \->STR "\^o" AZ
FP 10 SQ * IP 0 RND
DUP 10
            IF <
            THEN
"0" SWAP \->STR +
            ELSE
\->STR
            END "'"
AZ 10 SQ * FP 10 SQ
* 2 FIX DUP 10
            IF <
            THEN
"0" SWAP \->STR +
            ELSE
\->STR
            END + +
+ + +
          ELSE
"   \<)  = " AZ DUP
            IF 180
<
            THEN
180 HMS+
            ELSE
180 HMS-
            END IP
0 RND STD \->STR "\^o"
AZ DUP
            IF 180
<
            THEN
180 HMS+
            ELSE
180 HMS-
            END FP
10 SQ * IP 0 RND
DUP 10
            IF <
            THEN
"0" SWAP \->STR +
            ELSE
\->STR
            END "'"
AZ DUP
            IF 180
<
            THEN
180 HMS+
            ELSE
180 HMS-
            END 10
SQ * FP 10 SQ * 2
FIX DUP 10
            IF <
            THEN
"0" SWAP \->STR +
            ELSE
\->STR
            END + +
+ + +
          END 3
DISP "DIST  = "
DIST 3 FIX 'DIST'
STO DIST \->STR + 5
DISP 0 WAIT
          IF 26.1
SAME
          THEN
CLLCD
            DO
"OFFSET = " OFST 3
FIX 'OFST' STO OFST
ABS \->STR + OFST 0
              IF \=/
              THEN
OFST 0
IF <
THEN " Left" +
ELSE " Right" +
END
              END 1
DISP "NORTH  = "
NOR 4 FIX DUP 'NOR'
STO \->STR + 3 DISP
"EAST   = " EAST 4
FIX DUP 'EAST' STO
\->STR + 5 DISP
            UNTIL
KEY
            END 51
SAME
          ELSE 5
FREEZE
          END CLEAR
DIST
        END
      END
    \>>
  CST { { "SETUP" {
    \<< SETUP 1.02
MENU
    \>> } } { "PARAM"
{
    \<< PARAM 1 MENU
    \>> } } {
"AZ.TIE" {
    \<< AZ.TIE 1 MENU
    \>> } } { "" } {
"INNO" {
    \<< INNO
    \>> } } { "INEA"
{
    \<< INEA
    \>> } } { "TAN" {
    \<< 12 CF 13 CF
TANGENT 1 MENU
    \>> } } {
"SP-IN " {
    \<< 11 CF 12 CF
SPIRAL.IN 1 MENU
    \>> } } { "CURVE"
{
    \<< 11 CF 13 CF
CURVE 1 MENU
    \>> } } {
"SP-OUT" {
    \<< 11 CF 12 CF
SPIRAL.OUT 1 MENU
    \>> } } { "CPSP"
{
    \<< 11 CF 12 CF
COMP.SPIRAL 1 MENU
    \>> } } { "JUMP"
{
    \<< JUMP
    \>> } } { "\<)" {
    \<< AZ
      IF 27 FC?
      THEN DUP 180
        IF \<=
        THEN 180
HMS+
        ELSE 180
HMS-
        END
      END 4 FIX
    \>> } } { "DIST"
{
    \<< DIST 2 FIX
    \>> } } { "NOR" {
    \<< NOR
    \>> } } { "EAST"
{
    \<< EAST
    \>> } } { "ELEV"
{
    \<< ELEV
    \>> } } { "EXIT"
{
    \<< UPDIR 2 MENU
    \>> } } }
  DATA
    \<<
      IF 21 FS?
      THEN 21 CF
"Beginning Station ?
 (PT,POT or PST)"
PT 100 * 4 RND STD
\->STR { -5 1 } V 3
\->LIST INPUT OBJ\->
100 / 'PT' STO
"PT. North Coord. ?"
PTNO 4 FIX \->STR {
-5 1 } V 3 \->LIST
INPUT OBJ\-> 'PTNO'
STO
"PT. East Coord. ?"
PTEA 4 FIX \->STR {
-5 1 } V 3 \->LIST
INPUT OBJ\-> 'PTEA'
STO
"Tangent Azimuth ?"
TNAZ SR2 { -5 1 } V
3 \->LIST INPUT OBJ\->
HMS\->
        IF 27 FC?
        THEN SR1
        END 'TNAZ'
STO
"End of Tangent Sta ?
 (PC,PS or POT)"
PC 100 * 4 FIX \->STR
{ -5 1 } V 3 \->LIST
INPUT OBJ\-> 100 /
DUP 'PC' STO 'STA'
STO 0 'OFST' STO
"Ready." CLLCD 3
DISP 3000 .1 BEEP 2
FREEZE
      END
      IF 22 FS?
      THEN 22 CF
"Beginning Station ?
 (PC,PSC or PCC)"
PC 100 * 4 FIX \->STR
{ -5 1 } V 3 \->LIST
INPUT OBJ\-> 100 /
'PC' STO
"PC North Coordinate ?"
PCNO 4 FIX \->STR {
-5 1 } V 3 \->LIST
INPUT OBJ\-> 'PCNO'
STO
"PC East Coordinate ?"
PCEA 4 FIX \->STR {
-5 1 } V 3 \->LIST
INPUT OBJ\-> 'PCEA'
STO
"Tangent Azimuth ?"
TNAZ SR2 { -5 1 } V
3 \->LIST INPUT OBJ\->
HMS\->
        IF 27 FC?
        THEN SR1
        END 'TNAZ'
STO "Curve Delta ?"
DELTA \->HMS 5 FIX
\->STR { -5 1 } V 3
\->LIST INPUT OBJ\->
ABS HMS\-> 'DELTA'
STO
"Degree of Curve ?
 ( - If left )"
DC \->HMS 5 FIX \->STR
{ -5 1 } V 3 \->LIST
INPUT OBJ\-> HMS\->
'DC' STO DELTA DC /
ABS PC + 4 FIX 4
RND DUP 'ENDST' STO
'STA' STO 0 'OFST'
STO "Ready. " CLLCD
3 DISP 3000 .1 BEEP
2 FREEZE
      END
      IF 23 FS?
      THEN 23 CF
"PS Station ?" PS
100 * 4 FIX \->STR {
-5 1 } V 3 \->LIST
INPUT OBJ\-> 100 /
'PS' STO
"PS North Coordinate ?"
PSNO 4 FIX \->STR {
-5 1 } V 3 \->LIST
INPUT OBJ\-> 'PSNO'
STO
"PS East Coordinate ?"
PSEA 4 FIX \->STR {
-5 1 } V 3 \->LIST
INPUT OBJ\-> 'PSEA'
STO
"Tangent Azimuth ?"
TNAZ SR2 { -5 1 } V
3 \->LIST INPUT OBJ\->
HMS\->
        IF 27 FC?
        THEN SR1
        END 'TNAZ'
STO
"Length of Spiral"
LS 100 * 4 FIX \->STR
{ -5 1 } V 3 \->LIST
INPUT OBJ\-> 100 /
'LS' STO
"Degree of Curve ?
 ( - IF left )"
DC \->HMS 5 RND STD
\->STR { -5 1 } V 3
\->LIST INPUT OBJ\->
HMS\-> 'DC' STO PS LS
+ 'STA' STO 0
'OFST' STO "Ready."
CLLCD 3 DISP 3000
.1 BEEP 2 FREEZE
      END
      IF 24 FS?
      THEN 24 CF
"PST Station ?" PST
100 * 4 FIX \->STR {
-5 1 } V 3 \->LIST
INPUT OBJ\-> 100 /
DUP 'PST' STO DUP
'STA' STO 'ENDST'
STO
"PST North Coordinate"
PSTNO 4 FIX \->STR {
-5 1 } V 3 \->LIST
INPUT OBJ\-> 'PSTNO'
STO
"PST East Coordinate"
PSTEA 4 FIX \->STR {
-5 1 } V 3 \->LIST
INPUT OBJ\-> 'PSTEA'
STO
"Tangent Azimuth ?"
TNAZ SR2 { -5 1 } V
3 \->LIST INPUT OBJ\->
HMS\->
        IF 27 FC?
        THEN SR1
        END 'TNAZ'
STO
"Length of Spiral"
LS 100 * NEG 4 FIX
\->STR { -5 1 } V 3
\->LIST INPUT OBJ\->
100 / NEG DUP 'LS'
STO PST + 'STA' STO
0 'OFST' STO
"Degree of Curve Back ?
 ( - IF left )"
DC \->HMS 5 FIX \->STR
{ -5 1 } V 3 \->LIST
INPUT OBJ\-> HMS\->
'DC' STO "Ready"
3000 .1 BEEP CLLCD
3 DISP 2 FREEZE
      END
      IF 25 FS?
      THEN 25 CF
"PSC Station ?" PSC
100 * 4 FIX \->STR {
-5 1 } V 3 \->LIST
INPUT OBJ\-> 100 /
DUP 'PSC' STO DUP
'STA' STO 'ENDST'
STO
"PSC North Coordinate"
PSCNO 4 FIX \->STR {
-5 1 } V 3 \->LIST
INPUT OBJ\-> 'PSCNO'
STO
"PSC East Coordinate"
PSCEA 4 FIX \->STR {
-5 1 } V 3 \->LIST
INPUT OBJ\-> 'PSCEA'
STO
"Adjusted Azimuth ?"
TNAZ SR2 { -5 1 } V
3 \->LIST INPUT OBJ\->
HMS\->
        IF 27 FC?
        THEN SR1
        END 'TNAZ'
STO
"Degree of Curve Ahead
 ( - IF left )"
DC \->HMS 5 FIX \->STR
{ -5 1 } V 3 \->LIST
INPUT OBJ\-> HMS\->
'DC' STO
"Length of Spiral"
LS 100 * 4 FIX \->STR
{ -5 1 } V 3 \->LIST
INPUT OBJ\-> 100 /
'LS' STO PSC LS -
'PCS' STO
"Degree of Curve Back"
PI \->HMS 5 FIX \->STR
{ -5 1 } V 3 \->LIST
INPUT OBJ\-> HMS\->
'PI' STO DC PI -
NEG LS / INV DC *
DUP 'PSC' STO+ NEG
'LS' STO DC LS * 2
/ NEG 'TNAZ' STO+
13 SF 14 SF 0
'OFST' STO PSCNO
PSCEA \->V2 PSC 16 SF
TIES 16 CF 13 CF 14
CF SWAP PSCNO - NEG
'PSCNO' STO+ PSCEA
- NEG 'PSCEA' STO+
PCS 'STA' STO 0
'OFST' STO CLEAR
CLLCD "Ready. "
3000 .1 BEEP 3 DISP
2 FREEZE
      END
    \>>
END