source: buchla-68k/ram/etttab.c@ 7c0efb6

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

Fixed etttab.c.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*
2 =============================================================================
3 etttab.c -- MIDAS tuning editor - tuning table number field handlers
4 Version 3 -- 1988-08-22 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "ram.h"
9
10/*
11 =============================================================================
12 et_ttab() -- load the edit buffer
13 =============================================================================
14*/
15
16int16_t et_ttab(int16_t n)
17{
18 (void)n;
19
20 sprintf(ebuf, "%d", curtun);
21 ebflag = TRUE;
22
23 return(SUCCESS);
24}
25
26/*
27 =============================================================================
28 ef_ttab() -- parse (unload) the edit buffer
29 =============================================================================
30*/
31
32int16_t ef_ttab(int16_t n)
33{
34 (void)n;
35
36 ebuf[1] = '\0'; /* terminate the string in ebuf */
37 ebflag = FALSE;
38
39 curtun = ebuf[0] - '0';
40 modtun();
41 settc(22, 54);
42 return(SUCCESS);
43}
44
45/*
46 =============================================================================
47 rd_ttab() -- (re)display the field
48 =============================================================================
49*/
50
51int16_t rd_ttab(int16_t nn)
52{
53 register int16_t n;
54
55 n = nn & 0xFF;
56 sprintf(dspbuf, "%d", curtun);
57
58 vbank(0);
59 vcputsv(tunob, 64, (tunmod ? TDCHGD : tdbox[n][4]), tdbox[n][5],
60 24, 61, dspbuf, 14);
61
62 return(SUCCESS);
63}
64
65/*
66 =============================================================================
67 nd_ttab() -- handle new data entry
68 =============================================================================
69*/
70
71int16_t nd_ttab(int16_t nn, int16_t k)
72{
73 register int16_t n;
74
75 n = nn & 0xFF;
76
77 ebuf[0] = (int8_t)(k + '0');
78 ebuf[1] = '\0';
79
80 dspbuf[0] = (int8_t)(k + '0');
81 dspbuf[1] = '\0';
82
83 vbank(0);
84 vcputsv(tunob, 64, TDENTRY, tdbox[n][5], stcrow, stccol, dspbuf, 14);
85
86 return(SUCCESS);
87}
88
Note: See TracBrowser for help on using the repository browser.