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

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

Added missing includes and declarations.

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