source: buchla-68k/ram/etaopt.c@ 6262b5c

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

Added include files for global functions and variables.

  • Property mode set to 100644
File size: 2.1 KB
RevLine 
[f40a309]1/*
2 =============================================================================
3 etaopt.c -- assignment editor - MIDI output port number field handlers
4 Version 4 -- 1987-12-11 -- D.N. Lynx Crowe
5 =============================================================================
6*/
7
[6262b5c]8#include "all.h"
[e225e77]9
10extern void modasg(void);
11
[7258c6a]12extern uint16_t *asgob;
[f40a309]13
[7258c6a]14extern int16_t stcrow, stccol;
15extern int16_t curmop;
[f40a309]16
[7258c6a]17extern int16_t adbox[][8];
[f40a309]18
[7258c6a]19extern int8_t dspbuf[];
[f40a309]20
[7258c6a]21extern int8_t *gprep[];
[f40a309]22
23/*
24
25*/
26
27/*
28 =============================================================================
29 et_aopt() -- load the edit buffer
30 =============================================================================
31*/
[7258c6a]32
[f40a309]33int16_t et_aopt(int16_t n)
34{
35 sprintf(ebuf, "%01.1d", curmop);
36 ebflag = TRUE;
37
38 return(SUCCESS);
39}
40
41/*
42 =============================================================================
43 ef_aopt() -- parse (unload) the edit buffer
44 =============================================================================
45*/
[7258c6a]46
[f40a309]47int16_t ef_aopt(int16_t n)
[7258c6a]48{
[f40a309]49 register int16_t tmpval;
50
51 ebuf[1] = '\0'; /* terminate the string in ebuf */
52 ebflag = FALSE;
53
54 tmpval = ebuf[0] - '0';
55
56 if (tmpval GT 3)
57 return(FAILURE);
58
59 curmop = tmpval;
60 modasg();
61 return(SUCCESS);
62}
63
64/*
65
66*/
67
68/*
69 =============================================================================
70 rd_aopt() -- (re)display the field
71 =============================================================================
[7258c6a]72*/
[f40a309]73
[7258c6a]74int16_t rd_aopt(int16_t nn)
[f40a309]75{
76 register int16_t n;
77
78 n = nn & 0xFF;
79
80 vbank(0);
81 vcputsv(asgob, 64, adbox[n][4], adbox[n][5],
82 adbox[n][6], adbox[n][7] + 9, gprep[curmop], 14);
83
84 return(SUCCESS);
85}
86
87/*
88 =============================================================================
89 nd_aopt() -- handle new data entry
90 =============================================================================
[7258c6a]91*/
[f40a309]92
[7258c6a]93int16_t nd_aopt(int16_t nn, int16_t k)
[f40a309]94{
95 register int16_t n;
96
97 if ((k < 1) OR (k > 2))
98 return(FAILURE);
99
100 n = nn & 0xFF;
101 ebuf[0] = k + '0';
102 ebuf[1] = '\0';
103
104 dspbuf[0] = k + '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);
[6262b5c]111}
112
113
Note: See TracBrowser for help on using the repository browser.