source: buchla-68k/ram/etatun.c@ 0580615

Last change on this file since 0580615 was 0580615, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Point of no return.

  • Property mode set to 100644
File size: 2.1 KB
Line 
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 et_atun(short n)
37{
38 sprintf(ebuf, "%01.1d", curtun);
39 ebflag = TRUE;
40
41 return(SUCCESS);
42}
43
44/*
45 =============================================================================
46 ef_atun() -- parse (unload) the edit buffer
47 =============================================================================
48*/
49
50short ef_atun(short n)
51{
52 register short tmpval;
53
54 ebuf[1] = '\0'; /* terminate the string in ebuf */
55 ebflag = FALSE;
56
57 tmpval = ebuf[0] - '0';
58
59 gettun(tmpval);
60
61 modasg();
62 return(SUCCESS);
63}
64
65/*
66
67*/
68
69/*
70 =============================================================================
71 rd_atun() -- (re)display the field
72 =============================================================================
73*/
74
75short rd_atun(short nn)
76{
77 register short n;
78
79 n = nn & 0xFF;
80 sprintf(dspbuf, "Tun %01.1d", curtun);
81
82 vbank(0);
83 vcputsv(asgob, 64, adbox[n][4], adbox[n][5],
84 adbox[n][6], adbox[n][7], dspbuf, 14);
85
86 return(SUCCESS);
87}
88
89/*
90 =============================================================================
91 nd_atun() -- handle new data entry
92 =============================================================================
93*/
94
95short nd_atun(short nn, short k)
96{
97 register short n;
98
99 n = nn & 0xFF;
100 ebuf[0] = k + '0';
101 ebuf[1] = '\0';
102
103 dspbuf[0] = k + '0';
104 dspbuf[1] = '\0';
105
106 vbank(0);
107 vcputsv(asgob, 64, AK_ENTRY, adbox[n][5],
108 stcrow, stccol, dspbuf, 14);
109
110 return(SUCCESS);
111}
112
Note: See TracBrowser for help on using the repository browser.