// NetDelays.defs
// last modified December 15, 1978

//Run BLDR with "BLDR/f NetDelays template

external
//NetDelays proceedures
[
//NetDelays
InitBravoFile; FindFirstNet;

//NetDelaysBoard
DoBoardNets; FindNet; ReadInNet; ComputeOnBdDelays

//NetDelaysEdge
DoEdgeNets

//NetDelaysUtil
FindDistance; FindDelay; FindChar; Char; Msg; SendTab; GetSomeMem
GetNum; MulDiv; GetStr; StEq; StComp; AppendC; AppendS
MakeFileName; CopyToWLFile; WhatICtype; EdgePinTermination
]

external
//NetDelays statics
[
screen; file; disko; Fposn; WLout; screenEn
DlyTable; ICtable; TermTable; MaxBoard; LastFile; fileVec
Manhatten; Debug; printedDly; Done; EdgePins
Tb0; Tb1; Tb2; Tb3; Tb4; Tb5; TotalDelay; TotalLength; Nets; BdSpacing
LastChar
]

external
// system statics
[ keys; dsp ]


external
// system procedures
[
PutTemplate; Wss; Ws; Gets; Puts; Zero; InitializeZone; CallSwat
CreateDisplayStream; ShowDisplayStream; OpenFile; Closes; Endofs; FilePos
]

manifest
[
TAB=#11; ESC = #33; DEL = #177
Term=1; MU = 2; SE = 3; Bf=70 //Bf stands for BravoFudge
]

structure str[ length byte; char ↑ 1,39 byte ]

structure node:
[
OldX word
OldY word
NewX word
NewY word
Distance word
Chip word
]

manifest Lnode = size node/16

structure p:
[ Fin word; Fout word; Lin word; Lout word; end word ]

structure net:
[
terms word
mufpins word
outputs word
inputs word
edgenet word = [ edgefirst bit; edgechar bit 15 ]
clocknet word
stubl word
stubp word
pins@p
length@p
board@p
Dly word
WOrDly word
number word
name @str
]

manifest Lnet = size net/16