File: BackBurndy.mesa
Christophe Cuenod September 1, 1987 10:54:22 am PDT
Enables to generate easily Burndy connector parts for EXPERT.
The pads stacks are:
- left pins short stack 36
- right pins short stack 37
- left pins long stack 38
- right pins long stack 39
DIRECTORY
Commander USING [CommandProc, Register],
Rope USING [ROPE],
FS USING [StreamOpen],
IO USING [card, Close, GetTokenRope, int, PutF, RIS, rope, STREAM];
BackBurndy:
CEDAR
PROGRAM
IMPORTS IO, Commander, FS =
BEGIN
ROPE: TYPE = Rope.ROPE;
BackBurndyProc: Commander.CommandProc =
BEGIN
i, j, k, l, m, pad: CARD;
x, y: INT;
stream: IO.STREAM ← IO.RIS[cmd.commandLine];
outputName: ROPE ← IO.GetTokenRope[stream].token;
out: IO.STREAM ← FS.StreamOpen[outputName,$create];
IO.PutF[out, "4096 2048 -400 -100 600 5775 -100 -400 BACK106 PARC-BACK106 J\n"];
FOR i
IN [1..106]
DO
j ← (i-1) MOD 8;
k ← (i-1) / 2;
l ← (i-1) MOD 3;
m ← (i-1) / 3;
SELECT j
FROM
= 0 => {
x ← 0;
pad ← 36;
};
= 1 => {
x ← 150;
pad ← 39;
};
= 2 => {
x ← -400;
pad ← 39;
};
= 3 => {
x ← 550;
pad ← 36;
};
= 4 => {
x ← 50;
pad ← 38;
};
= 5 => {
x ← 200;
pad ← 37;
};
= 6 => {
x ← -350;
pad ← 37;
};
= 7 => {
x ← 600;
pad ← 38;
};
ENDCASE;
y ← k*25;
IF l = 0
THEN {
SELECT m
FROM
3, 9, 15, 21, 27, 33 => {
IO.PutF[out, "%g %g VCC 1 10 256 4 %g\n", IO.int[x], IO.int[y], IO.card[pad]];
};
6, 12, 18, 24, 30 => {
IO.PutF[out, "%g %g V2 8 10 256 4 %g\n", IO.int[x], IO.int[y], IO.card[pad]];
};
ENDCASE => {
IO.PutF[out, "%g %g GND 1 10 256 5 %g\n", IO.int[x], IO.int[y], IO.card[pad]];
};
}
ELSE {
IO.PutF[out, "%g %g P%g %g 10 1 3 %g\n", IO.int[x], IO.int[y], IO.card[i], IO.card[(i-1)*2/3], IO.card[pad]];
};
ENDLOOP;
FOR i
IN [1..106]
DO
j ← (i-1) MOD 8;
k ← (i-1) / 2;
l ← (i-1) MOD 3;
m ← (i-1) / 3;
SELECT j
FROM
= 0 => {
x ← 0;
pad ← 36;
};
= 1 => {
x ← 150;
pad ← 39;
};
= 2 => {
x ← -400;
pad ← 39;
};
= 3 => {
x ← 550;
pad ← 36;
};
= 4 => {
x ← 50;
pad ← 38;
};
= 5 => {
x ← 200;
pad ← 37;
};
= 6 => {
x ← -350;
pad ← 37;
};
= 7 => {
x ← 600;
pad ← 38;
};
ENDCASE;
y ← 1600 + k*25;
IF l = 0
THEN {
SELECT m
FROM
3, 9, 15, 21, 27, 33 => {
IO.PutF[out, "%g %g VCC 1 10 256 4 %g\n", IO.int[x], IO.int[y], IO.card[pad]];
};
6, 12, 18, 24, 30 => {
IO.PutF[out, "%g %g V2 8 10 256 4 %g\n", IO.int[x], IO.int[y], IO.card[pad]];
};
ENDCASE => {
IO.PutF[out, "%g %g GND 1 10 256 5 %g\n", IO.int[x], IO.int[y], IO.card[pad]];
};
}
ELSE {
IO.PutF[out, "%g %g P%g %g 10 2 3 %g\n", IO.int[x], IO.int[y], IO.card[i], IO.card[(i-1)*2/3], IO.card[pad]];
};
ENDLOOP;
IO.Close[out];
IO.PutF[cmd.out, "File %g Written\n", IO.rope[outputName]];
END;
Commander.Register[
key: "BackBurndy", proc: BackBurndyProc, doc: "Generates a BackBurndy.part file\n"];
END.