[f40a309] | 1 | /*
|
---|
| 2 | =============================================================================
|
---|
| 3 | chgsef.c -- MIDAS-VII -- change score direction
|
---|
| 4 | Version 1 -- 1988-08-01 -- D.N. Lynx Crowe
|
---|
| 5 | =============================================================================
|
---|
| 6 | */
|
---|
| 7 |
|
---|
[b28a12e] | 8 | #include "ram.h"
|
---|
[f40a309] | 9 |
|
---|
| 10 | /*
|
---|
| 11 | =============================================================================
|
---|
| 12 | chgsef() -- change execution pointers to D_FWD
|
---|
| 13 | =============================================================================
|
---|
| 14 | */
|
---|
| 15 |
|
---|
[0580615] | 16 | void chgsef(void)
|
---|
[f40a309] | 17 | {
|
---|
| 18 | register struct s_entry *ep;
|
---|
[7258c6a] | 19 | register int32_t rt;
|
---|
[f40a309] | 20 |
|
---|
| 21 | se = D_FWD;
|
---|
| 22 |
|
---|
| 23 | ep = p_cur;
|
---|
| 24 | rt = t_cur;
|
---|
| 25 |
|
---|
| 26 | if (EV_FINI NE ep->e_type) {
|
---|
| 27 |
|
---|
| 28 | ep = ep->e_fwd;
|
---|
| 29 |
|
---|
| 30 | while (ep->e_time EQ rt) {
|
---|
| 31 |
|
---|
| 32 | if (EV_FINI EQ ep->e_type)
|
---|
| 33 | break;
|
---|
| 34 |
|
---|
| 35 | se_exec(ep, se);
|
---|
| 36 | ep = ep->e_fwd;
|
---|
| 37 | }
|
---|
| 38 |
|
---|
| 39 | p_cur = ep;
|
---|
| 40 | }
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | /*
|
---|
| 44 | =============================================================================
|
---|
| 45 | chgseb() -- change execution pointers to D_BAK
|
---|
| 46 | =============================================================================
|
---|
| 47 | */
|
---|
| 48 |
|
---|
[0580615] | 49 | void chgseb(void)
|
---|
[f40a309] | 50 | {
|
---|
| 51 | register struct s_entry *ep;
|
---|
[7258c6a] | 52 | register int32_t rt;
|
---|
[f40a309] | 53 |
|
---|
| 54 | se = D_BAK;
|
---|
| 55 |
|
---|
| 56 | ep = p_cur;
|
---|
| 57 | rt = t_cur;
|
---|
| 58 |
|
---|
| 59 | if (EV_SCORE NE ep->e_type) {
|
---|
| 60 |
|
---|
| 61 | ep = ep->e_bak;
|
---|
| 62 |
|
---|
| 63 | while (ep->e_time EQ rt) {
|
---|
| 64 |
|
---|
| 65 | if (EV_SCORE EQ ep->e_type)
|
---|
| 66 | break;
|
---|
| 67 |
|
---|
| 68 | se_exec(ep, se);
|
---|
| 69 | ep = ep->e_bak;
|
---|
| 70 | }
|
---|
| 71 |
|
---|
| 72 | p_cur = ep;
|
---|
| 73 | }
|
---|
| 74 | }
|
---|
| 75 |
|
---|
| 76 | /*
|
---|
| 77 | =============================================================================
|
---|
| 78 | chgsdf() -- change display pointers to D_FWD
|
---|
| 79 | =============================================================================
|
---|
| 80 | */
|
---|
| 81 |
|
---|
[0580615] | 82 | void chgsdf(void)
|
---|
[f40a309] | 83 | {
|
---|
| 84 | register struct s_entry *ep;
|
---|
[7258c6a] | 85 | register int32_t rt;
|
---|
[f40a309] | 86 |
|
---|
| 87 | sd = D_FWD;
|
---|
| 88 |
|
---|
| 89 | rslice(gdstbc);
|
---|
| 90 | rslice(gdstbn);
|
---|
| 91 | rslice(gdstbp);
|
---|
| 92 |
|
---|
| 93 | ep = p_ctr;
|
---|
| 94 | rt = t_ctr;
|
---|
| 95 |
|
---|
| 96 | if (EV_FINI NE ep->e_type) {
|
---|
| 97 |
|
---|
| 98 | ep = ep->e_fwd;
|
---|
| 99 |
|
---|
| 100 | while (ep->e_time EQ rt) {
|
---|
| 101 |
|
---|
| 102 | if (EV_FINI EQ ep->e_type)
|
---|
| 103 | break;
|
---|
| 104 |
|
---|
| 105 | se_disp(ep, D_FWD, gdstbc, 1);
|
---|
| 106 | ep = ep->e_fwd;
|
---|
| 107 | }
|
---|
| 108 |
|
---|
| 109 | p_ctr = ep;
|
---|
| 110 | }
|
---|
| 111 |
|
---|
| 112 | ep = p_bak;
|
---|
| 113 | rt = t_bak;
|
---|
| 114 |
|
---|
| 115 | if (EV_FINI NE ep->e_type) {
|
---|
| 116 |
|
---|
| 117 | ep = ep->e_fwd;
|
---|
| 118 |
|
---|
| 119 | while (ep->e_time EQ rt) {
|
---|
| 120 |
|
---|
| 121 | if (EV_FINI EQ ep->e_type)
|
---|
| 122 | break;
|
---|
| 123 |
|
---|
| 124 | se_disp(ep, D_FWD, gdstbp, 0);
|
---|
| 125 | ep = ep->e_fwd;
|
---|
| 126 | }
|
---|
| 127 |
|
---|
| 128 | p_bak = ep;
|
---|
| 129 | }
|
---|
| 130 |
|
---|
| 131 | ep = p_fwd;
|
---|
| 132 | rt = t_fwd;
|
---|
| 133 |
|
---|
| 134 | if (EV_FINI NE ep->e_type) {
|
---|
| 135 |
|
---|
| 136 | ep = ep->e_fwd;
|
---|
| 137 |
|
---|
| 138 | while (ep->e_time EQ rt) {
|
---|
| 139 |
|
---|
| 140 | if (EV_FINI EQ ep->e_type)
|
---|
| 141 | break;
|
---|
| 142 |
|
---|
| 143 | se_disp(ep, D_FWD, gdstbn, 0);
|
---|
| 144 | ep = ep->e_fwd;
|
---|
| 145 | }
|
---|
| 146 |
|
---|
| 147 | p_fwd = ep;
|
---|
| 148 | }
|
---|
| 149 | }
|
---|
| 150 |
|
---|
| 151 | /*
|
---|
| 152 | =============================================================================
|
---|
| 153 | chgsdb() -- change display pointers to D_BAK
|
---|
| 154 | =============================================================================
|
---|
| 155 | */
|
---|
| 156 |
|
---|
[0580615] | 157 | void chgsdb(void)
|
---|
[f40a309] | 158 | {
|
---|
| 159 | register struct s_entry *ep;
|
---|
[7258c6a] | 160 | register int32_t rt;
|
---|
[f40a309] | 161 |
|
---|
| 162 | sd = D_BAK;
|
---|
| 163 |
|
---|
| 164 | rslice(gdstbc);
|
---|
| 165 | rslice(gdstbn);
|
---|
| 166 | rslice(gdstbp);
|
---|
| 167 |
|
---|
| 168 | ep = p_ctr;
|
---|
| 169 | rt = t_ctr;
|
---|
| 170 |
|
---|
| 171 | if (EV_SCORE NE ep->e_type) {
|
---|
| 172 |
|
---|
| 173 | ep = ep->e_bak;
|
---|
| 174 |
|
---|
| 175 | while (ep->e_time EQ rt) {
|
---|
| 176 |
|
---|
| 177 | if (EV_SCORE EQ ep->e_type)
|
---|
| 178 | break;
|
---|
| 179 |
|
---|
| 180 | se_disp(ep, D_BAK, gdstbc, 1);
|
---|
| 181 | ep = ep->e_bak;
|
---|
| 182 | }
|
---|
| 183 |
|
---|
| 184 | p_ctr = ep;
|
---|
| 185 | }
|
---|
| 186 |
|
---|
| 187 | ep = p_bak;
|
---|
| 188 | rt = t_bak;
|
---|
| 189 |
|
---|
| 190 | if (EV_SCORE NE ep->e_type) {
|
---|
| 191 |
|
---|
| 192 | ep = ep->e_bak;
|
---|
| 193 |
|
---|
| 194 | while (ep->e_time EQ rt) {
|
---|
| 195 |
|
---|
| 196 | if (EV_SCORE EQ ep->e_type)
|
---|
| 197 | break;
|
---|
| 198 |
|
---|
| 199 | se_disp(ep, D_BAK, gdstbp, 0);
|
---|
| 200 | ep = ep->e_bak;
|
---|
| 201 | }
|
---|
| 202 |
|
---|
| 203 | p_bak = ep;
|
---|
| 204 | }
|
---|
| 205 |
|
---|
| 206 | ep = p_fwd;
|
---|
| 207 | rt = t_fwd;
|
---|
| 208 |
|
---|
| 209 | if (EV_SCORE NE ep->e_type) {
|
---|
| 210 |
|
---|
| 211 | ep = ep->e_bak;
|
---|
| 212 |
|
---|
| 213 | while (ep->e_time EQ rt) {
|
---|
| 214 |
|
---|
| 215 | if (EV_SCORE EQ ep->e_type)
|
---|
| 216 | break;
|
---|
| 217 |
|
---|
| 218 | se_disp(ep, D_BAK, gdstbn, 0);
|
---|
| 219 | ep = ep->e_bak;
|
---|
| 220 | }
|
---|
| 221 |
|
---|
| 222 | p_fwd = ep;
|
---|
| 223 | }
|
---|
| 224 | }
|
---|
[6262b5c] | 225 |
|
---|