source: buchla-68k/ram/etadep.c@ fa38804

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

Removed form-feed comments.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*
2 =============================================================================
3 etadep.c -- MIDAS assignment editor - phase shifter depth field
4 Version 4 -- 1987-12-19 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "ram.h"
9
10/*
11 =============================================================================
12 et_adep() -- load the edit buffer
13 =============================================================================
14*/
15
16int16_t et_adep(int16_t n)
17{
18 sprintf(ebuf, "%02d", ps_dpth);
19 ebflag = TRUE;
20
21 return(SUCCESS);
22}
23
24/*
25 =============================================================================
26 ef_adep() -- parse (unload) the edit buffer
27 =============================================================================
28*/
29
30int16_t ef_adep(int16_t n)
31{
32 register int16_t i, tmpval;
33
34 ebuf[2] = '\0'; /* terminate the string in ebuf */
35 ebflag = FALSE;
36 tmpval = 0;
37
38 for (i = 0; i < 2; i++) /* convert from ASCII to binary */
39 tmpval = (tmpval * 10) + (ebuf[i] - '0');
40
41 ps_dpth = tmpval;
42 sendval(3, 0, ((ps_dpth * 10) << 5));
43 modasg();
44 return(SUCCESS);
45}
46
47/*
48 =============================================================================
49 rd_adep() -- (re)display the field
50 =============================================================================
51*/
52
53int16_t rd_adep(int16_t nn)
54{
55 register int16_t n;
56
57 n = nn & 0xFF;
58 sprintf(dspbuf, "%02.2d", ps_dpth);
59
60 vbank(0);
61 vcputsv(asgob, 64, adbox[n][4], adbox[n][5],
62 adbox[n][6] + 3, adbox[n][7] + 8, dspbuf, 14);
63
64 return(SUCCESS);
65}
66
67/*
68 =============================================================================
69 nd_adep() -- handle new data entry
70 =============================================================================
71*/
72
73int16_t nd_adep(int16_t nn, int16_t k)
74{
75 register int16_t ec, n;
76
77 n = nn & 0xFF;
78
79 ec = stccol - cfetp->flcol; /* setup edit buffer column */
80
81 ebuf[ec] = k + '0';
82 ebuf[2] = '\0';
83
84 dspbuf[0] = k + '0';
85 dspbuf[1] = '\0';
86
87 vbank(0);
88 vcputsv(asgob, 64, AK_ENTRY, adbox[n][5], stcrow, stccol, dspbuf, 14);
89
90 advacur();
91 return(SUCCESS);
92}
93
94
Note: See TracBrowser for help on using the repository browser.