home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
archives
/
ibmtsoqueens.tar.gz
/
ibmtsoqueens.tar
/
ts2ker.asm
< prev
next >
Wrap
Assembly Source File
|
1988-08-16
|
12KB
|
153 lines
TREAD CSECT , 00000100
*********************************************************************** 00000200
* * 00000300
* TREAD (PROMPT_MESSAGE,PROMPT_LENGTH,MESSAGE_AREA,LENGTH,RTN_CODE) * 00000400
* * 00000500
*********************************************************************** 00000600
R0 EQU 0 00000700
R1 EQU 1 00000800
R2 EQU 2 00000900
R3 EQU 3 00001000
R4 EQU 4 00001100
R5 EQU 5 00001200
R6 EQU 6 00001300
R7 EQU 7 00001400
R8 EQU 8 00001500
R9 EQU 9 00001600
R10 EQU 10 00001700
R11 EQU 11 00001800
R12 EQU 12 00001900
R13 EQU 13 00002000
R14 EQU 14 00002100
R15 EQU 15 00002200
SAVE (14,12),,* 00002300
LR R12,R15 00002400
USING TREAD,R12 00002500
*********************************************************************** 00002600
* FIRST WE WILL DO A TPUT FOR THE PROMPT MESSAGE (IF IT EXISTS) * 00002700
* THEN.. ASK FOR THE INPUT. * 00002800
* * 00002900
*********************************************************************** 00003000
LR R5,R1 SAVE INPUT PARM PTR 00003100
L R1,0(R5) GET THE PTR TO THE MSG TEXT 00003200
L R2,4(R5) GET THE LENGTH 00003300
L R0,0(R2) ... 00003400
LTR R0,R0 IS IT THERE ? 00003500
BZ TRE0 NO.. JUST DO TGET 00003600
ICM 1,8,=B'00000001' 00003700
TPUT (1),(0),R 00003800
TRE0 EQU * 00003900
L R1,8(R5) PICK UP THE ADDRESS INPUT TEXT 00004000
LR R3,R1 SAVE THE BUFFER ADDRESS 00004100
LA R0,1024 HOW MUCH WE CAN STAND = 1K 00004200
ICM R1,8,=B'10000000' TURN ON 'TGET' FLAG 00004300
TGET (1),(0),R 00004400
L R2,16(R5) GET THE RETURN CODE PTR 00004500
LA R15,1 SET SUPER RETURN CODE 00004600
ST R15,0(R2) STORE IT.. 00004700
L R2,12(R5) GET HOW MUCH TCAM BOUGHT 00004800
ST R1,0(R2) AND GIVE IT BACK TO THE CALLER 00004900
RETURN (14,12),RC=0 00005000
SPACE 4 00005100
BLANKS DC 4CL256' ' 00005200
LTORG , 00005300
END , 00005400
* 00640100
* 00640200
* 00640300
* 00640400
* 00640500
* 00640600
TWRITE CSECT , 00640700
*********************************************************************** 00640800
* * 00640900
* TWRITE (MESSAGE,MESSAGE LENGTH,RETURN CODE) * 00641000
* * 00641100
*********************************************************************** 00641200
R0 EQU 0 00641300
R1 EQU 1 00641400
R2 EQU 2 00641500
R3 EQU 3 00641600
R4 EQU 4 00641700
R5 EQU 5 00641800
R6 EQU 6 00641900
R7 EQU 7 00642000
R8 EQU 8 00642100
R9 EQU 9 00642200
R10 EQU 10 00642300
R11 EQU 11 00642400
R12 EQU 12 00642500
R13 EQU 13 00642600
R14 EQU 14 00642700
R15 EQU 15 00642800
*********************************************************************** 00642900
* TWRITE - * 00643000
* * 00643100
* ISSUE A TPUT FOR THE CALLING PROGRAM.. * 00643200
* * 00643300
* * 00643400
*********************************************************************** 00643500
SAVE (14,12) 00643600
LR R12,R15 00643700
USING TWRITE,R12 00643800
LR R5,R1 SAVE PTR TO INPUT PARMS 00643900
L R1,0(R5) PT TO OUTPUT TEXT 00644000
L R2,4(R5) GET OUTPUT LENGTH 00644100
L R0,0(R2) ... 00644200
ICM 1,8,=B'00000010' 'CONTROL'-PROCESSING 00644300
TPUT (1),(0),R DO IT 00644400
LA R15,1 SET CRAZY RETURN CODE 00644500
L R1,8(R5) GET THE CCODE PTR 00644600
ST R15,0(R1) SAVE IT. 00644700
RETURN (14,12),RC=0 00644800
SPACE 4 00644900
LTORG , 00645000
END , 00645100
* 00645200
* 00645300
* 00645400
* 00645500
* 00645600
PRINT GEN 00645700
WAIT CSECT 00645800
USING *,15 00645900
STM 14,12,12(13) 00646000
ST 13,SAVEAREA+4 00646100
BALR 5,0 00646200
USING *,5 00646300
L 2,0(1) 00646400
* 00646500
L 3,0(2) 00646600
ST 3,DELAY 00646700
STIMER WAIT,BINTVL=DELAY 00646800
* 00646900
L 13,SAVEAREA+4 00647000
LM 14,12,12(13) 00647100
BR 14 00647200
DELAY DS F 00647300
SAVEAREA DS 18F 00647400
END 00647500
* 00647600
* 00647700
* 00647800
* 00647900
* 00648000
PRINT GEN 00648100
TERMSIZE CSECT 00648200
USING *,15 00648300
STM 14,12,12(13) 00648400
ST 13,SAVEAREA+4 00648500
BALR 5,0 00648600
USING *,5 00648700
L 2,0(1) 00648800
* 00648900
GTSIZE , GET TERMINAL INFO 00649000
* R1: CHARS/LINE R0: LINES ON SCREEN 00649100
ST 0,0(2) 00649200
* 00649300
L 13,SAVEAREA+4 00649400
LM 14,12,12(13) 00649500
BR 14 00649600
SAVEAREA DS 18F 00649700
END 00649800