source: buchla-68k/orig/RAM/ETATUN.C@ d21fc6f

Last change on this file since d21fc6f was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 8 years ago

Imported original source code.

  • Property mode set to 100755
File size: 2.3 KB
RevLine 
[3ae31e9]1/*
2 =============================================================================
3 etatun.c -- MIDAS assignment editor - tuning table field handlers
4 Version 1 -- 1987-12-10 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "stddefs.h"
9#include "fields.h"
10#include "vsdd.h"
11#include "vsddsw.h"
12#include "graphdef.h"
13
14#include "midas.h"
15#include "asgdsp.h"
16
17extern unsigned *asgob;
18
19extern short stcrow, stccol;
20extern short curtun;
21
22extern short adbox[][8];
23
24extern char dspbuf[];
25
26/*
27
28*/
29
30/*
31 =============================================================================
32 et_atun() -- load the edit buffer
33 =============================================================================
34*/
35
36short
37et_atun(n)
38short n;
39{
40 sprintf(ebuf, "%01.1d", curtun);
41 ebflag = TRUE;
42
43 return(SUCCESS);
44}
45
46/*
47 =============================================================================
48 ef_atun() -- parse (unload) the edit buffer
49 =============================================================================
50*/
51
52short
53ef_atun(n)
54short n;
55{
56 register short tmpval;
57
58 ebuf[1] = '\0'; /* terminate the string in ebuf */
59 ebflag = FALSE;
60
61 tmpval = ebuf[0] - '0';
62
63 gettun(tmpval);
64
65 modasg();
66 return(SUCCESS);
67}
68
69/*
70
71*/
72
73/*
74 =============================================================================
75 rd_atun() -- (re)display the field
76 =============================================================================
77*/
78
79short
80rd_atun(nn)
81short nn;
82{
83 register short n;
84
85 n = nn & 0xFF;
86 sprintf(dspbuf, "Tun %01.1d", curtun);
87
88 vbank(0);
89 vcputsv(asgob, 64, adbox[n][4], adbox[n][5],
90 adbox[n][6], adbox[n][7], dspbuf, 14);
91
92 return(SUCCESS);
93}
94
95/*
96 =============================================================================
97 nd_atun() -- handle new data entry
98 =============================================================================
99*/
100
101short
102nd_atun(nn, k)
103short nn;
104register short k;
105{
106 register short n;
107
108 n = nn & 0xFF;
109 ebuf[0] = k + '0';
110 ebuf[1] = '\0';
111
112 dspbuf[0] = k + '0';
113 dspbuf[1] = '\0';
114
115 vbank(0);
116 vcputsv(asgob, 64, AK_ENTRY, adbox[n][5],
117 stcrow, stccol, dspbuf, 14);
118
119 return(SUCCESS);
120}
121
Note: See TracBrowser for help on using the repository browser.