Skip to content

Commit 9c189dc

Browse files
committed
NSWIT - New Switch.
Terminal concentrator and network switch for the S-1 project.
1 parent 1489766 commit 9c189dc

25 files changed

+12486
-0
lines changed

build/misc.tcl

+10
Original file line numberDiff line numberDiff line change
@@ -1346,6 +1346,16 @@ palx "mits.b;" "bootil" {
13461346
respond "Start of temporary data storage?" "150000\r"
13471347
}
13481348

1349+
# NSWIT, new switch.
1350+
cwd "chsncp"
1351+
palx "chsncp;" "nswit" {
1352+
expect "System "
1353+
respond "?" "L11\r"
1354+
}
1355+
1356+
palx "chsncp;" "aswitc"
1357+
palx "chsncp;" "bswitc"
1358+
13491359
# ITS universal file.
13501360
cwd "decsys"
13511361
macro10 "sits.unv" "sits.mac"

src/chsncp/aswitc.pal

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
.title PALX program to assemble HWC switch
2+
3+
palx===1 ; so the incl files know who they're under
4+
5+
.macro .globl ; null global macro
6+
.endm
7+
8+
.macro .csect
9+
.endm
10+
11+
.macro .enabl
12+
.endm
13+
14+
.macro .mcall type
15+
.macro type
16+
.endm
17+
.endm
18+
19+
r0==%0
20+
r1==%1
21+
r2==%2
22+
r3==%3
23+
r4==%4
24+
r5==%5
25+
sp==%6
26+
pc==%7
27+
28+
.macro crash code
29+
bpt
30+
.endm
31+
32+
.macro .block name,sname
33+
name'.ln == 0
34+
.iif df .mglbl, .globl name'.ln
35+
.macro name thing,bytes
36+
.if df thing'.ln
37+
.iif df .mglbl, .globl sname'.'bytes
38+
sname'.'bytes == name'.ln
39+
name'.ln == name'.ln + thing'.ln
40+
.iff
41+
.iif df .mglbl, .globl sname'.'thing
42+
sname'.'thing == name'.ln
43+
name'.ln == name'.ln + <bytes>
44+
.endc
45+
.endm
46+
.endm
47+
48+
.insrt mglbl
49+
.insrt blocks
50+
.insrt tables
51+
.insrt kernel
52+
.insrt switch
53+
.insrt chario
54+
55+
.irp high,\.
56+
.print /Highest location = high
57+
/
58+
.endr
59+
60+
.end init

src/chsncp/blocks.pal

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
.sbttl TS Data Bases
2+
3+
.if ndf palx ; only define this under macro-11
4+
5+
.macro .block name,sname
6+
name'.ln = 0
7+
.iif df .mglbl, .globl name'.ln
8+
.macro name thing,bytes
9+
.if df thing'.ln
10+
.iif df .mglbl, .globl sname'.'bytes
11+
sname'.'bytes = name'.ln
12+
name'.ln = name'.ln + thing'.ln
13+
.iff
14+
.iif df .mglbl, .globl sname'.'thing
15+
sname'.'thing = name'.ln
16+
name'.ln = name'.ln + <bytes>
17+
.endc
18+
.endm
19+
.endm
20+
21+
.endc
22+
23+
.macro $exit
24+
trap 3
25+
.endm
26+
.macro $task
27+
trap 2
28+
.endm
29+
.macro $wait
30+
trap 4
31+
.endm
32+
.macro $rsum
33+
trap 5
34+
.endm
35+
.macro $susp
36+
trap 7
37+
.endm
38+
.macro $mask
39+
trap 8.
40+
.endm
41+
42+
.enabl lc
43+
.list
44+
45+
; These data blocks are for the traffic controller
46+
; to control tasks and stuff
47+
48+
; TCB - Task Control Block
49+
.block tcb,tc
50+
tcb urg,16. ;reg save area
51+
tcb jid,2 ;job ID, as indx into joblst gives addr(TCB)
52+
tcb ste,2 ;stack warn limit
53+
tcb stk,100. ;stack area for task
54+
tcb gar,2 ;stack guard work for pop check
55+
tcb nxt,2 ;chain to next task blk
56+
tcb wqu,2 ;ptr to wait queue to use (on wait call)
57+
tcb stt,2 ;status of task
58+
tcb use,2 ;PS for task
59+
tcb wat,2 ;wait code: >0 for timer, <0 for wakeup
60+
tcb wtm,2 ;time spent in wait queue
61+
tcb chg,2 ;ptr to accounting word
62+
63+
; BUF - IO Buffer Block
64+
.block buf,bf
65+
buf tsk,2 ;task id to wake up (if any)
66+
buf brk,2 ;character to wake task on
67+
buf wct,2 ;nbr of chars before waking task
68+
buf siz,2 ;size of buffer in bytes
69+
buf cnt,2 ;nbr of chars in buffer
70+
buf fst,2 ;ptr to before first char in buf
71+
buf lst,2 ;ptr to before last chr in buf (=FST if none)
72+
buf ben,2 ;ptr to end of buffer
73+
buf adr,2 ;addr of device
74+
buf hdl,2 ;adr of output handler
75+
buf inp,2 ; source of stuff
76+
buf dta,2 ;data block ptr for special device info
77+
buf flg,2 ;control flags
78+
buf bfp,2 ;holder for entire buffer area
79+
80+
.page
81+
.list

src/chsncp/bswitc.pal

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
.title PALX program to assemble HWC switch
2+
3+
palx===1 ; so the incl files know who they're under
4+
5+
.macro .globl ; null global macro
6+
.endm
7+
8+
.macro .csect
9+
.endm
10+
11+
.macro .enabl
12+
.endm
13+
14+
.macro .mcall type
15+
.macro type
16+
.endm
17+
.endm
18+
19+
r0==%0
20+
r1==%1
21+
r2==%2
22+
r3==%3
23+
r4==%4
24+
r5==%5
25+
sp==%6
26+
pc==%7
27+
28+
.macro crash code
29+
bpt
30+
.endm
31+
32+
.macro .block name,sname
33+
name'.ln == 0
34+
.iif df .mglbl, .globl name'.ln
35+
.macro name thing,bytes
36+
.if df thing'.ln
37+
.iif df .mglbl, .globl sname'.'bytes
38+
sname'.'bytes == name'.ln
39+
name'.ln == name'.ln + thing'.ln
40+
.iff
41+
.iif df .mglbl, .globl sname'.'thing
42+
sname'.'thing == name'.ln
43+
name'.ln == name'.ln + <bytes>
44+
.endc
45+
.endm
46+
.endm
47+
48+
.insrt mglbl
49+
.insrt blocks
50+
.insrt tables
51+
.insrt kernel
52+
.insrt switch
53+
.insrt nchari
54+
55+
.irp high,\.
56+
.print /Highest location = high
57+
/
58+
.endr
59+
60+
.end init

0 commit comments

Comments
 (0)