= 1000 errbyt == 52 topmem = 50 JSW = 44 ; RMON offsets CONFIG = 300 ; Primary RT11 configuration word CONFG2 = 370 ; The second one SYSGEN = 372 ; RT11 SYSGEN options offset $USRLC = 266 ; Location of the USR offset SYSVER = 276 ; The system major and minor version ; Flags CLOCK = 100000 ; In CONFIG, if a line clock present MARKTIM = 2000 ; SJ Marktime is present PRO350 = 20000 ; In CONFG2, set if a PRO/350 or 380 TSXPLU = 100000 ; In CONFG2, set if TSX+ (not used) ; VIRTUAL = 2000 ; In the JSW, if set, a virtual job SJSYS = 1 ; In CONFIG, clear if a SJ system XMSYS = 10000 ; In CONFIG, set if XM and SJSYS off ; HNSIZE = 6000 ; Allocation for handlers in SJ/FB ; Macros needed .MCALL .QSET,.TWAIT,.FETCH,.GVAL,.SETTOP,.SERR,.HERR,.GTIM .MCALL .DSTAT,.MTSTAT,.EXIT,.GTJB ; Macros needed for the XM dynamic region support .MCALL .WDBBK ,.WDBDF ,.RDBBK ,.RDBDF ,.CRRG ,.CRAW .save ; Save CURRENT Psect .psect MAPWIN ,rw,d,gbl,rel,con ; Insure window data in ROOT ; BINLSIZE == 40*4 ALLOC = 14000 ; How much to allocate for NOW .WDBDF .RDBDF apr7wi::.WDBBK 7,ALLOC/100,0,0,ALLOC/100,WS.MAP apr7re::.RDBBK ALLOC/100 mapwrk::.blkw 7 LN$CNT = LN$ALL ; Maximum for recalling .restore ; Pop Last PSECT .sbttl Start RT11 specific things .enabl lsb .psect $CODE ,ro,i,lcl,rel,con mapini::mov #p$mul ,k11$mul ; For now mov #p$div ,k11$div ; This will change soon. mov #p$ttyou,$ttyout ; Ditto... mov #p$cbta ,$$cbta ; return xinit:: mov sp ,infomsg ; Default to verbosity mov #$$BUFP ,totall ; Determine total allocation add #100+200+100+100,totall ; For TT, Directory, PHNUM buffering add #1200 ,totall ; For Misc buffering add #*LN$CNT,totall; Insure CLE space add #120*2 ,totall ; For CMDBUF and ARGBUF add #picend-picstart,totall ; For relocating code STRCPY #defdir ,#dkname ; Set default device name .GTIM #rtwork ,#timbuf ; Insure clock rollover .GVAL #rtwork,#CONFIG ; Check for what we are running on bit #SJSYS ,r0 ; Can't run on SJ (perhaps) bne 10$ ; Ok, FB or XM .PRINT #nosj ; No, die dec montyp ; Exec type saved br 20$ ; 10$: bit #XMSYS ,r0 ; Check for XM system. beq 20$ ; No, must be FB inc montyp ; Its XM, save flag. mov #$limit+2,hilimit ; We really want VIRTUAL limit 20$: .GTJB #rtwork,#jobsts ; So we know if BG or FG job. .QSET #rtque,#nrtque ; Allocate extra que elements mov sp ,rtvol ; Assume volume header checks mov @#50 ,r5 ; Save low core HIGH LIMIT ; .SERR ; TSX+, grab some extra memory mov #tsxmem ,r0 ; But inhibit aborts under RT11 mov #160000 ,r2 ; Top limit minimum for VIRTUAL add totall ,r2 ; Got it. bit #VIRTUAL,@#JSW ; Is this the virtual overlay bne 30$ ; save image. If ne, YES mov r5 ,r2 ; Disk overlayed, reset amount add #HNSIZE ,r2 ; of memory desired then. add totall ,r2 ; Done. mov r2 ,2(r0) ; Insert the new size now. dec r2 ; 30$: EMT 375 ; Call TSX now bcs 40$ ; Must be RT11 today cmp r0 ,r2 ; TSX+, did it give us enough? bhis 40$ ; Yes, Keep on going octout r0 octout r2 message ,CR 40$: .HERR ; Re-enable RT11 aborts now ; mov #freept ,r2 ; Setup a pointer to this mov @hilimit,@r2 ; Free core list for SJ/FB .FETCH add #3 ,@r2 ; + 2 to pointer above us please bic #1 ,@r2 ; Insure even address ; bit #VIRTUAL,@#JSW ; Is this the K11XM image running? bne 50$ ; No, do a normal .SETTOP ; .SETTOP #-2 ; SJ or FB, or TSX and disk overlays br 70$ ; Ask for all of it, ignore the USR ; 50$: .CRRG #mapwrk ,#apr7re ; Its K11XM.SAV on RTXM or TSX+ bcs 60$ ; We will instead create a region. mov apr7re+r.gid,apr7wi+w.nrid; This will allow future expansion. .CRAW #mapwrk ,#apr7wi ; Create address window and MAP it. mov #ALLOC+160000,r0 ; Assume for now that we got it. bcc 70$ ; Successfull 60$: movb @#ERRBYT,r1 ; It faK11RTIMAC[.050032]K11RTI.MAC[.050032]    X14|H [4;Ik(&'( k ߫H&P` \RrPP2PPzPP{PPPPP2P~\$\\TD 0D \~ hi) +\ ^( n ^( np\^txY\^ˀ\!kVk<\F˰<˴ˬ\VVkˤ1`@lP ABCDEFGHIJKLMNOPQRSTUVWXYZ$.?0123456789<@<SЬTЬ UQS>?\\\\\\\\\`:#@'="\abcdefghi\\\\\\\jklmnopqr\\\\\\\~stuvwxyz\\\\\\\\\\\\\\\\\\\\\\{ABCDEFGHI\\\\\\}JKLMNOPQR\\\\\\\\STUVWXYZ\\\\\\0123456789\\\\\  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~@ggh<i|o<m<4p<p<k|Zn<l fr rwx<x<x<x޺<w@]@@fjnr]Ze@@|> | |v<H|  |  |xz|  |zt f r   < &^ @&@'*/V,"?Lh:hmBmz|z{x`y~|fN|@@|@͂|@ ݃ƃ<ns<|Ŏ |️|ep|u|-@率|<ᄇ2ֻr||ZRM | ntB|xyvZw|J=|R>|J? nnaa|bddfuse strcpy, use XC: mov sp ,proflg ; it's a pro/350, folks clr remote ; we want to be a local kermit PRINT #xcmsg ; say so br 165$ ; /54/ 140$: .DSTAT #rtwork ,#XCR50 ; /39/ check for XC and XL bcc 160$ ; /39/ found XC .DSTAT #rtwork ,#XLR50 ; /39/ no XC try XL bcc 160$ ; /39/ found XL .MTSTAT #rtwork ,#mtsts ; /39/ No XC: or XL:, look for bcs 150$ ; /39/ multiple terminal service tst mtsts+4 ; /39/ Any LUNS generated ? bne 160$ ; /39/ Yes 150$: .PRINT #noxcmt ; /39/ No, warn user of such fact mov sp ,remote ; /39/ Place us in remote mode and mov #-1 ,tsxflg ; /39/ Fake it using TSX code. mov #PAR$SPACE,parity ; /39/ Force 8 bit quoting 160$: CALLS gttnam ,<#errtxt> ; Get the name of the console tt: PRINT #ttn ; And say what it should be PRINT #errtxt ; Print it PRINT #crlf ; Finish the line 165$: tst jobsts ; /54/ Frunned? beq 170$ ; /54/ No clr blip ; /54/ Yes, no packet status display PRINT #nolog ; /54/ Inform ; 170$: mov sp ,clkflg ; Assume a clock (reasonable) .GVAL #rtwork,#CONFIG ; Get the configuration word bit #SJSYS ,r0 ; Is this a SJ monitor ? bne 180$ ; No, just exit bit #CLOCK ,r0 ; SJ, is there a clock present bne 175$ ; Yes message ,CR clr clkflg ; Flag no clock br 180$ ; All done 175$: .GVAL #rtwork ,#SYSGEN ; Check for MARK TIME support bit #MARKTIM,r0 ; Well? bne 180$ ; Yes, support is present message message ,CR 180$: 190$: 200$: call procl ; See if a PRO on TSX+ clr r0 ; No errors return .dsabl lsb .sbttl See if we want to set up comm port on PRO/TSX+ .enabl lsb procl: .SERR ; Just to be safe. mov #tsxlin ,r0 ; Find out the line number EMT 375 ; Do it bcs 100$ ; Must be rt11 dec r0 ; Which line (1=console) bne 90$ ; Not console .DSTAT #rtwork,#pisys ; Console. See if this is a pro bcs 90$ ; Can't be. mov #cl0text,r1 ; For the STRCPY mov #cl0asn ,r0 ; Try to assign line 3 to CL1 EMT 375 ; Do it bcc 10$ ; Success mov #cl1text,r1 ; For the STRCPY mov #cl1asn ,r0 ; CL1 is busy, try CL1 for the PRO. EMT 375 ; Try it. bcs 90$ ; CL1 and CL1 are busy (unlikely). 10$: clr remote ; Say we are a local Kermit. clr tsxflg ; Use PRO code for CL mov sp ,tsxcl ; Flag TSX+ and CLn: mov sp ,proflg ; Say we are a PRO now. STRCPY #ttname ,r1 ; And copy the CL unit name STRCPY #ttdial ,r1 ; And copy the CL unit name MESSAGE PRINT r1 ; Dump the name MESSAGE ; CRLF mov sp ,tsxcl ; Set a flag now br 100$ ; Exit 90$: PRINT #k$tsx ; Dialup user mov sp ,remote ; Remote user flag 100$: .HERR ; Re-enable return ; Exit .dsabl lsb .save .psect rwdata ,rw,d,lcl,rel,con .even tsxlin: .byte 0,110 ; TSX-Plus get-line-number emt tsxmem: .byte 0,141 ; TSX-Plus GET More Memory .word 165300 + $$BUFP ; Should be enough tsxtrm: .byte 0,137 ; TSX-Plus Get terminal type cl0asn: .byte 0,155 ; Try to assign line 3 to CL0 .word 0 ; CL0 .word 3 ; Line 3 cl1asn: .byte 0,155 ; Try to assign line 3 to CL1 .word 1 ; CL1 .word 3 ; Line 3 cl0text:.asciz /CL0/ ; Asciz names cl1text:.asciz /CL1/ ; ... trmlst: .byte 0 ,1 ,2 ,3 ,4 ,5 .byte 6 ,7 ,8. ,9. ,-1 trmtyp: .byte TTY ,TTY ,VT100 ,TTY ,TTY ,TTY .byte TTY ,TTY ,TTY ,VT200 .even .psect $pdata dkdev: .rad50 /DK / nobuf: .ascii /??Kermit-11-F Insufficient space available for buffer pool/ .byte cr,lf .ascii /allocation. Please unload handlers or do a SET USR SWAP/ .byte cr,lf,0 nosj:: .asciz /Kermit-11 may not run correctly on a SJ monitor/ ttn: .asciz /RT-11 default terminal line set to unit / noclock:.ascii /This system does not appear to have a line clock./ .asciz /Kermit-11 may not run correctly./ xc$dev: .asciz /XC0:/ xcmsg: .asciz #PRO/350 comm port set to XC0K11RTIMAC[.050032]K11RTI.MAC[.050032]    X14|H [4;Ik(&'( k ߫H&P` \RrPP2PPzPP{PPPPP2P~\$\\TD 0D \~ hi) +\ ^( n ^( np\^txY\^ˀ\!kVk<\F˰<˴ˬ\VVkˤ1`@lP ABCDEFGHIJKLMNOPQRSTUVWXYZ$.?0123456789<@<SЬTЬ UQS>?\\\\\\\\\`:#@'="\abcdefghi\\\\\\\jklmnopqr\\\\\\\~stuvwxyz\\\\\\\\\\\\\\\\\\\\\\{ABCDEFGHI\\\\\\}JKLMNOPQR\\\\\\\\STUVWXYZ\\\\\\0123456789\\\\\  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~@ggh<i|o<m<4p<p<k|Zn<l fr rwx<x<x<x޺<w@]@@fjnr]Ze@@|> | |v<H|  |  |xz|  |zt f r   < &^ @&@'*/V,"?Lh:hmBmz|z{x`y~|fN|@@|@͂|@ ݃ƃ<ns<|Ŏ |️|ep|u|-@率|<ᄇ2ֻr||ZRM | ntB|xyvZw|J=|R>|J? nnaa|bddf:# k$tsx: .ascii /TSX-Plus remote mode/ crlf: .byte cr,lf,0 noxcmt: .ascii / This system lacks both XC and XL drivers, and has not been/ .byte cr,lf .ascii /generated for Multiple Terminal support. Only the CONSOLE/ .byte cr,lf .ascii /will be usable for Kermit. Eight bit prefixing support will/ .byte cr,lf .ascii /be required of the other Kermit for the transfer of binary/ .byte cr,lf .asciz /files./ .even nolog: .ascii /Packet status display disabled for FRUNed Kermit. Use/ .asciz /SET UPDATE 1 to enable packet status during transfer./ .even xcr50: .rad50 /XC / xlr50: .rad50 /XL / dkname: .asciz /DK:/ pisys: .rad50 /PI / .even .restore inqbuf::mov #90. ,r0 ; /42/ Large packets, no buffers return ; /42/ for RT11 however. GLOBAL GLOBAL .sbttl PIC code that gets relocated .psect piccod ,ro,i,lcl,rel,con loadpic:mov #picstart,r1 ; Starting address of code to be mov #picend-picstart+2,r0 ; relocated. Number of bytes bic #1 ,r0 ; Insure .EVEN (would be anyway) mov @r2 ,r3 ; Buffer address for code add r0 ,@r2 ; Point to next free address mov r3 ,k11$mul ; Insert address for EIS emulation add #p$mul-picstart,k11$mul ; Add offset mov r3 ,k11$div ; Again. add #p$div-picstart,k11$div ; Add offset mov r3 ,$ttyout ; Again add #p$ttyou-picstart,$ttyou; Add offset mov r3 ,$$cbta ; Again add #p$cbta-picstart,$$cbta ; Offset 10$: movb (r1)+ ,(r3)+ ; Copy sob r0 ,10$ ; Next please return ; Exit picstart = . p$mul:: mov r0 ,-(sp) mov r1 ,-(sp) mov 6(sp) ,r0 mov 10(sp) ,r1 mov r0,-(sp) mov #21,-(sp) clr r0 10$: ror r0 ror r1 bcc 20$ add 2(sp),r0 20$: dec (sp) bgt 10$ cmp (sp)+ ,(sp)+ mov r1 ,10(sp) mov (sp)+ ,r1 mov (sp)+ ,r0 mov (sp) ,2(sp) tst (sp)+ return p$div:: mov r0 ,-(sp) mov r1 ,-(sp) mov 6(sp) ,r0 mov 10(sp) ,r1 mov #20,-(sp) mov r1,-(sp) clr r1 e00040: asl r0 rol r1 cmp r1,(sp) bcs e00054 sub (sp),r1 inc r0 e00054: dec 2(sp) bgt e00040 cmp (sp)+ ,(sp)+ mov r1 ,6(sp) mov r0 ,10(sp) mov (sp)+ ,r1 mov (sp)+ ,r0 return p$ttyo: save ; save registers we may need mov @r5 ,r1 ; get the string address mov 2(r5) ,r2 ; get the string length bne 20$ ; non-zero then mov r1 ,r2 ; count until a null now 10$: tstb (r2)+ ; well ? bne 10$ ; not yet, keep looking sub r1 ,r2 ; get the length now dec r2 ; all done beq 100$ ; nothing to print at all? 20$: mov @#$prtbuf,r0 ; now buffer the i/o to avoid mov #36 ,r3 ; the printing of cr/lf at the 30$: tstb (r1)+ ; don't copy nulls please beq 35$ ; ignore if null movb -1(r1) ,(r0)+ ; copy a byte please 35$: dec r2 ; done yet ? beq 40$ ; yes sob r3 ,30$ ; no, next please 40$: movb #200 ,(r0)+ ; insure no carraige control ! clrb @r0 ; must be passed .asciz mov @#$prtbuf,r0 ; point back to the start of buffer emt 351 ; do the .print kmon request tst r2 ; any more data to buffer ? bne 20$ ; yes, try again 100$: unsave return .sbttl Conversion from RSX syslib P$CBTA: JSR R5,@#$SAVRG MOVB R2,R5 CLRB R2 SWAB R2 ASR R2 BCC E00134 TST R1 BPL E00134 NEG R1 MOVB #55,(R0)+ E00134: MOV R0,R4 ROR R2 ROR R2 ROR R3 CLRB R3 BISB R2,R3 CLRB R2 BISB #60,R2 MOV R1,R0 E00160: MOV R0,R1 CLR R0 DIV R5,R0 CMP R1,#11 BLOS E00200 ADD #7,R1 E00200: ADD R2,R1 MOV R1,-(SP) DECB R3 BLE E00234 TST R0 BNE E00230 TST R2 BPL E00234 TST R3 BPL E00230 BIC #20,R2 E00230: CALL E00160 E00234: MOVB (SP)+,(R4)+ MOV R4,R0 RETURN picend = . .blkw 2 .end