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
RevLine 
[f40a309]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
[b28a12e]8#include "ram.h"
[f40a309]9
10/*
11 =============================================================================
12 et_ttab() -- load the edit buffer
13 =============================================================================
14*/
15
[7258c6a]16int16_t et_ttab(int16_t n)
[f40a309]17{
[7ecfb7b]18 (void)n;
19
[f40a309]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
[7258c6a]32int16_t ef_ttab(int16_t n)
[f40a309]33{
[7ecfb7b]34 (void)n;
[f40a309]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
[7258c6a]51int16_t rd_ttab(int16_t nn)
[f40a309]52{
[7258c6a]53 register int16_t n;
[f40a309]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
[7258c6a]71int16_t nd_ttab(int16_t nn, int16_t k)
[f40a309]72{
[7258c6a]73 register int16_t n;
[f40a309]74
75 n = nn & 0xFF;
76
[6bbd779]77 ebuf[0] = (int8_t)(k + '0');
[f40a309]78 ebuf[1] = '\0';
79
[6bbd779]80 dspbuf[0] = (int8_t)(k + '0');
[f40a309]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}
[6262b5c]88
Note: See TracBrowser for help on using the repository browser.