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

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

Added include files for global functions and variables.

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