home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol167 / card.rec < prev    next >
Encoding:
Text File  |  1984-04-29  |  2.4 KB  |  80 lines

  1.  
  2. [CARD.REC]
  3. [Program to generate pin layouts for STD bus printed
  4.  circuit cards using the STD-VGR graphics controller.]
  5. [Harold V. McIntosh, 22 April 1983]
  6.  
  7. [26$ - macro library]
  8. [27$ - byte cursor]
  9. [28$ - bit cursor]
  10. [29$ - pen position]
  11. [30$ - input FCB]
  12. [31$ - output FCB]
  13.  
  14. {
  15. [create input FCB]   ('5C'H12w3b
  16.                      'PCB'EJQmw30$r12wDnIw30$r15k
  17.                      ''(128c26k30$r20K0=L|:LL;)L'80'H26k
  18.                      pw'<'FzqL26$S
  19.                      ('>'E;qLm'<'2aQT|'='|FzqLnY2afLz:)w;
  20.                      ' 'Ew;w;)A
  21. [byte, east]         (27$r1+27$S;)E
  22. [zero FCB]           ($m33cmpw0%(f:;)wnnS;)F
  23. [byte, north]         (27$r64-,27$S;)N
  24. [count, operator]    (1RT(O);&L(RTO&10*+:;);)R
  25. [byte, south]         (27$r64+27$S;)S
  26. [byte, west]         (27$r1-,27$S;)W
  27. [northeast]      (d 28$r(0=7@E;1=2;2=5@N@E;3=0@N;
  28.                 4=3;5=6;6=1@N;7=4@N;;)28$S@p :;)a
  29. [northwest]      (d 28$r(0=3;1=6;2=1@N;3=4@N;
  30.                 4=7;5=2@W;6=5@N;7=0@N@W;;)28$S@p :;)b
  31. [southwest]      (d 28$r(0=3@S;1=6@S;2=1;3=4;
  32.                 4=7@S;5=2@S@W;6=5;7=0@W;;)28$S@p :;)c
  33. [southeast]      (d 28$r(0=7@S@E;1=2@S;2=5@E;3=0;
  34.                 4=3@S;5=6@S;6=1;7=4;;)28$S@p :;)d
  35. [east]           (d 28$r(0=5@E;1=0;2=7@E;3=2;4=1;5=4;6=3;7=6;;)28$S@p :;)e
  36. [make a grid]     (@o2@e'21(v5sus42(v5eue)v5sus42(v5wuw));'pL@mo;)g
  37. [make a border]     (@o 'u255e239s255w239n;' pL@m;)h
  38. [rd, cat macro]  (R26%[^Z]='';T(127%[ro]=)(@j|;L@j;);)j
  39. [execute macro]  (@r@=:L;)m
  40. [north]          (d 28$r(0=2;1=3;2=0@N;3=1@N;4=6;5=7;6=4@N;7=5@N;;)28$S@p :;)n
  41. [seek origin]     ('4000'H,27$S 7,28$S 0,29$S;)o
  42. [move "pen"]     (29$r 0=;L 28$r
  43.             (0=1;1=2;2=4;3=8;4=16;5=32;6=64;7=128;;)
  44.             27$r 1G \+% 27$rS;)p
  45. [read memory]    ((1&uT(O); m&n &L&(uTO m&n &10*+&:;);) m&n ':'=$r&uT m&n ;;)r
  46. [south]          (d 28$r(0=2@S;1=3@S;2=0;3=1;4=6@S;5=7@S;6=4;7=5;;)28$S@p :;)s
  47. [raise pen]      (1 29$ S;)u
  48. [lower pen]      (0 29$ S;)v
  49. [west]           (d 28$r(0=1;1=4;2=3;3=6;4=5;5=0@W;6=7;7=2@W;;)28$S@p :;)w
  50. [clear screen]     ('4000'H'2000'Hw00(f:L;)w;)z
  51. [cr,lf]          (2573TL;)&
  52.  
  53.  
  54. [menu]    (
  55.     'n' [north] =    @n;
  56.     's' [south] =    @s;
  57.     'e' [east] =    @e;
  58.     'w' [west] =    @w;
  59.     'a' [neast] =    @a;
  60.     'b' [nwest] =    @b;
  61.     'c' [swest] =    @c;
  62.     'd' [seast] =    @d;
  63.     'g' [grid] =    L@z@h@g;
  64.     'u' [up] =    L@u;
  65.     'v' [down] =    L@v;
  66.     'm' [macro] =    (2*26$r+r@m;);
  67.     'o' [origin] =  L@o;
  68.     'z' [clear] =    L@z;
  69.     '(' [lparen] =    (d&pG m&n ;(@r')'=L;LL:););
  70.     ')' [rparen] =    L(&d&L&pG m&n ;&L;);
  71.     ';' [exit] (=)    LL;
  72.     L)=
  73.  
  74. [main]    (
  75.     [0,14k] 30@F [31@F] @A '' '' ''  @z @o
  76.     (@&'card> 'TL @R'('=#'('|(@j|;:)';'|pL@m:@=:);)
  77.     }
  78.  
  79. [end]
  80.