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

Last change on this file since e225e77 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
RevLine 
[f40a309]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
[e225e77]17#include "stdio.h"
18
19extern void gettun(int16_t n);
20extern void modasg(void);
21
[7258c6a]22extern uint16_t *asgob;
[f40a309]23
[7258c6a]24extern int16_t stcrow, stccol;
25extern int16_t curtun;
[f40a309]26
[7258c6a]27extern int16_t adbox[][8];
[f40a309]28
[7258c6a]29extern int8_t dspbuf[];
[f40a309]30
31/*
32
33*/
34
35/*
36 =============================================================================
37 et_atun() -- load the edit buffer
38 =============================================================================
39*/
[7258c6a]40
[f40a309]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*/
[7258c6a]54
[f40a309]55int16_t ef_atun(int16_t n)
[7258c6a]56{
[f40a309]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 =============================================================================
[7258c6a]78*/
[f40a309]79
[7258c6a]80int16_t rd_atun(int16_t nn)
[f40a309]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 =============================================================================
[7258c6a]98*/
[f40a309]99
[7258c6a]100int16_t nd_atun(int16_t nn, int16_t k)
[f40a309]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.