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

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

Use standard integer types.

  • 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 uint16_t *asgob;
18
19extern int16_t stcrow, stccol;
20extern int16_t curtun;
21
22extern int16_t adbox[][8];
23
24extern int8_t dspbuf[];
25
26/*
27
28*/
29
30/*
31 =============================================================================
32 et_atun() -- load the edit buffer
33 =============================================================================
34*/
35
36int16_t et_atun(int16_t 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
50int16_t ef_atun(int16_t n)
51{
52 register int16_t 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
75int16_t rd_atun(int16_t nn)
76{
77 register int16_t 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
95int16_t nd_atun(int16_t nn, int16_t k)
96{
97 register int16_t 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.