source: buchla-68k/ram/etagpt.c@ ace9ee7

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

Removed form-feed comments.

  • Property mode set to 100644
File size: 2.2 KB
Line 
1/*
2 =============================================================================
3 etagpt.c -- assignment editor - group to input port field handlers
4 Version 5 -- 198-10-04 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
8#include "ram.h"
9
10/*
11 =============================================================================
12 et_agpt() -- load the edit buffer
13 =============================================================================
14*/
15
16int16_t et_agpt(int16_t n)
17{
18 register int16_t grp;
19
20 grp = 0x00FF & (n >> 8);
21
22 ebuf[0] = grp2prt[grp][0];
23 ebuf[1] = '\0';
24
25 ebflag = TRUE;
26
27 return(SUCCESS);
28}
29
30/*
31 =============================================================================
32 ef_agpt() -- parse (unload) the edit buffer
33 =============================================================================
34*/
35
36int16_t ef_agpt(int16_t n)
37{
38 register int16_t tmpval, grp, i;
39
40 grp = 0x00FF & (n >> 8);
41
42 ebuf[1] = '\0'; /* terminate the string in ebuf */
43 ebflag = FALSE;
44
45 grp2prt[grp][0] = ebuf[0];
46
47 if (grp2prt[grp][0] NE 1)
48 for (i = 0; i < 88; i++)
49 key2grp[i] &= ~(0x0001 << grp);
50
51 drawk2g(grp);
52
53 modasg();
54 return(SUCCESS);
55}
56
57/*
58 =============================================================================
59 rd_agpt() -- (re)display the field
60 =============================================================================
61*/
62
63int16_t rd_agpt(int16_t nn)
64{
65 register int16_t n, grp;
66
67 n = 0x00FF & nn;
68 grp = 0x00FF & (nn >> 8);
69
70 vbank(0);
71 vcputsv(asgob, 64, adbox[n][4], adbox[n][5],
72 cfetp->frow, cfetp->flcol, gprep[grp2prt[grp][0]], 14);
73
74 return(SUCCESS);
75}
76
77/*
78 =============================================================================
79 nd_agpt() -- handle new data entry
80 =============================================================================
81*/
82
83int16_t nd_agpt(int16_t nn, int16_t k)
84{
85 register int16_t n;
86
87 n = nn & 0x00FF;
88
89 if (k EQ 8) { /* '-' */
90
91 if (--ebuf[0] LT 0)
92 ebuf[0] = 3;
93
94 } else if (k EQ 9) { /* '+' */
95
96 if (++ebuf[0] GT 3)
97 ebuf[0] = 0;
98
99 } else {
100
101 return(FAILURE);
102 }
103
104 dspbuf[0] = *gprep[ebuf[0]];
105 dspbuf[1] = '\0';
106
107 vbank(0);
108 vcputsv(asgob, 64, AK_ENTRY, adbox[n][5], stcrow, stccol, dspbuf, 14);
109
110 return(SUCCESS);
111}
112
113
Note: See TracBrowser for help on using the repository browser.