mirror of
https://github.com/PDP-10/its.git
synced 2026-01-28 21:01:16 +00:00
Added channa and dragon directories, and added sources for netime,
dmpcpy, fsdefs, modems, netwrk, and pft.
This commit is contained in:
committed by
Lars Brinkhoff
parent
62551208c4
commit
336bbaa979
8
src/channa/-read-.-this-
Executable file
8
src/channa/-read-.-this-
Executable file
@@ -0,0 +1,8 @@
|
||||
This directory is used by ITS for startup of
|
||||
various system programs; RAKASH * files are programs
|
||||
which, on system startup, ATSIGN TARAKA will load as
|
||||
system demons... NAMPIC * are files which the NAME
|
||||
demon uses for picture displays.
|
||||
|
||||
-- The Binders
|
||||
|
||||
1
src/channa/logout.times
Executable file
1
src/channa/logout.times
Executable file
@@ -0,0 +1 @@
|
||||
ALAN 01/23/57 10:10:10
|
||||
119
src/dragon/dragon.hoard
Executable file
119
src/dragon/dragon.hoard
Executable file
@@ -0,0 +1,119 @@
|
||||
DB Accounting File
|
||||
|
||||
NOT FOR EDITING BY ORDINARY MORTALS
|
||||
|
||||
~~~~~~~~~~~~ Daemons ~~~~~~~~~~~~
|
||||
|
||||
User Connect Run Time Swaps Logout
|
||||
|
||||
SYS JOB=SYS
|
||||
CORE JOB=JOB
|
||||
COMSAT
|
||||
TARAKA
|
||||
PFTHMG JOB=BDAY
|
||||
PFTHMG JOB=DRAGON
|
||||
PFTHMG JOB=*
|
||||
.CHAT. JOB=DEMON
|
||||
|
||||
###A## JOB=ARPA
|
||||
###A## JOB=*
|
||||
|
||||
###C## JOB=CHAOS
|
||||
###C## JOB=FILE
|
||||
###C## JOB=*
|
||||
|
||||
###F## JOB=FTP
|
||||
###F## JOB=NETRFC
|
||||
###F## JOB=*
|
||||
|
||||
###K## JOB=CHAOS
|
||||
###K## JOB=FILE
|
||||
###K## JOB=*
|
||||
|
||||
###M## JOB=CHAOS
|
||||
###M## JOB=TCP
|
||||
###T## JOB=TCP
|
||||
##TLNT JOB=TELSER
|
||||
##TLNU JOB=TELSER
|
||||
|
||||
-------------------------- PAGE SUBTOTALS --------------------------
|
||||
TOTALS
|
||||
|
||||
|
||||
~~~~~~~~~~~~ Not-logged-in Jobs ~~~~~~~~~~~~
|
||||
|
||||
User Connect Run Time Swaps Logout
|
||||
|
||||
___###
|
||||
GUEST
|
||||
LOGIN
|
||||
|
||||
-------------------------- PAGE SUBTOTALS --------------------------
|
||||
TOTALS
|
||||
|
||||
|
||||
~~~~~~~~~~~~ System Hackers ~~~~~~~~~
|
||||
|
||||
User Connect Run Time Swaps Logout
|
||||
|
||||
ALAN
|
||||
ALAN5
|
||||
BAWDEN
|
||||
CBF
|
||||
CENT
|
||||
CENT5
|
||||
CHRIS
|
||||
CSTACY
|
||||
DCP
|
||||
DEC
|
||||
DIGEX
|
||||
DPH
|
||||
ECC
|
||||
GREN
|
||||
GSB
|
||||
GSB5
|
||||
GZ
|
||||
JINX
|
||||
JNC
|
||||
JPG
|
||||
JTW
|
||||
KLH
|
||||
MOON
|
||||
MOON5
|
||||
OAF
|
||||
RDZ
|
||||
ROLL
|
||||
SRA
|
||||
TAFT
|
||||
TK
|
||||
|
||||
-------------------------- PAGE SUBTOTALS --------------------------
|
||||
TOTALS
|
||||
|
||||
|
||||
----------------------------- RANDOMS -----------------------------
|
||||
|
||||
User Connect Run Time Swaps Logout
|
||||
|
||||
-------------------------- PAGE SUBTOTALS --------------------------
|
||||
TOTALS
|
||||
|
||||
|
||||
------------------------------ TOTALS ------------------------------
|
||||
TOTALS
|
||||
|
||||
|
||||
STATS fups crfts core runt
|
||||
|
||||
STATS 0 0 0 0.0
|
||||
|
||||
FUPS - # of file updates
|
||||
CRFTYS - # of pieces of cruft pushed from logouts
|
||||
CORE - # of times core has been grown. Core is flushed when file updated.
|
||||
RUNT - runtime consumed by PFTHMG
|
||||
|
||||
This file is for period beginning 88.12.28 00:00:00
|
||||
|
||||
System Uptime Report
|
||||
|
||||
OK 88.12.28 00:00:00 0
|
||||
118
src/dragon/empty.hoard
Executable file
118
src/dragon/empty.hoard
Executable file
@@ -0,0 +1,118 @@
|
||||
ZZ Accounting File
|
||||
|
||||
NOT FOR EDITING BY ORDINARY MORTALS
|
||||
|
||||
~~~~~~~~~~~~ Daemons ~~~~~~~~~~~~
|
||||
|
||||
User Connect Run Time Swaps Logout
|
||||
|
||||
SYS JOB=SYS
|
||||
CORE JOB=JOB
|
||||
COMSAT
|
||||
TARAKA
|
||||
PFTHMG JOB=BDAY
|
||||
PFTHMG JOB=DRAGON
|
||||
PFTHMG JOB=*
|
||||
.CHAT. JOB=DEMON
|
||||
|
||||
###A## JOB=ARPA
|
||||
###A## JOB=*
|
||||
|
||||
###C## JOB=CHAOS
|
||||
###C## JOB=FILE
|
||||
###C## JOB=*
|
||||
|
||||
###F## JOB=FTP
|
||||
###F## JOB=NETRFC
|
||||
###F## JOB=*
|
||||
|
||||
###K## JOB=CHAOS
|
||||
###K## JOB=FILE
|
||||
###K## JOB=*
|
||||
|
||||
###M## JOB=CHAOS
|
||||
###M## JOB=TCP
|
||||
###T## JOB=TCP
|
||||
##TLNT JOB=TELSER
|
||||
##TLNU JOB=TELSER
|
||||
|
||||
-------------------------- PAGE SUBTOTALS --------------------------
|
||||
TOTALS
|
||||
|
||||
|
||||
~~~~~~~~~~~~ Not-logged-in Jobs ~~~~~~~~~~~~
|
||||
|
||||
User Connect Run Time Swaps Logout
|
||||
|
||||
___###
|
||||
GUEST
|
||||
LOGIN
|
||||
|
||||
-------------------------- PAGE SUBTOTALS --------------------------
|
||||
TOTALS
|
||||
|
||||
|
||||
~~~~~~~~~~~~ System Hackers ~~~~~~~~~
|
||||
|
||||
User Connect Run Time Swaps Logout
|
||||
|
||||
ALAN
|
||||
ALAN5
|
||||
BAWDEN
|
||||
CBF
|
||||
CENT
|
||||
CENT5
|
||||
CHRIS
|
||||
CSTACY
|
||||
DCP
|
||||
DEC
|
||||
DPH
|
||||
ECC
|
||||
GREN
|
||||
GSB
|
||||
GSB5
|
||||
GZ
|
||||
JINX
|
||||
JNC
|
||||
JPG
|
||||
JTW
|
||||
KLH
|
||||
MOON
|
||||
MOON5
|
||||
OAF
|
||||
RDZ
|
||||
ROLL
|
||||
SRA
|
||||
TAFT
|
||||
TK
|
||||
|
||||
-------------------------- PAGE SUBTOTALS --------------------------
|
||||
TOTALS
|
||||
|
||||
|
||||
----------------------------- RANDOMS -----------------------------
|
||||
|
||||
User Connect Run Time Swaps Logout
|
||||
|
||||
-------------------------- PAGE SUBTOTALS --------------------------
|
||||
TOTALS
|
||||
|
||||
|
||||
------------------------------ TOTALS ------------------------------
|
||||
TOTALS
|
||||
|
||||
|
||||
STATS fups crfts core runt
|
||||
|
||||
STATS 0 0 0 0.0
|
||||
|
||||
FUPS - # of file updates
|
||||
CRFTYS - # of pieces of cruft pushed from logouts
|
||||
CORE - # of times core has been grown. Core is flushed when file updated.
|
||||
RUNT - runtime consumed by PFTHMG
|
||||
|
||||
This file is for period beginning YY.MM.DD 00:00:00
|
||||
|
||||
System Uptime Report
|
||||
|
||||
OK YY.MM.DD 00:00:00 0
|
||||
644
src/sysen1/netime.127
Executable file
644
src/sysen1/netime.127
Executable file
@@ -0,0 +1,644 @@
|
||||
; -*- Midas -*-
|
||||
|
||||
title NETIME - Get the time from the network.
|
||||
|
||||
rdtim=:702200,, ; KS10 clock instructions.
|
||||
wrtim=:702600,,
|
||||
clk==:500 ; PD clock on KA10s and MX-KL
|
||||
|
||||
a=:1
|
||||
b=:2
|
||||
c=:3
|
||||
d=:4
|
||||
e=:5
|
||||
t=:6
|
||||
tt=:7
|
||||
|
||||
p=:17
|
||||
|
||||
ttyoch==:1
|
||||
netoch==:2
|
||||
nnetch==:<20-netoch>/2
|
||||
netich==:netoch+nnetch
|
||||
utilch==:2
|
||||
|
||||
call=:pushj p,
|
||||
return=:popj p,
|
||||
save==:push p,
|
||||
rest==:pop p,
|
||||
flose=:.lose %lsfil
|
||||
slose=:.lose %lssys
|
||||
pause=:.break 16,100000
|
||||
quit=:.logout 1,
|
||||
tyo=:.iot ttyoch,
|
||||
|
||||
define conc foo,bar
|
||||
foo!bar!termin
|
||||
|
||||
%f==:1,,525252 ; Flags in LH(0)
|
||||
%fhsts==:000002 ; Host table loaded?
|
||||
%ftime==:000004 ; Timer
|
||||
|
||||
repeat nnetch, conc %fnet,\.rpcnt,==:1_<netich+.rpcnt>
|
||||
|
||||
netmsk==:<1_nnetch-1>_netich
|
||||
|
||||
define syscall name,args
|
||||
.call [setz ? sixbit /name/ ? args(400000)]
|
||||
termin
|
||||
|
||||
popbj1: rest b
|
||||
popj1: aosa (p)
|
||||
popbj: rest b
|
||||
cpopj: return
|
||||
|
||||
datime"$$svng==:1
|
||||
datime"$$out==:1
|
||||
datime"$$abs==:1
|
||||
.insrt dsk:syseng;datime >
|
||||
|
||||
format"$$time==:1
|
||||
format"datime==:datime"twdasc
|
||||
format"time==:datime"timasc
|
||||
format"date==:datime"datasc
|
||||
format"$$pcode==:1
|
||||
.insrt dsk:syseng;format >
|
||||
|
||||
outstr: syscall siot,[movei ttyoch ? a ? b]
|
||||
slose
|
||||
return
|
||||
|
||||
define format &string&,args
|
||||
call [
|
||||
call $format
|
||||
.zzz.==-1
|
||||
irp arg,,[args]
|
||||
save arg
|
||||
.zzz.==.irpcnt
|
||||
termin
|
||||
hrroi a,[ascii string]
|
||||
movei b,.length string
|
||||
movni c,.zzz.+1
|
||||
jrst format"format]
|
||||
termin
|
||||
|
||||
$forma: save a
|
||||
save b
|
||||
save c
|
||||
save [.+2]
|
||||
jrst @-4(p)
|
||||
rest c
|
||||
rest b
|
||||
rest a
|
||||
rest (p)
|
||||
return
|
||||
|
||||
; Hosts are arranged first into three groups by approximate speed and
|
||||
; reliability. Each group is in alphabetical order. Presumably there is
|
||||
; little correlation between a machine's speed and reliability, and the
|
||||
; alphabetical position of its name.
|
||||
|
||||
hosts:
|
||||
|
||||
; Ask the reliable ITS machines first. They are all on subnet 6 and tend
|
||||
; to answer quickly.
|
||||
|
||||
<(sixbit /AI/)>,,[asciz "AI"]
|
||||
<(sixbit /MC/)>,,[asciz "MC"]
|
||||
<(sixbit /ML/)>,,[asciz "ML"]
|
||||
|
||||
; File servers tend to be up. Approximately in the order that they seem
|
||||
; likely to come up after a mass shutdown.
|
||||
|
||||
[asciz "REAGAN"]
|
||||
[asciz "ZERMATT"]
|
||||
[asciz "GOLDILOCKS"]
|
||||
[asciz "LIVE-OAK"]
|
||||
[asciz "PYGMALION"]
|
||||
[asciz "HEPHAESTUS"]
|
||||
|
||||
; Ordinary hosts. Alphabetical order.
|
||||
|
||||
[asciz "BIGBOOTE"]
|
||||
[asciz "CROSBY"]
|
||||
[asciz "DIALUP-CHAOS"]
|
||||
[asciz "GAAK"]
|
||||
[asciz "MINTAKA"]
|
||||
[asciz "OTIS"]
|
||||
[asciz "PIGPEN"]
|
||||
[asciz "SAFFRON"]
|
||||
[asciz "SINATRA"]
|
||||
|
||||
; Unreliable hosts start here. Putting hosts that tend to not answer at
|
||||
; the end keeps them from acting as a bottleneck. (It also gives them less
|
||||
; time to respond...)
|
||||
|
||||
<(sixbit /MD/)>,,[asciz "MD"]
|
||||
[asciz "GOLEM"]
|
||||
[asciz "LSD"]
|
||||
[asciz "EMACK-AND-BOLIOS"]
|
||||
|
||||
nhosts==:.-hosts
|
||||
|
||||
;;; Parameters that can be patched:
|
||||
|
||||
setp: -1 ; 0 => don't actually set the time.
|
||||
|
||||
wait: 20.*60. ; Wait 20 seconds polling other hosts.
|
||||
0 ? 0 ? 0 ; Zeros for .REALT just in case...
|
||||
|
||||
numerq: 2 ; Ceiling of 2/3 of the hosts that respond
|
||||
denomq: 3 ; must agree on the time.
|
||||
|
||||
minq: 4 ; Insist on at least 4 hosts with times in
|
||||
; agreement.
|
||||
|
||||
spread: 400. ; Times agree if they differ by less than
|
||||
; 400 seconds (6 mins 40 secs)
|
||||
|
||||
days: 3 ; If machine looks like it was down for
|
||||
; this many days, then require a human to
|
||||
; set the time.
|
||||
|
||||
filesn: sixbit /DRAGON/ ; The creation date of this file is some
|
||||
filen1: sixbit /DRAGON/ ; indication of what time the system last
|
||||
filen2: sixbit /HOARD/ ; thought it was.
|
||||
|
||||
.scalar lstime ; Creation date of above file.
|
||||
|
||||
.insrt dsk:system;chsdef >
|
||||
.vector opkt(%cpmxw) ; Output packet
|
||||
.vector ipkt(%cpmxw) ; Input packet
|
||||
|
||||
.vector state(nnetch) ; What each net channel is working on.
|
||||
|
||||
.vector times(nhosts) ; The time reported by each host.
|
||||
; In seconds since January 1, 1900, GMT.
|
||||
|
||||
.vector atimes(nhosts) ; The time we believe the host looked at
|
||||
; his clock. In 60ths of a second since
|
||||
; system was booted.
|
||||
|
||||
.scalar count ; The number of outstanding time requests.
|
||||
|
||||
lpdl==:100.
|
||||
.vector pdl(lpdl) ; The usual.
|
||||
|
||||
.scalar itsnam ; The name of this machine in SIXBIT.
|
||||
|
||||
usrvar: sixbit /OPTION/ ? tlo %opint\%opopc
|
||||
sixbit /MASK/ ? move [%pirlt\%piioc\%piwro\%pimpv\%pilos\%piilo]
|
||||
sixbit /MSK2/ ? movei netmsk
|
||||
lusrvar==:.-usrvar
|
||||
|
||||
go: .pdtime b,
|
||||
.suset [.rsuppro,,a]
|
||||
came b,[-1]
|
||||
jumpl a,[quit]
|
||||
movsi b,(sixbit /T00/)
|
||||
skipl a
|
||||
movsi b,(sixbit /TTY/)
|
||||
syscall open,[[.uao\%tjdis,,ttyoch] ? b]
|
||||
skipa
|
||||
jrst go1
|
||||
movei tt,5*30.
|
||||
.sleep tt,
|
||||
jrst go
|
||||
|
||||
go1: move tt,[%rlfls\%rlset,,wait]
|
||||
.realt tt,
|
||||
movsi 0,netmsk ; initial flags
|
||||
move p,[-lpdl,,pdl-1]
|
||||
move tt,[-lusrvar,,usrvar]
|
||||
syscall usrvar,[movei %jself ? tt]
|
||||
slose
|
||||
syscall sstatu,[repeat 6,[ ? movem itsnam]]
|
||||
slose
|
||||
syscall open,[[.uai\%donrf,,utilch] ? [sixbit /DSK/]
|
||||
filen1 ? filen2 ? filesn]
|
||||
jrst nofile
|
||||
syscall rfdate,[movei utilch ? movem lstime]
|
||||
flose
|
||||
.close utilch,
|
||||
irps sym,,[ka10p,kl10p,ks10p,pdtime,fyear]
|
||||
.scalar sym
|
||||
move tt,[squoze 0,sym]
|
||||
.eval tt,
|
||||
.lose
|
||||
movem tt,sym
|
||||
termin
|
||||
move tt,[squoze 0,ksfreq]
|
||||
.eval tt,
|
||||
movei tt,<<1000._12.>+30.>/60.
|
||||
movem tt,ksfreq
|
||||
|
||||
movei a,netgo
|
||||
movem a,state+0
|
||||
move tt,[state+0,,state+1]
|
||||
blt tt,state+nnetch-1
|
||||
setzm times+0
|
||||
move tt,[times+0,,times+1]
|
||||
blt tt,times+nhosts-1
|
||||
movei a,%corfc
|
||||
dpb a,[$cpkop opkt]
|
||||
movei a,4
|
||||
dpb a,[$cpknb opkt]
|
||||
move a,[.byte 8 ? "T ? "I ? "M ? "E]
|
||||
movem a,opkt+%cpkdt
|
||||
setzm count
|
||||
hrloi c,-1-nhosts ; C: aobjn into hosts
|
||||
loop: tlnn netmsk\%ftime
|
||||
.hang
|
||||
tlze %ftime
|
||||
jrst timout
|
||||
jffo .+1
|
||||
movei b,17.-netich
|
||||
sub b,a ; B: current net channel
|
||||
move t,state(b)
|
||||
hlrz d,t ; D: usually current host
|
||||
jrst (t)
|
||||
|
||||
tsint:
|
||||
loc 42
|
||||
-ltsint,,tsint
|
||||
loc tsint
|
||||
0,,p
|
||||
%piioc ? 0 ? 0 ? 0 ? iocint ; synchronous
|
||||
%pirlt ? 0 ? 0 ? 0 ? timint
|
||||
0 ? netmsk ? 0 ? 0 ? netint
|
||||
%piwro\%pimpv\%pilos\%piilo ? 0 ? -1 ? -1 ? badint
|
||||
ltsint==:.-tsint
|
||||
|
||||
dismis: setz ? sixbit /DISMIS/ ? setz p
|
||||
|
||||
badint: .close ttyoch, ; Close TTY channel to let hacker log in
|
||||
.value ; Leave a corpse
|
||||
|
||||
netint: tso -3(p)
|
||||
.call dismis
|
||||
slose
|
||||
|
||||
timint: tlo %ftime
|
||||
.call dismis
|
||||
slose
|
||||
|
||||
iocint: save t
|
||||
aos -1(p)
|
||||
hrrz t,-1(p)
|
||||
caie t,iocok+1
|
||||
.lose
|
||||
rest t
|
||||
.call dismis
|
||||
slose
|
||||
|
||||
netgo: aobjp c,nomore
|
||||
hllz a,hosts(c)
|
||||
camn a,itsnam ; Is this us?
|
||||
jrst netgo
|
||||
hrrz a,hosts(c)
|
||||
call look
|
||||
jrst netgo ; Must be gone or something?
|
||||
dpb a,[$cpkda opkt]
|
||||
syscall chaoso,[movei netich(b) ? movei netoch(b)]
|
||||
jrst netgo ; Chaosnet full? Broken?
|
||||
tdz netbit(b)
|
||||
syscall pktiot,[movei netoch(b) ? movei opkt]
|
||||
slose
|
||||
.rdtime tt,
|
||||
movem tt,atimes(c) ; Begin our wait
|
||||
hrrzi a,netin
|
||||
hrli a,(c)
|
||||
movem a,state(b)
|
||||
aos count
|
||||
jrst loop
|
||||
|
||||
netin: sos count
|
||||
iocok:: syscall pktiot,[movei netich(b) ? movei ipkt]
|
||||
jrst netgo ; IOC ints return to here.
|
||||
.rdtime tt,
|
||||
addm tt,atimes(d) ; End our wait (computes average in 60ths)
|
||||
ldb t,[$cpkop ipkt]
|
||||
caie t,%coans
|
||||
jrst netgo
|
||||
ldb t,[341000,,ipkt+%cpkdt]
|
||||
dpb t,[001000,,times(d)]
|
||||
ldb t,[241000,,ipkt+%cpkdt]
|
||||
dpb t,[101000,,times(d)]
|
||||
ldb t,[141000,,ipkt+%cpkdt]
|
||||
dpb t,[201000,,times(d)]
|
||||
ldb t,[041000,,ipkt+%cpkdt]
|
||||
dpb t,[301000,,times(d)]
|
||||
jrst netgo
|
||||
|
||||
netbit: repeat nnetch, 1_<netich+.rpcnt>,,0
|
||||
|
||||
nomore: syscall close,[movei netich(b)]
|
||||
slose
|
||||
syscall close,[movei netoch(b)]
|
||||
slose
|
||||
tdz netbit(b)
|
||||
movei a,[ jfcl ? .lose ]
|
||||
movem a,state(b)
|
||||
skipe count
|
||||
jrst loop
|
||||
jrst setime
|
||||
|
||||
.vector sorted(nhosts) ; Sorted indices of times.
|
||||
|
||||
timout::
|
||||
setime: skipn setp
|
||||
jrst sort
|
||||
setoi tt,
|
||||
.iotlsr tt,
|
||||
;; Set time relative to -now-.
|
||||
skipe ks10p
|
||||
rdtim kstime
|
||||
skipn ks10p
|
||||
datai clk,clktim
|
||||
sort: .rdtime e,
|
||||
lsh e,1 ; E: system time in 60ths
|
||||
addi e,30. ; (for rounding later)
|
||||
setzi b, ; B: # entries sorted so far
|
||||
movsi a,-nhosts ; A: aobjn into TIMES
|
||||
skipn c,times(a) ; C: time
|
||||
sortlp: aobjn a,.-1 ; Skip people who didn't answer
|
||||
jumpge a,vote
|
||||
move t,e ; Compute time since he looked at his clock
|
||||
sub t,atimes(a)
|
||||
idivi t,60. ; Convert to seconds (rounded)
|
||||
add c,t
|
||||
movem c,times(a)
|
||||
skipn d,b ; D: candidate index for insertion
|
||||
jrst sort0
|
||||
sort1: move tt,sorted-1(d)
|
||||
camge c,times(tt)
|
||||
sojg d,sort1
|
||||
sort0: movei tt,(d)
|
||||
subi tt,1(b)
|
||||
hrli d,(tt) ; D: aobjn into part or SORTED to move
|
||||
movei tt,(a) ; The index to insert
|
||||
exch tt,sorted(d)
|
||||
aobjn d,.-1
|
||||
aoja b,sortlp
|
||||
|
||||
.scalar ntimes ; The number of people who responded.
|
||||
.scalar quorum ; The size of a quorum
|
||||
|
||||
vote: movem b,ntimes
|
||||
imul b,numerq
|
||||
add b,denomq
|
||||
soj b,
|
||||
idiv b,denomq
|
||||
camge b,minq
|
||||
move b,minq
|
||||
movem b,quorum
|
||||
setzi a,0 ; A: index of possible lowest good time
|
||||
soj b, ; B: must agree with A for quorum
|
||||
low: caml b,ntimes
|
||||
jrst nogo
|
||||
move tt,sorted(b)
|
||||
move t,times(tt)
|
||||
move tt,sorted(a)
|
||||
sub t,times(tt)
|
||||
camg t,spread
|
||||
jrst gotlow
|
||||
aoj a,
|
||||
aoja b,low
|
||||
|
||||
gotlow: move b,ntimes
|
||||
movei c,-1(b) ; C: index of possible highest good time
|
||||
sub b,quorum ; B: must agree with C for quorum
|
||||
high: move tt,sorted(c)
|
||||
move t,times(tt)
|
||||
move tt,sorted(b)
|
||||
sub t,times(tt)
|
||||
camg t,spread
|
||||
jrst gotime
|
||||
soj b,
|
||||
soja c,high
|
||||
|
||||
.scalar lowest ; Index of lowest of good times.
|
||||
.scalar highest ; Index of highest of good times.
|
||||
.scalar median ; Index of median of good times.
|
||||
.scalar host ; Pointer to ASCIZ name of winning host.
|
||||
.scalar time ; Winning network time.
|
||||
.scalar qtime ; Winning network time in disk format.
|
||||
.scalar qzone ; SIXBIT timezone of QTIME.
|
||||
.scalar year ; Year of winner.
|
||||
.scalar ticks ; PD-ticks since January 1 of winner.
|
||||
.scalar ksfreq ; KS-tick per PD-tick
|
||||
.vector kstime(2) ; Set time relative to this.
|
||||
.scalar clktim ; Or this.
|
||||
|
||||
s%d==:24.*60.*60.
|
||||
s%y==:365.*s%d
|
||||
s%est==:datime"estdif*60.*60.
|
||||
gotime: movem a,lowest
|
||||
movem c,highest
|
||||
addi c,1(a)
|
||||
lsh c,-1
|
||||
movem c,median
|
||||
move tt,sorted(c)
|
||||
hrro a,hosts(tt)
|
||||
movem a,host
|
||||
move a,times(tt)
|
||||
movem a,time
|
||||
call cvtime
|
||||
movem e,qzone
|
||||
movem a,qtime
|
||||
move b,lstime
|
||||
call datime"timsub
|
||||
add a,spread ; Allow for the usual fuzz...
|
||||
jumpl a,past
|
||||
move tt,days
|
||||
imuli tt,s%d
|
||||
camle a,tt
|
||||
jrst future
|
||||
ldb b,[.bp datime"tm%yr,qtime] ; EST and EDT always agree about
|
||||
movei tt,1900.(b) ; the year!
|
||||
movem tt,year
|
||||
subi b,1 ; (Compensates for the fact that 1900. was
|
||||
idivi b,4 ; not a leap year. (Screws up if you give
|
||||
addi c,1 ; a time in 1900., but who cares?))
|
||||
imul b,[4*s%y+s%d]
|
||||
imul c,[s%y]
|
||||
add b,c ; B: Seconds from 1/1/00 to this year.
|
||||
move a,time
|
||||
subi a,s%est ; GMT -> EST
|
||||
sub a,b
|
||||
imuli a,60.
|
||||
movem a,ticks
|
||||
skipn setp
|
||||
jrst nsetp
|
||||
|
||||
skipn ks10p
|
||||
jrst notks
|
||||
dmove a,kstime
|
||||
hrrz a,a ; Clear possible gubbish from high bits.
|
||||
div a,ksfreq ; KS-ticks -> PD-ticks
|
||||
jrst doit
|
||||
|
||||
notks: move a,clktim
|
||||
tlz a,600000 ; Clear possible gubbish from high bits.
|
||||
;; On a KA if this is zero then apparently the PD clock is off.
|
||||
;; Fix this code to deal with that if you try to bring this code up
|
||||
;; on a KA (see PDSET program). (Where did you find a working ITS
|
||||
;; KA10 anyway?)
|
||||
skipe ka10p
|
||||
.lose
|
||||
doit: sub a,ticks ; A: offset for loading into PDTIME
|
||||
format "~&Setting the time to be ~Q ~S ~
|
||||
(supplied by ~A).~&",[qtime,qzone,host]
|
||||
move tt,fyear
|
||||
hrli tt,year
|
||||
.setloc tt,
|
||||
move tt,pdtime
|
||||
hrli tt,a
|
||||
.setloc tt,
|
||||
skipa ; This is supposed to give the SETLOC
|
||||
skipa ; a chance to happen before starting the
|
||||
.hang ; clock.
|
||||
setoi tt,
|
||||
.iotlsr tt,
|
||||
skipe kl10p
|
||||
cono clk,400007 ; Start clock on KL
|
||||
skipn ks10p
|
||||
quit
|
||||
rdtim t
|
||||
hrli t,1729.
|
||||
wrtim t
|
||||
quit
|
||||
|
||||
nsetp: format "~&Would have set the time to be ~Q ~S (supplied by ~A).~
|
||||
~& FYEAR/ ~D. PDTIME/ ~D.~&",[qtime,qzone,host,year,ticks]
|
||||
call table
|
||||
quit
|
||||
|
||||
notset: format "
|
||||
|
||||
Attention!
|
||||
|
||||
Attention!
|
||||
|
||||
The time could not be set because:"
|
||||
call (a)
|
||||
format "~&It will be necessary for someone to set the time~@
|
||||
manually by logging in and running :PDSET.~2&"
|
||||
quit
|
||||
|
||||
nofile: jsp a,notset
|
||||
format "~&There was an error accessing the file ~
|
||||
~S;~S ~S.",[filesn,filen1,filen2]
|
||||
return
|
||||
|
||||
bogus: format "~&The best time, ~Q ~S (supplied by ~A),",[qtime,qzone,host]
|
||||
call (a)
|
||||
format "~Q, the creation date of ~
|
||||
~S;~S ~S.",[lstime,filesn,filen1,filen2]
|
||||
return
|
||||
|
||||
future: jsp a,notset
|
||||
jsp a,bogus
|
||||
format " was more than~&~D day~P beyond ",[days]
|
||||
return
|
||||
|
||||
past: jsp a,notset
|
||||
jsp a,bogus
|
||||
format " was~&prior to "
|
||||
return
|
||||
|
||||
nogo: jsp a,notset
|
||||
skipn t,ntimes
|
||||
jrst nogo0
|
||||
camge t,quorum
|
||||
jrst nogo1
|
||||
format "~&Of the ~D answer~P recieved, ~
|
||||
no ~D agreed to within ~D seconds.",[ntimes,quorum,spread]
|
||||
return
|
||||
|
||||
nogo0: format "~&No host responded."
|
||||
return
|
||||
|
||||
nogo1: format "~&Only ~D host~P responded.",ntimes
|
||||
return
|
||||
|
||||
;;; CALL TABLE: Print a table of everything we know.
|
||||
table: save a
|
||||
save b
|
||||
save e
|
||||
format "~&~D host~P responded.",ntimes
|
||||
skipe count
|
||||
format " ~D outstanding request~P.",count
|
||||
movei b,0
|
||||
tablel: caml b,ntimes
|
||||
jrst tablex
|
||||
move tt,sorted(b)
|
||||
move a,times(tt)
|
||||
call cvtime
|
||||
move tt,sorted(b)
|
||||
hrro t,hosts(tt)
|
||||
format "~&~3<~D~>: ~Q ~S ~A",[b,a,e,t]
|
||||
aoja b,tablel
|
||||
|
||||
tablex: format "~&Low=~D High=~D Median=~D",[lowest,highest,median]
|
||||
format "~&Quorum=~D Spread=~D sec.~&",[quorum,spread]
|
||||
rest e
|
||||
rest b
|
||||
rest a
|
||||
return
|
||||
|
||||
;;; CALL CVTIME: Convert network time to local disk format time word.
|
||||
;;; A (arg): network time
|
||||
;;; A (val): disk format date
|
||||
;;; E (val): SIXBIT of timezone
|
||||
cvtime: subi a,s%est ; GMT -> EST
|
||||
call datime"sectim ; -> disk format date
|
||||
save b
|
||||
movei b,60.*60.
|
||||
call datime"odayl
|
||||
skipa e,[sixbit /EDT/]
|
||||
skipa e,[sixbit /EST/]
|
||||
call datime"timadd
|
||||
rest b
|
||||
return
|
||||
|
||||
netwrk"$$hstmap==:1
|
||||
netwrk"$$hostnm==:1
|
||||
netwrk"$$symlook==:1
|
||||
netwrk"$$chaos==:1
|
||||
.insrt dsk:syseng;netwrk >
|
||||
|
||||
;;; CALL LOOK: Look up the Chaosnet address of a host.
|
||||
;;; A (arg): address of ASCIZ string
|
||||
;;; A (val): host number
|
||||
;;; Skips if the host is found.
|
||||
look: save b
|
||||
tloe %fhsts
|
||||
jrst look1
|
||||
save a
|
||||
movei a,ffpage
|
||||
movei b,utilch
|
||||
.iopush utilch,
|
||||
call netwrk"hstmap
|
||||
.lose
|
||||
.iopop utilch,
|
||||
rest a
|
||||
look1: call netwrk"hstlook
|
||||
jrst popbj
|
||||
rest b
|
||||
aos (p)
|
||||
return
|
||||
|
||||
cnstnts:
|
||||
constants
|
||||
|
||||
patch::
|
||||
pat: block 100.
|
||||
|
||||
variables
|
||||
|
||||
ffaddr: -1 ; Make memory exist
|
||||
|
||||
ffpage==:<ffaddr+1777>_-12
|
||||
|
||||
end go
|
||||
153
src/syseng/dmpcpy.11
Executable file
153
src/syseng/dmpcpy.11
Executable file
@@ -0,0 +1,153 @@
|
||||
; -*- MIDAS -*-
|
||||
|
||||
TITLE DMPCPY - COPY DUMPS FROM SWAP AREA TO FILE AREA
|
||||
|
||||
A=1
|
||||
B=2
|
||||
C=3
|
||||
D=4
|
||||
E=5
|
||||
T=6
|
||||
TT=7
|
||||
P=17
|
||||
|
||||
CHDIRI=10
|
||||
CHDSKI=11
|
||||
CHDSKO=12
|
||||
|
||||
.INSRT SYSENG;FSDEFS >
|
||||
|
||||
PDL: -20,,.
|
||||
BLOCK 20
|
||||
|
||||
;DIRECTORIES WHERE STUFF MIGHT GET DUMPED OUT OF TIMESHARING
|
||||
DIRLST: SIXBIT/./
|
||||
SIXBIT/CRASH/
|
||||
SIXBIT/CRASH2/
|
||||
NDIRS==.-DIRLST
|
||||
|
||||
DIR: BLOCK 2000
|
||||
BUF: BLOCK 2000
|
||||
|
||||
USRVAR: SIXBIT /OPTION/ ? TLO %OPINT\%OPOPC
|
||||
SIXBIT /MASK/ ? MOVE [%PIIOC\%PIPDL]
|
||||
LUSRVAR==:.-USRVAR
|
||||
|
||||
GO: .CLOSE 1, ;RUNS AS DAEMON
|
||||
MOVE P,PDL
|
||||
MOVE TT,[-LUSRVAR,,USRVAR]
|
||||
.CALL [ SETZ ? SIXBIT /USRVAR/
|
||||
MOVEI %JSELF
|
||||
SETZ TT ]
|
||||
.LOSE %LSSYS
|
||||
CHKTIM: .CALL [ SETZ ? SIXBIT /RQDATE/ ; don't frob with files
|
||||
SETZM A ] ; if system doesn't know the time
|
||||
.LOSE %LSSYS
|
||||
AOJN A,KNOTIM
|
||||
MOVEI A,30.*15. ; 15 seconds
|
||||
.SLEEP A,
|
||||
JRST CHKTIM
|
||||
|
||||
KNOTIM: MOVSI E,-NDIRS
|
||||
CHKDIR: .CALL [ SETZ ? SIXBIT/OPEN/
|
||||
[.BII,,CHDIRI]
|
||||
[SIXBIT/DSK/]
|
||||
[SIXBIT/.FILE./]
|
||||
[SIXBIT/(DIR)/]
|
||||
SETZ DIRLST(E)]
|
||||
JRST NXTDIR ; Hey, there might not -be- such a directory!
|
||||
MOVE TT,[-2000,,DIR]
|
||||
.IOT CHDIRI,TT
|
||||
.CLOSE CHDIRI,
|
||||
MOVE D,UDNAMP+DIR
|
||||
CHKFIL: CAIL D,2000
|
||||
JRST NXTDIR
|
||||
MOVE TT,UNRNDM+DIR(D)
|
||||
SKIPGE UNDATE+DIR(D)
|
||||
TLNE TT,UNDUMP\UNIGFL\UNREAP\UNLINK ; Don't screw with files
|
||||
JRST NXTFIL ; you don't understand.
|
||||
;HERE WE HAVE FOUND A FILE WRITTEN OUT OF TIMESHARING
|
||||
;COPY IT SO AS TO (1) SET THE FILE DATE AND (2) GET IT OUT
|
||||
; OF THE SWAPPING AREA. NTS FILES ARE WRITTEN IN THE SWAPPING
|
||||
; AREA TO DECREASE THE PROBABILITY OF CLOBBERING SOME OTHER FILE.
|
||||
.CALL [ SETZ ? SIXBIT/OPEN/
|
||||
MOVES TT
|
||||
[.BII,,CHDSKI]
|
||||
[SIXBIT/DSK/]
|
||||
UNFN1+DIR(D)
|
||||
UNFN2+DIR(D)
|
||||
SETZ DIRLST(E) ]
|
||||
JSP T,[ CAIE TT,%ENSFL ; perhaps a hacker deleted it
|
||||
CAIN TT,%ENAPK ; perhaps that pack had to go offline
|
||||
JRST NXTFIL
|
||||
JRST LOSE ]
|
||||
.CALL [ SETZ ? SIXBIT/OPEN/
|
||||
MOVES TT
|
||||
[.BIO,,CHDSKO]
|
||||
[SIXBIT/DSK/]
|
||||
[SIXBIT/_DMPCP/]
|
||||
[SIXBIT/OUTPUT/]
|
||||
SETZ DIRLST(E) ]
|
||||
JSP T,[ CAIE TT,%EFLDR
|
||||
JRST LOSE
|
||||
MOVEI TT,30.*60.*5 ; 5 minutes
|
||||
.SLEEP TT,
|
||||
JRST .-1 ]
|
||||
CPYFIL: MOVE TT,[-2000,,BUF]
|
||||
.IOT CHDSKI,TT
|
||||
MOVEI T,-BUF(TT)
|
||||
JUMPE T,ENDFIL
|
||||
MOVNS T
|
||||
MOVSS T
|
||||
HRRI T,BUF
|
||||
.IOT CHDSKO,T
|
||||
JRST CPYFIL
|
||||
|
||||
ENDFIL: .CLOSE CHDSKI,
|
||||
.CALL [ SETZ ? 'RENMWO
|
||||
MOVEI CHDSKO
|
||||
UNFN1+DIR(D)
|
||||
SETZ UNFN2+DIR(D) ]
|
||||
.LOSE %LSSYS
|
||||
.CLOSE CHDSKO,
|
||||
NXTFIL: ADDI D,LUNBLK
|
||||
JRST CHKFIL
|
||||
|
||||
NXTDIR: AOBJN E,CHKDIR
|
||||
.LOGOUT 1,
|
||||
.VALUE
|
||||
|
||||
; JSP T,LOSE is like .LOSE %LSFIL(TT)
|
||||
LOSE: .CALL [ SETZ ? SIXBIT /LOSE/
|
||||
MOVEI %LSFIL(TT)
|
||||
SETZI -2(T) ]
|
||||
.LOSE %LSSYS
|
||||
|
||||
TSINT:
|
||||
LOC 42
|
||||
-LTSINT,,TSINT
|
||||
LOC TSINT
|
||||
P
|
||||
%PIIOC ? 0 ? %PIIOC ? 0 ? IOCINT
|
||||
LTSINT==:.-TSINT
|
||||
|
||||
; If there is a disk or directory full problem, wait for someone to notice.
|
||||
IOCINT: PUSH P,T
|
||||
.SUSET [.RBCHN,,T]
|
||||
CAIE T,CHDSKO
|
||||
.LOSE
|
||||
.STATUS CHDSKO,T
|
||||
LDB T,[330500,,T]
|
||||
CAIE T,11 ; DEVICE FULL
|
||||
CAIN T,14 ; DIRECTORY FULL
|
||||
JRST WAIT
|
||||
.VALUE
|
||||
|
||||
WAIT: MOVEI T,30.*60.*5 ; 5 minutes
|
||||
.SLEEP T,
|
||||
POP P,T
|
||||
.CALL [ SETZ ? SIXBIT /DISMIS/
|
||||
SETZ P ]
|
||||
.LOSE %LSSYS
|
||||
|
||||
END GO
|
||||
154
src/syseng/fsdefs.40
Executable file
154
src/syseng/fsdefs.40
Executable file
@@ -0,0 +1,154 @@
|
||||
.AUXIL
|
||||
|
||||
IFNDEF DEFSYM,[ ;ALLOW USER TO USE SYMBOLS IN OTHER WAYS IF HE WISHES.
|
||||
;BUT NORMALLY, DEFSYM FOO==BAR DOES FOO==BAR WITH ERROR CHECK.
|
||||
DEFINE DEFSYM X/
|
||||
IRPS Z,,[X]
|
||||
IFNDEF Z,X
|
||||
.ELSE [
|
||||
$$TEM1==Z
|
||||
X
|
||||
IFN Z-$$TEM1,.ERR Z MULTIPLY .QUOTE`.QUOTE/DEFINED/`
|
||||
]
|
||||
.ISTOP
|
||||
TERMIN TERMIN
|
||||
|
||||
IFLE .MLLIT,.ERR .MLLIT MUST BE 1; SETTING IT TO 1.
|
||||
.MLLIT==1
|
||||
$$TEMP==1
|
||||
]
|
||||
.ELSE $$TEMP==0
|
||||
|
||||
;FILE SYSTEM PARAMETERS - APPLIES TO ALL ITS MACHINES
|
||||
|
||||
;9/5/79 - tut format changed!
|
||||
|
||||
;MFD INFO
|
||||
|
||||
IFDEF NBLKS,[ ;MFDBLK KNOWN ONLY IF .INSRT APPROPRIATE PHYSICAL PARAMS FILE
|
||||
DEFSYM MFDBLK==NBLKS/2-1 ;LOC ON DISK
|
||||
DEFSYM MFDCYL==MFDBLK/NBLKSC
|
||||
DEFSYM MFDSRF==<MFDBLK-MFDCYL*NBLKSC>*SECBLK/NSECS
|
||||
DEFSYM MFDSEC==<MFDBLK-MFDCYL*NBLKSC>*SECBLK-MFDSRF*NSECS
|
||||
]
|
||||
;RANDOM INFO IN MFD
|
||||
DEFSYM MDNUM==0 ;ASCENDING DIR NUM
|
||||
DEFSYM MDNAMP==1 ;PNTR TO ORG OF USER NAME BLOCK AREA
|
||||
DEFSYM MDYEAR==2 ;CURRENT YEAR
|
||||
DEFSYM MPDOFF==3 ;DE-CORIOLIS CLOCK OFFSET
|
||||
DEFSYM MPDWDK==4 ;PREFERRED WRITING DISK (PHYSICAL DRIVE #)
|
||||
DEFSYM MDCHK==5 ;THIS WORD MUST BE M.F.D. (FOR CHECKING)
|
||||
DEFSYM MDNUDS==6 ;NUMBER USER DIRECTORIES (FOR CHECKING ONLY)
|
||||
DEFSYM LMIBLK==7 ;TOTAL STG USED BY HACKS LIKE THIS
|
||||
;USER NAME BLKS FROM C(MDNAMP) TO END
|
||||
DEFSYM LMNBLK==2 ;# WDS/BLK
|
||||
DEFSYM MNUNAM==0 ;6BIT USER NAME
|
||||
;SECOND WORD OF A USER-NAME BLOCK IS ZERO.
|
||||
;DECUUO CONTAINS A KLUDGE WHICH DEPENDS ON THIS,
|
||||
;PLEASE NOTIFY BUG-DECUUO BEFORE CHANGING IT.
|
||||
|
||||
;TUT INFO
|
||||
|
||||
IFDEF NBLKS,[
|
||||
DEFSYM TUTBLK==MFDBLK-NTUTBL ;LOC ON DISK
|
||||
DEFSYM TUTCYL==TUTBLK/NBLKSC
|
||||
DEFSYM TUTSRF==<TUTBLK-TUTCYL*NBLKSC>*SECBLK/NSECS
|
||||
DEFSYM TUTSEC==<TUTBLK-TUTCYL*NBLKSC>*SECBLK-TUTSRF*NSECS
|
||||
]
|
||||
DEFSYM TUTBYT==3 ;SIZE OF BYTES (USED TO BE 4)
|
||||
DEFSYM TUTBP==<440000+TUTBYT_6>,,
|
||||
DEFSYM TUTEPW==36./TUTBYT ;NUMBER OF ENTRIES PER WORD
|
||||
DEFSYM TUTMAX==1_TUTBYT
|
||||
DEFSYM TUTLK==TUTMAX-1 ;HIGHEST CODE MEANS LOCKED OUT
|
||||
DEFSYM TUTMNY==TUTLK-1 ;TUT MANY OR MORE REFS
|
||||
|
||||
;RANDOM INFO IN TUT (AT THE FRONT)
|
||||
DEFSYM QPKNUM==0 ;PACK #
|
||||
DEFSYM QPAKID==1 ;PACK ID
|
||||
DEFSYM QTUTP==2 ;FREE SPACE POINTER TO TRACK AREA. ADVANCE BY CYLINDERS
|
||||
DEFSYM QSWAPA==3 ;SWAPPING AREA. FIRST TRACK OF NON-SWAPPING AREA
|
||||
;NEW FILES WILL NOT BE WRITTEN LOWER THAN THIS.
|
||||
DEFSYM QFRSTB==4 ;FIRST BLOCK TUT'ED
|
||||
DEFSYM QLASTB==5 ;LAST BLOCK TUT'ED
|
||||
DEFSYM QTRSRV==6 ;-1 IF ONLY ALLOCATED DIRS CAN HAVE FILES ON THIS PACK
|
||||
;IF NOT 0 AND NOT -1, SIXBIT NAME OF "SECONDARY" PACK
|
||||
;STG FOR RANDOM INFO ^
|
||||
DEFSYM LTIBLK==20 ;BYTES MAPPING THE DISK START HERE
|
||||
|
||||
;UFD INFO
|
||||
;IF A IS RELATIVE LOCATION OF MFD ENTRY, USER DIR IS LOCATED IN
|
||||
;TRACK NUMBERED <A-2000+2*MDNUDS>/2 (SEE QFL2)
|
||||
|
||||
DEFSYM UFDBYT==6 ;SIZE OF BYTES (Do not change!)
|
||||
DEFSYM UFDBPW==36./UFDBYT ;NUMBER OF BYTES PER WORD
|
||||
|
||||
;RANDOM INFO IN UFD
|
||||
DEFSYM UDESCP==0 ;FS PNTR TO DESC AREA
|
||||
DEFSYM UDNAMP==1 ;PNTR TO ORG OF NAME AREA
|
||||
DEFSYM UDNAME==2 ;USER NAME (FOR CHECKING)
|
||||
DEFSYM UDBLKS==3 ;LEFT HALF HAS AMOUNT OF SPACE ALLOCATED (NOT USED
|
||||
; CURRENTLY BY SYSTEM), RIGHT HALF HAS NUMBER OF BLOCKS USED.
|
||||
DEFSYM UDALLO==4 ;IF NONZERO, LEFT HALF HAS DISK NUMBER, RIGHT
|
||||
; HALF HAS AMOUNT OF SPACE ALLOCATED
|
||||
DEFSYM UDDESC==11. ;FIRST LOC AVAIL FOR DESC
|
||||
|
||||
;UFD DESCRIPTORS
|
||||
;0 => FREE 1-UDTKMX => TAKE NEXT N
|
||||
;UDTKMX+1 THRU UDWPH-1 => SKIP N-UDTKMX AND TAKE ONE
|
||||
;UDWPH => WRITE-PLACE-HOLDER
|
||||
;40 BIT SET => LOAD ADDRESS. LOWER 5 BITS PLUS NEXT NXLBYT (2)
|
||||
; CHARS (17 BITS IN ALL)
|
||||
;40 BIT & 20 BIT => "FUNNY" BLOCK IF DMDSK. WHAT IS THIS, ANYWAY?
|
||||
;END BY 0
|
||||
|
||||
;IF LINK DESCR
|
||||
;6 CHAR OR UNTIL ; = SYS NAME. MUST HAVE NO CHAR = 0 IN THIS OR NEXT 2 NAMES
|
||||
;NEXT CHAR QUOTED BY : (FOR NAMES WITH : OR ;)
|
||||
;NEXT CHAR N1
|
||||
;NEXT CHAR N2
|
||||
;END BY 0
|
||||
|
||||
DEFSYM UDTKMX==12. ;HIGHEST "TAKE N" CODE
|
||||
DEFSYM UDWPH==31. ;PLACE HOLDER ON WRITE (OR NULL FILE)
|
||||
DEFSYM UDSKMX==UDWPH-UDTKMX-1 ;# BLOCKS THAT CAN BE SKIPPED
|
||||
DEFSYM NXLBYT==2 ;# ADDITIONAL BYTES FOR LOAD ADDR
|
||||
;IN SYSTEM THIS IS DEFINED AT FRONT OF FILE
|
||||
|
||||
;NAME AREA DATA
|
||||
|
||||
DEFSYM LUNBLK==5 ;WDS/NAME BLK
|
||||
DEFSYM UNFN1==0 ;FIRST FN
|
||||
DEFSYM UNFN2==1 ;SECOND FN
|
||||
DEFSYM UNRNDM==2 ;ALL KINDS OF RANDOM INFO
|
||||
DEFSYM UNDSCP==1500,, ;PNTR TO DESC
|
||||
DEFSYM UNPKN==150500,, ;PACK #
|
||||
DEFSYM UNLINK==1 ;LINK BIT
|
||||
DEFSYM UNLNKB==220100,,
|
||||
DEFSYM UNREAP==2 ;IF 1, DONT REAP FILE
|
||||
DEFSYM UNWRIT==4 ;OPEN FOR WRITING
|
||||
DEFSYM UNMARK==10 ;GC MARK BIT
|
||||
DEFSYM UNCDEL==20 ;DEL WHEN CLOSED
|
||||
DEFSYM DELBTS==20 ;DELETED -- IGNORE
|
||||
DEFSYM UNIGFL==24 ;BITS TO IGNORE FILE
|
||||
DEFSYM UNWRDC==301200,, ;WORD COUNT OF LAST BLOCK MOD 2000
|
||||
DEFSYM UNDUMP==400000 ;HAS BEEN DUMPED
|
||||
DEFSYM UNDATE==3 ;DATE ETC.
|
||||
DEFSYM UNTIM==2200,, ;COMPACTED TIME OF CREATION
|
||||
DEFSYM UNYMD==222000,, ;Y,M,D OF CREATION
|
||||
DEFSYM UNMON==270400,, ;MONTH
|
||||
DEFSYM UNDAY==220500,, ;DAY
|
||||
DEFSYM UNYRB==330700,, ;YEAR
|
||||
DEFSYM UNREF==4 ;REFERENCE DATE SAME AS LEFT HALF OF UNDATE
|
||||
DEFSYM UNREFD==222000,, ;REFERENCE DATE BYTE POINTER
|
||||
DEFSYM UNAUTH==111100,, ;MFD INDEX OF AUTHOR, ALL 1=> NO DIRECTORY
|
||||
DEFSYM UNBYTE==001100,, ;FILE BYTE SIZE AND LENGTH INFO.
|
||||
;LET S=BITS PER BYTE, C=COUNT OF UNUSED BYTES IN LAST WD
|
||||
;400+100xS+C S=1 TO 3 C=0 TO 35.
|
||||
;200+20xS+C S=4 TO 7 C=0 TO 8
|
||||
;44+4xS+C S=8 TO 18. C=0 TO 3
|
||||
;44-S S=19. TO 36. C=0
|
||||
;NOTE THAT OLD FILES HAVE UNBYTE=0 => S=36.
|
||||
|
||||
IF1 IFDEF NUDSL, IFG NUDSL*LMNBLK+LMIBLK-2000,.ERR MFD LOSES
|
||||
|
||||
IFN $$TEMP,EXPUNG DEFSYM
|
||||
96
src/syseng/modems.20
Executable file
96
src/syseng/modems.20
Executable file
@@ -0,0 +1,96 @@
|
||||
; -*- Midas -*-
|
||||
|
||||
title MODEMS - Initialize Hairy Modems
|
||||
; Here in the future, modems are smarter than we are.
|
||||
|
||||
a=:1
|
||||
b=:2
|
||||
c=:3
|
||||
d=:4
|
||||
e=:5
|
||||
t=:6
|
||||
tt=:7
|
||||
|
||||
chttyo=:10
|
||||
|
||||
slose=:.lose %lssys
|
||||
quit=:.logout 1,
|
||||
tyo=:.iot chttyo,
|
||||
|
||||
define syscall name,args
|
||||
.call [setz ? sixbit /name/ ? args(400000)]
|
||||
termin
|
||||
|
||||
go: syscall sstatu,[repeat 6,[ ? movem a]]
|
||||
slose
|
||||
movsi b,-lmchtab
|
||||
came a,mchtab(b)
|
||||
aobjn b,.-1
|
||||
jumpge b,done
|
||||
move a,tabtab(b)
|
||||
loop: hlrz b,(a)
|
||||
syscall ttyvar,[movei 400000(b) ? [sixbit /TTYTYP/] ? movem c]
|
||||
slose
|
||||
trnn c,%tydil
|
||||
jrst next
|
||||
idivi b,10
|
||||
hrlzi c,'T00(c)
|
||||
lsh b,24.
|
||||
add b,c
|
||||
syscall open,[[.uao\%tjsio,,chttyo] ? b]
|
||||
jrst next
|
||||
syscall ttyget,[movei chttyo ? movem b ? movem b ? movem b]
|
||||
slose
|
||||
tlne b,%tscns
|
||||
jrst next ; Don't diddle our own console!
|
||||
.reset chttyo,
|
||||
syscall ttyset,[movei chttyo
|
||||
[<010101,,010101>*%tgact]
|
||||
[<010101,,010101>*%tgact]]
|
||||
slose
|
||||
hrrz b,(a)
|
||||
hrli b,440700
|
||||
jrst outlp1
|
||||
|
||||
; Each character is output preceeded by a 1/3 second pause.
|
||||
; Except ^P just causes a 2 second pause.
|
||||
; Except ^Q outputs the next character immediately.
|
||||
outlpq: ildb c,b
|
||||
outlp: tyo c
|
||||
outlp1: ildb c,b
|
||||
cain c,^Q
|
||||
jrst outlpq
|
||||
cain c,^P
|
||||
jrst [ MOVEI T,60. ? .SLEEP T, ? JRST OUTLP1 ] ; 2 secs
|
||||
movei t,10. ; 1/3 sec
|
||||
.sleep t,
|
||||
jumpn c,outlp
|
||||
.close chttyo,
|
||||
next: aobjn a,loop
|
||||
done: quit
|
||||
|
||||
mchtab: sixbit /AI/
|
||||
sixbit /MC/
|
||||
lmchtab==:.-mchtab
|
||||
|
||||
tabtab: -laitab,,aitab
|
||||
-lmctab,,mctab
|
||||
ifn <.-tabtab>-lmchtab, .err TABTAB wrong size
|
||||
|
||||
; On AI, T03 and T04 are connected to shitty maxel modems.
|
||||
aitab: 3,,maxel
|
||||
4,,maxel
|
||||
laitab==:.-aitab
|
||||
|
||||
; On MC, T01 and T02 are connected to shitty maxel modems.
|
||||
mctab: 1,,maxel
|
||||
2,,maxel
|
||||
lmctab==:.-mctab
|
||||
|
||||
maxel: asciz "+++îîîîîIîATZîATS0=1S2=26E0Q1î"
|
||||
|
||||
cnstnts:
|
||||
constants
|
||||
variables
|
||||
|
||||
end go
|
||||
2705
src/syseng/netwrk.266
Executable file
2705
src/syseng/netwrk.266
Executable file
File diff suppressed because it is too large
Load Diff
3678
src/syseng/pft.149
Executable file
3678
src/syseng/pft.149
Executable file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user