image of READY prompt

Wang2200.org

Listing of file='TTYA010' on disk='vmedia/731-0110A.wvd.zip'

# Sector 171, program filename = 'TTYA010'
0010 REM TTYA010 03/31/83, TELETYPE EMULATION COPYRIGHT WANG LABS, 1981
0030 REM %--DEFINE AND SET VARIABLES
0040 COM X5
   : X5=0
   : IF STR(Z$,34,1)="3"THEN X5=500
0050 COM P(3),G1$4,G3$16,A5$3,A1$8,A2$8,B$(3)1,D$(3),L,E,E1,E9$9,B$1,C$1,A,B,C
     ,E3
0060 SELECT PRINT 005, CO 005, INPUT 001, CI 001
   : PRINT HEX(05)
0069 REM .test 27B or MXE response
0070 IF STR(Z$,37,1)="1"THEN 100
   : A5$="A"&STR(Z$,29,2)
   : SELECT #6<A5$>
0075 LINPUT "MXE PORT ",-A5$
   : SELECT #6<A5$>
0080 LOAD T#0,"TTYA011"4000,9000 BEG 4000
0099 REM %.27B/28B TC board
0100 ON VAL(STR(Z$,38))-48SELECT #6 01C;#6 01D;#6 01E;#6 01F
0110 P(1)=-1
   : REM /SET PRINTER ACTIVE
0120 P(2)=0
   : IF STR(Z$,32,1)="1"THEN 130
   : P(2)=-1
   : REM /SET INPUT ACTIVE
0130 P(3)=0
   : IF STR(Z$,34,1)="1"THEN 160
   : P(3)=-1
   : REM /SET OUTPUT ACTIVE
0140 REM ONLY FOR LOADER
0150 DIM B2$(16),B3$(16)
0160 D$=HEX(010A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A)
0170 D$(1)=STR(D$,1,3)
   : D$(2)=STR(D$,1,4)
0180 E=VAL(STR(Z$,19))
   : REM /ECHO FLAG  0=NO  1=YES
0190 E1=VAL(STR(Z$,20))
   : REM /RESPONSE?  0=NO  1=LF  2=LF+
0192 A1$=HEX(440AA000440C2020)
   : REM /ARG 1 FOR SEND
0194 A2$=HEX(440BA000440C2020)
   : REM /ARG 1 FOR SEND THEN RCV
0195 A5$=HEX(010002011212400040004000)
   : REM /ARG 1 FOR PRT TEST
0196 G1$=HEX(0D0A2020)
0198 G3$=STR(Z$,51)
   : REM /.special keyboard meanings from ASK?TTY
0199 REM ....[sin]cos\pi _exp\Lod_Run
0200 STR(Z$,19,2)=HEX(0000)
0210 L9=0
   : REM /BUFFER LINE USED  0=NO  1=YES
0280 REM %--RESET T.C. HARDWARE
0300 $GIO #6(4580,Q2$)
0320 REM %--SET MICROCODE PARAMETER VECTOR (CCV)
0328 E9$,A$=STR(Z$,21,8)
   : A=LEN(A$)
   : IF A>1THEN 329
   : IF A$=HEX(0D)THEN 330
0329 HEXPRINT STR(Z$,21,A);
   : PRINT "= SEQUENCE ON (EXEC)";TAB(64)
0330 $GIO CCV #6(0120 0201 1212 4402 A000 440C,Q2$)STR(Z$,1,20)
0340 IF STR(Q2$,8,1)=HEX(10)THEN 2000
0345 REM %--LOAD AND SET CODE CONVERSION TABLES
0350 INIT(00)B2$(),B3$()
0365 GOSUB 3100
0370 IF STR(Z$,36,1)<>"2"THEN 380
   : STR(W$,57)="TTYPRBUF"
0380 E3=1
   : IF STR(Z$,45,1)="2" THEN 390
   : E3=0
   : REM /"TTY Host or Terminal
0390 $GIO SND TBL #6(4404 A000 440C,Q2$)B2$()
0400 $GIO RCV TBL #6(4405 A000 440C,Q2$)B3$()
0420 REM %--START RECEIVE
0430 $GIO #6(4408,Q2$)
1000 REM %--LOAD EMULATOR PROGRAM
1020 A$=STR(W$,1,8)
   : REM /EMULATOR MAINLINE NAME
1022 $IF ON /000,1050
1030 LOAD DC T#0,"ASKSHELL"
1040 REM ..System at least a VP
1050 $GIO/005(7601,Q2$)
1060 B$=Q2$
   : AND (B$,20)
   : IF B$<>HEX(20)THEN 1030
1070 STR(A$,8)="M"
1100 GOTO 1030
2000 STOP "CHECK 2228B, OP62, OR OP62B DEVICE ADDRESS"
3000 REM %--TTY Parameters
3005 REM .Control values 00     is keyed by '15 followed by @
3010 REM .Control values 00-1A are keyed by '15 followed by A-Z
3015 REM .Control values 1B-1F are keyed by '15 followed by key below
3016 REM .Special symbols are keyed by the following keys.
3020 REM .. 1B--5B  [ or SIN(      1D--5D  ] or COS(        1E--5E  ^
3030 REM .. 1C--5C  \ PI or LOAD   1F--5F  _ EXP( or  RUN
3040 REM .Special values may be modified from above in ASK?TTY.
3090 REM %--TTY Send code translation table
3100 B2$(1)=HEX(000102030405060708090A0B0C0D0E0F)
3110 B2$(2)=HEX(101112131415161718191A1B1C1D1E1F)
3120 B2$(3)=HEX(202122232425262728292A2B2C2D2E2F)
3130 B2$(4)=HEX(303132333435363738393A3B3C3D3E3F)
3140 B2$(5)=HEX(404142434445464748494A4B4C4D4E4F)
3150 B2$(6)=HEX(505152535455565758595A5B5C5D5E5F)
3160 B2$(7)=HEX(606162636465666768696A6B6C6D6E6F)
3170 B2$(8)=HEX(707172737475767778797A7B7C7D7E7F)
3200 B2$(9)=HEX(808182838485868788898A8B8C8D8E8F)
3210 B2$(10)=HEX(909192939495969798999A9B9C9D9E9F)
3220 B2$(11)=HEX(A0A1A2A3A4A5A6A7A8A9AAABACADAEAF)
3230 B2$(12)=HEX(B0B1B2B3B4B5B6B7B8B9BABBBCBDBEBF)
3240 B2$(13)=HEX(C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF)
3250 B2$(14)=HEX(D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF)
3260 B2$(15)=HEX(E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF)
3270 B2$(16)=HEX(F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF)
3490 REM %--TTY Receive code translation table
3500 B3$(1),B3$(9)=HEX(000505050505050588098A050C8D0505)
3510 B3$(2),B3$(10)=HEX(05050505050505050505050505050505)
3520 B3$(3),B3$(11)=HEX(202122232425262728292A2B2C2D2E2F)
3530 B3$(4),B3$(12)=HEX(303132333435363738393A3B3C3D3E3F)
3540 B3$(5),B3$(13)=HEX(404142434445464748494A4B4C4D4E4F)
3550 B3$(6),B3$(14)=HEX(505152535455565758595A5B5C5D5E88)
3560 B3$(7),B3$(15)=HEX(606162636465666768696A6B6C6D6E6F)
3570 B3$(8),B3$(16)=HEX(707172737475767778797A7B7C7D7E00)
3660 RETURN
4000 GOTO 110
   : REM /.Logic overlaid by TTYA011 for MXE controller