ASSIGN S0 "SANTA"
ASSIGN S1 "OPEN 19^M"
ASSIGN S2 "PASSWORD^M"
ASSIGN S3 "DSZ port 1 sz"
ASSIGN S4 "DSZ port 1 rz -y"

start2:
GOSUB do_files
TRANSMIT S1
WAITFOR "Enter password to open the DOOR?" 99
PAUSE 1
TRANSMIT S2
GOSUB send_rep
GOSUB rcv_mail
GOSUB end_door
QUIT

do_files:
  STRFMT S7 "%s.UL" S0
  STRFMT S8 "%s.DL" S0
  STRFMT S5 "%s %s" S3 S7
  STRFMT S6 "%s %s" S4 S8
RETURN

send_rep:
  WAITFOR "Upload Your SANTA.UL File From Your Reader Now..." 99
  PAUSE 1
  ISFILE S7
  IF SUCCESS
    DOS S5
  ELSE
    TRANSMIT "^X^X^X"
  ENDIF
  PAUSE 1
RETURN

rcv_mail:
  WAITFOR "Begin Your Download of SANTA.DL Now..." FOREVER
  PAUSE 1
  DOS S6
  PAUSE 1
RETURN

end_door:
  WAITFOR "Main Board Command?" FOREVER
  PAUSE 1
  TRANSMIT "^H^H^HG^M"
  PAUSE 1
  WAITFOR "NO CARRIER" 99
  PAUSE 1
RETURN

