source: buchla-68k/ram/sedisp.s@ 3370595

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

Fix symbol collisions.

  • Property mode set to 100644
File size: 37.0 KB
Line 
1| ------------------------------------------------------------------------------
2| sedisp.s -- score event display driver
3| Version 43 -- 1988-09-26 -- D.N. Lynx Crowe
4
5| se_disp(ep, sd, gdstb, cf)
6| struct s_entry *ep;
7| short sd;
8| struct gdsel *gdstb[];
9| short cf;
10
11| Displays the event at 'ep', scrolling in direction 'sd', by
12| updating 'gdstb'. Uses the accidental code in 'ac_code', and
13| the note type table 'nsvtab'. Checks 'cf' to determine if
14| we're displaying in the center of the screen.
15| Allocates gdsel events as needed for new events.
16| ------------------------------------------------------------------------------
17 .text
18
19 .xdef se_disp
20
21 .xdef ac_code
22 .xdef numstr
23
24 .xref dclkmd
25 .xref dsgmodz
26 .xref fromfpu
27 .xref mpcupd
28 .xref vputa
29 .xref vputc
30 .xref vputs
31
32 .xref angroup
33 .xref ctrsw
34 .xref grpstat
35 .xref ins2grp
36 .xref ndisp
37 .xref obj8
38 .xref gdfsep
39 .xref lastvel
40 .xref nsvtab
41 .xref velflag
42 .xref vrbw08
43 .xref vrbw09
44 .xref vrbw10
45 .xref vrbw11
46 .xref vrbw12
47 .xref vrbw13
48 .xref vrbw14
49 .xref vrbw15
50 .xref vrcw
51
52 .page
53
54| parameter offsets
55| -----------------
56| for se_disp:
57| ------------
58P_EP = 8 | LONG - event pointer
59P_SD = 12 | WORD - scroll direction
60P_SL = 14 | LONG - slice control table pointer
61P_CF = 18 | WORD - center slice flag
62
63| for vputa:
64| ----------
65ROW = 4 | WORD - 'row' parameter offset
66COL = 6 | WORD - 'col' parameter offset
67ATR = 8 | WORD - 'atr' parameter offset
68
69| Character field attributes for highlighting
70| -------------------------------------------
71AT01 = 0x0054
72AT04 = 0x0053
73AT05 = 0x0054
74AT06 = 0x0053
75AT07 = 0x0054
76AT08 = 0x0053
77AT09 = 0x0054
78AT10 = 0x0053
79AT11 = 0x0052
80AT12 = 0x0052
81
82| Special character equates
83| -------------------------
84SP_M1 = 0xA1 | -1
85SP_P1 = 0xA0 | +1
86
87 .page
88
89| event structure offsets
90| -----------------------
91| offset length
92| ------ ------
93E_TIME = 0 | LONG
94E_SIZE = 4 | BYTE
95E_TYPE = 5 | BYTE
96E_DATA1 = 6 | BYTE
97E_NOTE = 6 | BYTE
98E_DATA2 = 7 | BYTE
99E_GROUP = 7 | BYTE
100E_BAK = 8 | LONG
101E_FWD = 12 | LONG
102E_DN = 16 | LONG
103E_VEL = 16 | WORD
104E_DATA4 = 18 | WORD
105E_UP = 20 | LONG
106E_LFT = 24 | LONG
107E_RGT = 28 | LONG
108
109N_ETYPES = 25 | number of event types
110
111| gdsel structure definitions
112| ---------------------------
113G_NEXT = 0 | long - 'next' field (struct gdsel *)
114G_NOTE = 4 | word - 'note' field (short)
115G_CODE = 6 | word - 'code' field (short)
116
117NATCH_B = 3 | uslice note code: 'begin natural'
118NOTE_E = 6 | uslice note code: 'end note'
119
120NGDSEL = 17 | number of event slots in gdstb
121
122BARFLAG = 4*(NGDSEL-1) | offset to the bar marker flag
123
124 .page
125
126| A few words about se_disp:
127| --------------------------
128| se_disp has to be very fast, so it's written in assembly language,
129| rather than C, which is usually pretty good, but not quite good enough
130| for this application. The faster this routine runs, the higher the
131| tempo we can keep up with. If this code is fast enough, we end up
132| hardware limited by the maximum rate of the timer, and the VSDD update rate.
133
134se_disp: link a6,#0 | allocate and link stack frame
135 movea.l P_EP(a6),a0 | get event pointer 'ep' into a0
136 move.b E_TYPE(a0),d1 | get event type into d1.W
137 andi.w #0x007F,d1 | mask off new-note flag
138 cmp.b #N_ETYPES,d1 | see if it's valid
139 blt seds1 | jump if it is
140
141dsexit: unlk a6 | done -- unlink stack frames
142 rts | return to caller
143
144seds1: lea sddtab,a1 | get base of dispatch table
145 lsl.w #2,d1 | multiplty event by 4 for index
146 movea.l 0(a1,d1.W),a2 | get address of event routine
147 jmp (a2) | jump to event display routine
148
149| On entry, the individual display routines only depend on a0 pointing at the
150| event they were dispatched for. Registers a6 and a7 have their usual meaning,
151| a6 = frame pointer, a7 = stack pointer.
152
153| d0..d2 are used for scratch, as are a0..a2, and are not saved by this code.
154
155 .page
156
157| dsnbx -- dispatch to begin / end based on sd
158| ----- -----------------------------------
159dsnbx: tst.w P_SD(a7) | check direction
160 bne dsne | treat as end if going backward
161
162| dsnb -- display note begin
163| ---- ------------------
164dsnb: move.b E_TYPE(a0),d1 | get event type
165 move.w d1,d2 | save in d2
166 andi.w #0x007F,d1 | clear new-note flag
167 move.b d1,E_TYPE(a0) | store type back in event
168 clr.w d0 | get group number
169 move.b E_GROUP(a0),d0 | ... in d0
170 move.w d0,d1 | save group in d1
171 add.w d0,d0 | make d0 a word offset
172 lea grpstat,a1 | check grpstat[grp]
173 tst.w 0(a1,d0.W) | ...
174 beq dsexit | done if not enabled
175
176 tst.w P_CF(a6) | check center slice flag
177 beq dsnb0 | jump if not center slice
178
179 tst.w velflag | see if we display velocity
180 beq dsnvx | jump if not
181
182 move.w d2,-(a7) | save new-note flag on stack
183 move.w d1,-(a7) | save group number on stack
184 move.w E_VEL(a0),d0 | get velocity
185 move.w d1,d2 | point into lastvel[]
186 add.w d2,d2 | ...
187 lea lastvel,a1 | ...
188 move.w d0,0(a1,d2.W) | update lastvel[group]
189 ext.l d0 | scale
190 divu #252,d0 | ...
191 cmpi.w #100,d0 | convert MS digit
192 bcs dsnv0 | ...
193
194 move.b #'1',numstr | ...
195 subi.w #100,d0 | ...
196 bra dsnv1 | ...
197
198dsnv0: move.b #'0',numstr | ...
199
200dsnv1: ext.l d0 | convert middle & LS digits
201 divu #10,d0 | ...
202 addi.l #0x00300030,d0 | ...
203 move.b d0,numstr+1 | ...
204 swap d0 | ...
205 move.b d0,numstr+2 | ...
206 clr.b numstr+3 | terminate string
207 move.w d1,d0 | col = group
208 asl.w #2,d0 | ... * 5
209 add.w d1,d0 | ...
210 add.w #6,d0 | ... + 6
211 move.l a0,-(a7) | save event pointer on stack
212 move.w #AT11,-(a7) | put attribute on stack
213 move.l #numstr,-(a7) | put string address on stack
214 move.w d0,-(a7) | put column on stack
215 move.w #5,-(a7) | put row on stack
216 move.l obj8,-(a7) | put VSDD address on stack
217 jsr vputs | update the screen
218 add.l #14,a7 | clean up stack
219 movea.l (a7)+,a0 | restore event pointer
220
221 .page
222
223 move.w (a7)+,d0 | get group from stack
224 cmpi.w #12,d0 | see which byte it's in
225 bcc dsnv2 | jump if in MS byte
226
227 bset d0,vrbw12+1 | set group bit in LS byte
228 bra dsnv3 | ...
229
230dsnv2: bset d0,vrbw12 | set group bit in MS byte
231
232dsnv3: bset #4,vrcw | set video reset type bit
233 move.w (a7)+,d2 | get new-note flag from stack
234
235dsnvx: btst.l #7,d2 | check new-note flag
236 beq dsexit | done if not set
237
238dsnb0: clr.w d1 | get note number nn (0..127)
239 move.b E_NOTE(a0),d1 | ... in d1
240 sub.w #21,d1 | subtract base of piano scale
241 bmi dsexit | done if not displayable
242
243 cmp.w #87,d1 | see if it's too high
244 bgt dsexit | done if not displayable
245
246 move.l gdfsep,d0 | quit if no elements left
247 beq dsexit | ...
248
249 movea.l d0,a1 | a1 = gdsp
250 move.l G_NEXT(a1),gdfsep | gdfsep = gdsp->next
251 clr.w d2 | d2 = ep->group
252 move.b E_GROUP(a0),d2 | ...
253 lsl.w #2,d2 | ... * 4
254 movea.l P_SL(a6),a2 | a2 points at gdstb
255 move.l 0(a2,d2.W),G_NEXT(a1) | gdsp->next = gdstb[ep->group]
256 move.l a1,0(a2,d2.W) | gdstb[ep->group] = gdsp
257 move.w d1,G_NOTE(a1) | gdsp->note = nn
258 lea nsvtab,a2 | a2 points at nsvtab
259 tst.b 0(a2,d1.W) | check nsvtab[nn]
260 beq dsnb1 | jump if natural note
261
262 move.b ac_code,d1 | setup for an accidental note
263 bra dsnb2 | ...
264
265dsnb1: move.b #NATCH_B,d1 | setup for a natural note
266
267dsnb2: move.w d1,G_CODE(a1) | gdsp->code = note type
268 bra dsexit | done
269
270 .page
271
272| dsnex -- dispatch to end/begin based on sd
273| ----- ---------------------------------
274dsnex: tst.w P_SD(a7) | check direction
275 bne dsnb | treat as begin if going backward
276
277| dsne -- display note end
278| ---- ----------------
279dsne: move.b E_TYPE(a0),d1 | get event type
280 move.w d1,d2 | save in d2
281 andi.w #0x007F,d1 | clear new-note flag
282 move.b d1,E_TYPE(a0) | store type back in event
283 clr.w d0 | get group number
284 move.b E_GROUP(a0),d0 | ... in d0
285 add.w d0,d0 | ... as a word offset
286 lea grpstat,a1 | check grpstat[grp]
287 tst.w 0(a1,d0.W) | ...
288 beq dsexit | done if not enabled
289
290 tst.w P_CF(a6) | check center slice flag
291 beq dsne3 | jump if not center slice
292
293 btst.l #7,d2 | check new-note flag
294 beq dsexit | done if not set
295
296dsne3: move.b E_NOTE(a0),d1 | d1 = note number nn (0..127)
297 sub.w #21,d1 | subtract base of piano scale
298 bmi dsexit | done if not displayable
299
300 cmp.w #87,d1 | see if it's too high
301 bgt dsexit | done if not displayable
302
303 movea.l P_SL(a6),a2 | a2 points at gdstb
304 clr.w d2 | get group in d2
305 move.b E_GROUP(a0),d2 | ...
306 lsl.w #2,d2 | ... * 4
307 move.l 0(a2,d2.W),d0 | check gdstb[ep->group]
308 beq dsexit
309
310dsne0: movea.l d0,a1 | a1 = gdsp
311
312dsne1: cmp.w G_NOTE(a1),d1 | compare nn to gdsp->note
313 bne dsne2 | jump if not the one we want
314
315 move.w #NOTE_E,G_CODE(a1) | gdsp->code = NOTE_E (end note)
316
317dsne2: move.l G_NEXT(a1),d0 | get gdsp->next
318 beq dsexit | done if next = NULL
319
320 bra dsne0 | loop for next one
321
322 .page
323
324| dssbgn -- display section begin
325| ------ ---------------------
326dssbgn: tst.w P_CF(a6) | center update ?
327 beq dsbgn0 | jump if not
328
329 clr.w d1 | get section number
330 move.b E_DATA1(a0),d1 | ... from the event
331 addq.w #1,d1 | ... adjusted for display
332 ext.l d1 | ... as a long in d1
333 divu #10,d1 | divide by 10 for conversion
334 add.l #0x00300030,d1 | add '0' for ASCII conversion
335 move.b d1,numstr | put MS byte in work area
336 swap d1 | swap register halves
337 move.b d1,numstr+1 | put LS byte in work area
338 clr.b numstr+2 | terminate string
339 move.w #AT01,-(a7) | put attribute on stack
340 move.l #numstr,-(a7) | put buffer address on stack
341 move.w #6,-(a7) | put column on stack
342 move.w #0,-(a7) | put row on stack
343 move.l obj8,-(a7) | put sbase on stack
344 jsr vputs | update the screen
345 add.l #14,a7 | clean up stack
346 bset #4,vrcw+1 | set video reset type bit
347 tst.w ctrsw | update center for scupd ?
348 beq dsexit | done if not
349
350dsbgn0: move.l gdfsep,d0 | quit if no elements left
351 beq dsexit | ...
352
353 movea.l d0,a1 | a1 = gdsp
354 move.l G_NEXT(a1),gdfsep | gdfsep = gdsp->next
355 move.w #48,d2 | d2 = event PRIORITY * 4
356 movea.l P_SL(a6),a2 | a2 points at gdstb
357 move.l 0(a2,d2.W),G_NEXT(a1) | gdsp->next = gdstb[pri]
358 move.w #0x1111,G_NOTE(a1) | gdsp->note = COLOR
359 move.w #0,G_CODE(a1) | gdsp->code = PATTERN
360 move.l a1,0(a2,d2.W) | gdstb[pri] = gdsp
361 bra dsexit | done
362
363 .page
364
365| dssend -- display section end
366| ------ -------------------
367dssend: tst.w P_CF(a6) | center update ?
368 beq dssend0 | jump if not
369
370 tst.w ctrsw | update center for scupd ?
371 beq dsexit | done if not
372
373dssend0: move.l gdfsep,d0 | quit if no elements left
374 beq dsexit | ...
375
376 movea.l d0,a1 | a1 = gdsp
377 move.l G_NEXT(a1),gdfsep | gdfsep = gdsp->next
378 move.w #48,d2 | d2 = event PRIORITY * 4
379 movea.l P_SL(a6),a2 | a2 points at gdstb
380 move.l 0(a2,d2.W),G_NEXT(a1) | gdsp->next = gdstb[pri]
381 move.w #0x1111,G_NOTE(a1) | gdsp->note = COLOR
382 move.w #2,G_CODE(a1) | gdsp->code = PATTERN
383 move.l a1,0(a2,d2.W) | gdstb[pri] = gdsp
384 bra dsexit | done
385
386| dsbeat -- display beat
387| ------ ------------
388dsbeat: tst.w P_CF(a6) | center update ?
389 bne dsexit | done if so
390
391 move.l gdfsep,d0 | quit if no elements left
392 beq dsexit | ...
393
394 movea.l d0,a1 | a1 = gdsp
395 move.l G_NEXT(a1),gdfsep | gdfsep = gdsp->next
396 move.w #48,d2 | d2 = event PRIORITY * 4
397 movea.l P_SL(a6),a2 | a2 points at gdstb
398 move.l 0(a2,d2.W),G_NEXT(a1) | gdsp->next = gdstb[pri]
399 move.w #0x1111,G_NOTE(a1) | gdsp->note = COLOR
400 move.w #1,G_CODE(a1) | gdsp->code = PATTERN
401 move.l a1,0(a2,d2.W) | gdstb[pri] = gdsp
402 bra dsexit | done
403
404 .page
405
406| dstune -- display tuning
407| ------ --------------
408dstune: tst.w P_CF(a6) | center update ?
409 beq dstune0 | jump if not
410
411 clr.w d1 | get current tuning
412 move.b E_DATA1(a0),d1 | ...
413 add.w #0x0030,d1 | add '0' for ASCII conversion
414 move.w #AT05,-(a7) | put attribute on stack
415 move.w d1,-(a7) | put character on stack
416 move.w #19,-(a7) | put column on stack
417 move.w #1,-(a7) | put row on stack
418 move.l obj8,-(a7) | put sbase on stack
419 jsr vputc | display character
420 add.l #12,a7 | clean up stack
421 bset #1,vrcw+1 | set video reset type bit
422 tst.w ctrsw | update center for scupd ?
423 beq dsexit | done if not
424
425dstune0: move.l gdfsep,d0 | quit if no elements left
426 beq dsexit | ...
427
428 movea.l d0,a1 | a1 = gdsp
429 move.l G_NEXT(a1),gdfsep | gdfsep = gdsp->next
430 move.w #52,d2 | d2 = event PRIORITY * 4
431 movea.l P_SL(a6),a2 | a2 points at gdstb
432 move.l 0(a2,d2.W),G_NEXT(a1) | gdsp->next = gdstb[pri]
433 move.w #0xCCCC,G_NOTE(a1) | gdsp->note = COLOR
434 move.w #3,G_CODE(a1) | gdsp->code = PATTERN
435 move.l a1,0(a2,d2.W) | gdstb[priority] = gdsp
436 bra dsexit | done
437
438 .page
439
440| dstrns -- display transposition
441| ------ ---------------------
442dstrns: clr.w d0 | get group number
443 move.b E_DATA1(a0),d0 | ... in d0
444 add.w d0,d0 | ... as a word offset
445 lea grpstat,a1 | check grpstat[grp]
446 tst.w 0(a1,d0.W) | ...
447 beq dsexit | done if not enabled
448
449 tst.w P_CF(a6) | center update
450 beq dstrns0 | jump if not
451
452 move.w E_LFT(a0),d1 | get transposition value
453 bpl dstrns1 | jump if positive
454
455 move.b #'-',numstr | note negative sign
456 neg.w d1 | make number positive
457 bra dstrns2 | ...
458
459dstrns1: move.b #'+',numstr | note positive sign
460
461dstrns2: cmpi.w #1000,d1 | is number GE 1000 ?
462 bcs dstrns3 | jump if not
463
464 subi.w #1000,d1 | adjust number
465 cmpi.b #'-',numstr | was number negative
466 bne dstrns4 | jump if not
467
468 move.b #SP_M1,numstr | set -1 in numstr
469 bra dstrns3 | ...
470
471dstrns4: move.b #SP_P1,numstr | set +1 in numstr
472
473dstrns3: ext.l d1 | make d1 a long
474 divu #100,d1 | convert 1st digit
475 addi.w #0x0030,d1 | ... to ASCII
476 move.b d1,numstr+1 | ... in numstr
477 swap d1 | convert 2nd digit
478 ext.l d1 | ...
479 divu #10,d1 | ...
480 addi.w #0x0030,d1 | ... to ASCII
481 move.b d1,numstr+2 | ... in numstr
482 swap d1 | convert 3rd digit
483 addi.w #0x0030,d1 | ... to ASCII
484 move.b d1,numstr+3 | ... in numstr
485 clr.b numstr+4 | terminate numstr
486
487 .page
488
489 move.w d0,d1 | get group number
490 asr.w #1,d1 | ... in d1
491 move.w d1,-(a7) | save group number on stack
492 add.w d0,d0 | calculate column
493 add.w d0,d1 | ... = 5 * group
494 addi.w #5,d1 | ... + 5
495 move.w #AT11,-(a7) | vputs(obj8, 3, col, numstr, atr11)
496 move.l #numstr,-(a7) | ...
497 move.w d1,-(a7) | ...
498 move.w #3,-(a7) | ...
499 move.l obj8,-(a7) | ...
500 jsr vputs | ...
501 add.l #14,a7 | ...
502 move.w (a7)+,d0 | get group number
503 cmpi.w #8,d0 | see which byte it's in
504 bcc dstrns5 | jump if in MS byte
505
506 bset d0,vrbw09+1 | set group bit in LS byte
507 bra dstrns6 | ...
508
509dstrns5: sub.w #8,d0 | adjust for byte
510 bset d0,vrbw09 | set group bit in MS byte
511
512dstrns6: bset #1,vrcw | set video reset type bit
513 tst.w ctrsw | update center for scupd ?
514 beq dsexit | done if not
515
516dstrns0: move.l gdfsep,d0 | quit if no elements left
517 beq dsexit | ...
518
519 movea.l d0,a1 | a1 = gdsp
520 move.l G_NEXT(a1),gdfsep | gdfsep = gdsp->next
521 move.w #52,d2 | d2 = event PRIORITY * 4
522 movea.l P_SL(a6),a2 | a2 points at gdstb
523 move.l 0(a2,d2.W),G_NEXT(a1) | gdsp->next = gdstb[pri]
524 move.w #0x9999,G_NOTE(a1) | gdsp->note = COLOR
525 move.w #4,G_CODE(a1) | gdsp->code = PATTERN
526 move.l a1,0(a2,d2.W) | gdstb[pri] = gdsp
527 bra dsexit | done
528
529 .page
530
531| dsdyn -- display dynamics
532| ----- ----------------
533dsdyn: clr.w d0 | get group number
534 move.b E_DATA1(a0),d0 | ... in d0
535 add.w d0,d0 | ... as a word offset
536 lea grpstat,a1 | check grpstat[grp]
537 tst.w 0(a1,d0.W) | ...
538 beq dsexit | done if not enabled
539
540 tst.w P_CF(a6) | center update ?
541 beq dsdyn00 | jump if not
542
543 clr.w d0 | get dynamics
544 move.b E_DATA2(a0),d0 | ... in d0
545 move.w d0,-(a7) | save dyanmics
546 clr.w d1 | get group number
547 move.b E_DATA1(a0),d1 | ... in d1
548 move.w d1,-(a7) | save group number
549 move.w (a7),d0 | col = group number
550 add.w d0,d0 | ... * 5
551 add.w d0,d0 | ...
552 move.w (a7)+,d2 | ... (d2 = group number)
553 add.w d2,d0 | ...
554 add.w #6,d0 | ... + 6
555 move.w (a7)+,d1 | get dynamics
556 add.w #0x0030,d1 | add '0' for ASCII conversion
557 move.w d2,-(a7) | save group number
558 move.w #AT11,-(a7) | put attribute on stack
559 move.w d1,-(a7) | put digit on stack
560 move.w d0,-(a7) | put column on stack
561 move.w #4,-(a7) | put row on stack
562 move.l obj8,-(a7) | put object address on stack
563 jsr vputc | update the screen
564 add.l #12,a7 | clean up stack
565 move.w (a7)+,d0 | get group number
566 cmp.w #8,d0 | see which word it's in
567 bcc dsdyn1 | jump if in MS word
568
569 bset d0,vrbw10+1 | set group bit in LS byte
570 bra dsdyn2 | ...
571
572dsdyn1: sub.w #8,d0 | adjust for for byte
573 bset d0,vrbw10 | set group bit in MS byte
574
575dsdyn2: bset #2,vrcw | set video reset type bit
576 tst.w ctrsw | update center for scupd ?
577 beq dsexit | done if not
578
579 .page
580dsdyn00: move.l gdfsep,d0 | quit if no elements left
581 beq dsexit | ...
582
583 movea.l d0,a1 | a1 = gdsp
584 move.l G_NEXT(a1),gdfsep | gdfsep = gdsp->next
585 move.w #52,d2 | d2 = event PRIORITY * 4
586 movea.l P_SL(a6),a2 | a2 points at gdstb
587 move.l 0(a2,d2.W),G_NEXT(a1) | gdsp->next = gdstb[pri]
588 move.w #0x9999,G_NOTE(a1) | gdsp->note = COLOR
589 move.w #5,G_CODE(a1) | gdsp->code = PATTERN
590 move.l a1,0(a2,d2.W) | gdstb[pri] = gdsp
591 bra dsexit | done
592
593 .page
594
595| dslocn -- display location
596| ------ ----------------
597dslocn_: clr.w d0 | get group number
598 move.b E_DATA1(a0),d0 | ... in d0
599 add.w d0,d0 | ... as a word offset
600 lea grpstat,a1 | check grpstat[grp]
601 tst.w 0(a1,d0.W) | ...
602 beq dsexit | done if not enabled
603
604 tst.w P_CF(a6) | center update ?
605 beq dsloc00 | jump if not
606
607 clr.w d0 | get location
608 move.b E_DATA2(a0),d0 | ... in d0
609 move.w d0,-(a7) | save location
610 clr.w d1 | get group number
611 move.b E_DATA1(a0),d1 | ... in d1
612 move.w d1,-(a7) | save group number
613 move.w (a7),d0 | col = group number
614 add.w d0,d0 | ... * 5
615 add.w d0,d0 | ...
616 move.w (a7)+,d2 | ... (d2 = group number)
617 add.w d2,d0 | ...
618 add.w #8,d0 | ... + 8
619 move.w (a7)+,d1 | get location
620 add.w #0x0031,d1 | add '0' for ASCII conversion
621 move.w d2,-(a7) | save group number
622 move.w #AT11,-(a7) | put attribute on stack
623 move.w d1,-(a7) | put character on stack
624 move.w d0,-(a7) | put column on stack
625 move.w #4,-(a7) | put row on stack
626 move.l obj8,-(a7) | put object address on stack
627 jsr vputc | update the screen
628 add.l #12,a7 | clean up stack
629 move.w (a7)+,d0 | get group number
630 cmp.w #8,d0 | see which word it's in
631 bcc dslocn1 | jump if in MS word
632
633 bset d0,vrbw11+1 | set group bit in LS byte
634 bra dslocn2 | ...
635
636dslocn1: sub.w #8,d0 | adjust for for byte
637 bset d0,vrbw11 | set group bit in MS byte
638
639dslocn2: bset #3,vrcw | set video reset type bit
640 tst.w ctrsw | update center for scupd ?
641 beq dsexit | done if not
642
643 .page
644dsloc00: move.l gdfsep,d0 | quit if no elements left
645 beq dsexit | ...
646
647 movea.l d0,a1 | a1 = gdsp
648 move.l G_NEXT(a1),gdfsep | gdfsep = gdsp->next
649 move.w #52,d2 | d2 = event PRIORITY * 4
650 movea.l P_SL(a6),a2 | a2 points at gdstb
651 move.l 0(a2,d2.W),G_NEXT(a1) | gdsp->next = gdstb[pri]
652 move.w #0x9999,G_NOTE(a1) | gdsp->note = COLOR
653 move.w #5,G_CODE(a1) | gdsp->code = PATTERN
654 move.l a1,0(a2,d2.W) | gdstb[pri] = gdsp
655 bra dsexit | done
656
657 .page
658
659| dsanrs -- display analog resolution
660| ------ -------------------------
661dsanrs: move.b E_DATA1(a0),d1 | get var / group
662 move.w d1,d0 | extract group number
663 andi.w #0x000F,d0 | ... in d0
664 add.w d0,d0 | ... as a word offset
665 lea grpstat,a1 | check grpstat[grp]
666 tst.w 0(a1,d0.W) | ...
667 beq dsexit | done if not enabled
668
669 tst.w P_CF(a6) | center update ?
670 beq dsanrs0 | jump if not
671
672 move.w angroup,d2 | see if we display
673 bmi dsexit | jump if not
674
675 subq.w #1,d2 | adust selected group number
676 move.w d1,d0 | extract group from event
677 andi.w #0x000F,d0 | ...
678 cmp.w d0,d2 | see if we display
679 bne dsexit | jump if not
680
681 lsr.w #4,d1 | extract variable number
682 andi.w #0x000F,d1 | ...
683 move.w d1,-(a7) | save variable number
684 move.w d1,d0 | calculate display offset
685 lsl.w #3,d0 | ... (var * 9) + 6
686 add.w d0,d1 | ... in d1
687 addq.w #6,d1 | ...
688 move.b E_DATA2(a0),d0 | get resolution
689 addi.w #0x0030,d0 | convert for display
690 move.w #AT12,-(a7) | put attribute on stack
691 move.w d0,-(a7) | put character on stack
692 move.w d1,-(a7) | put column on stack
693 move.w #7,-(a7) | put row on stack
694 move.l obj8,-(a7) | put sbase on stack
695 jsr vputc | update the screen
696 add.l #12,a7 | clean up stack
697 move.w (a7)+,d0 | get variable number
698 bset d0,vrbw13+1 | set variable bit
699 bset #5,vrcw | set video reset type bit
700 tst.w ctrsw | update center for scupd ?
701 beq dsexit | done if not
702
703 .page
704dsanrs0: move.l gdfsep,d0 | quit if no elements left
705 beq dsexit | ...
706
707 movea.l d0,a1 | a1 = gdsp
708 move.l G_NEXT(a1),gdfsep | gdfsep = gdsp->next
709 move.w #52,d2 | d2 = event PRIORITY * 4
710 movea.l P_SL(a6),a2 | a2 points at gdstb
711 move.l 0(a2,d2.W),G_NEXT(a1) | gdsp->next = gdstb[pri]
712 move.w #0x9999,G_NOTE(a1) | gdsp->note = COLOR
713 move.w #6,G_CODE(a1) | gdsp->code = PATTERN
714 move.l a1,0(a2,d2.W) | gdstb[pri] = gdsp
715 bra dsexit | done
716
717 .page
718
719| dsanvl -- display analog value
720| ------ --------------------
721dsanvl: move.w angroup,d2 | see if we display
722 bmi dsexit | jump if not
723
724 move.b E_DATA1(a0),d1 | get var / group
725 move.w d1,d0 | extract group number
726 andi.w #0x000F,d0 | ... in d0
727 add.w d0,d0 | ... as a word offset
728 lea grpstat,a1 | check grpstat[grp]
729 tst.w 0(a1,d0.W) | ...
730 beq dsexit | done if not enabled
731
732 tst.w P_CF(a6) | center update ?
733 beq dsanvl0 | jump if not
734
735 subq.w #1,d2 | adust group number
736 move.w d1,d0 | extract group
737 andi.w #0x000F,d0 | ...
738 cmp.w d0,d2 | see if we display
739 bne dsexit | jump if not
740
741 lsr.w #4,d1 | extract variable number
742 andi.w #0x000F,d1 | ...
743 move.w d1,-(a7) | save variable number
744 move.w d1,d0 | calculate display offset
745 lsl.w #3,d0 | ... (var * 9) + 8
746 add.w d0,d1 | ... in d1
747 addi.w #8,d1 | ...
748 move.w E_DN(a0),d0 | get value
749 asr.w #5,d0 | adjust to low 11 bits
750 bpl dsanvl1 | jump if positive
751
752 move.b #'-',numstr | set sign = '-'
753 neg.w d0 | make value positive
754 bra dsanvl2
755
756dsanvl1: move.b #'+',numstr | set sign = '+'
757
758 .page
759dsanvl2: ext.l d0 | convert MS digit
760 divu #1000,d0 | ...
761 add.w #0x0030,d0 | ...
762 move.b d0,numstr+1 | ...
763 swap d0 | convert middle digit
764 ext.l d0 | ...
765 divu #100,d0 | ...
766 add.w #0x0030,d0 | ...
767 move.b d0,numstr+2 | ...
768 move.b #'.',numstr+3 | insert decimal point
769 swap d0 | convert LS digit
770 ext.l d0 | ...
771 divu #10,d0 | ...
772 add.w #0x0030,d0 | ...
773 move.b d0,numstr+4 | ...
774 clr.b numstr+5 | terminate string
775 move.w #AT12,-(a7) | put attribute on stack
776 move.l #numstr,-(a7) | put buffer address on stack
777 move.w d1,-(a7) | put column on stack
778 move.w #7,-(a7) | put row on stack
779 move.l obj8,-(a7) | put sbase on stack
780 jsr vputs | update the screen
781 add.l #14,a7 | clean up stack
782 move.w (a7)+,d0 | get variable number
783 bset d0,vrbw14+1 | set variable bit
784 bset #6,vrcw | set video reset type bit
785 tst.w ctrsw | update center for scupd ?
786 beq dsexit | done if not
787
788dsanvl0: move.l gdfsep,d0 | quit if no elements left
789 beq dsexit | ...
790
791 movea.l d0,a1 | a1 = gdsp
792 move.l G_NEXT(a1),gdfsep | gdfsep = gdsp->next
793 move.w #52,d2 | d2 = event PRIORITY * 4
794 movea.l P_SL(a6),a2 | a2 points at gdstb
795 move.l 0(a2,d2.W),G_NEXT(a1) | gdsp->next = gdstb[pri]
796 move.w #0x9999,G_NOTE(a1) | gdsp->note = COLOR
797 move.w #6,G_CODE(a1) | gdsp->code = PATTERN
798 move.l a1,0(a2,d2.W) | gdstb[pri] = gdsp
799 bra dsexit | done
800
801 .page
802
803| dsasgn -- display assignment
804| ------ ------------------
805dsasgn: tst.w P_CF(a6) | center update ?
806 beq dsasgn0 | jump if not
807
808 move.l a0,-(a7) | stash a0
809 jsr mpcupd | update changed stuff
810 movea.l (a7)+,a0 | restore a0
811 clr.w d1 | get assignment
812 move.b E_DATA1(a0),d1 | ... from the event
813 ext.l d1 | ... as a long in d1
814 divu #10,d1 | divide by 10 for conversion
815 add.l #0x00300030,d1 | add '0' for ASCII conversion
816 move.b d1,numstr | put MS byte in work area
817 swap d1 | swap register halves
818 move.b d1,numstr+1 | put LS byte in work area
819 clr.b numstr+2 | terminate string
820 move.w #AT04,-(a7) | put attribute on stack
821 move.l #numstr,-(a7) | put buffer address on stack
822 move.w #11,-(a7) | put column on stack
823 move.w #1,-(a7) | put row on stack
824 move.l obj8,-(a7) | put sbase on stack
825 jsr vputs | update the screen
826 add.l #14,a7 | clean up stack
827 bset #0,vrcw+1 | set video reset type bit
828 tst.w ctrsw | update center for scupd ?
829 beq dsexit | done if not
830
831dsasgn0: move.l gdfsep,d0 | quit if no elements left
832 beq dsexit | ...
833
834 movea.l d0,a1 | a1 = gdsp
835 move.l G_NEXT(a1),gdfsep | gdfsep = gdsp->next
836 move.w #56,d2 | d2 = event PRIORITY * 4
837 movea.l P_SL(a6),a2 | a2 points at gdstb
838 move.l 0(a2,d2.W),G_NEXT(a1) | gdsp->next = gdstb[pri]
839 move.w #0x3333,G_NOTE(a1) | gdsp->note = COLOR
840 move.w #3,G_CODE(a1) | gdsp->code = PATTERN
841 move.l a1,0(a2,d2.W) | gdstb[pri] = gdsp
842 bra dsexit | done
843
844 .page
845
846| dstmpo -- display tempo
847| ------ -------------
848dstmpo: tst.w P_CF(a6) | center update ?
849 beq dstmpo0 | jump if not
850
851 clr.w d1 | get tempo
852 move.b E_DATA1(a0),d1 | ... from event
853 ext.l d1 | ... as a long in d1
854 divu #10,d1 | divide by 10 for conversion
855 swap d1 | swap register halves
856 add.w #0x0030,d1 | add '0' for ASCII conversion
857 move.b d1,numstr+2 | put LS byte in work area
858 swap d1 | swap register halves
859 ext.l d1 | divide again
860 divu #10,d1 | ...
861 add.l #0x00300030,d1 | add '0' for ASCII conversion
862 move.b d1,numstr | put MS byte in work area
863 swap d1 | swap register halves
864 move.b d1,numstr+1 | put middle byte in work area
865 clr.b numstr+3 | terminate string
866 move.w #AT06,-(a7) | put attribute on stack
867 move.l #numstr,-(a7) | put buffer address on stack
868 move.w #27,-(a7) | put column on stack
869 move.w #1,-(a7) | put row on stack
870 move.l obj8,-(a7) | put sbase on stack
871 jsr vputs | display tempo
872 add.l #14,a7 | clean up stack
873 bset #2,vrcw+1 | set video reset type bit
874 tst.w ctrsw | update center for scupd ?
875 beq dsexit | done if not
876
877dstmpo0: move.l gdfsep,d0 | quit if no elements left
878 beq dsexit | ...
879
880 movea.l d0,a1 | a1 = gdsp
881 move.l G_NEXT(a1),gdfsep | gdfsep = gdsp->next
882 move.w #56,d2 | d2 = event PRIORITY * 4
883 movea.l P_SL(a6),a2 | a2 points at gdstb
884 move.l 0(a2,d2.W),G_NEXT(a1) | gdsp->next = gdstb[pri]
885 move.w #0x3333,G_NOTE(a1) | gdsp->note = COLOR
886 move.w #4,G_CODE(a1) | gdsp->code = PATTERN
887 move.l a1,0(a2,d2.W) | gdstb[pri] = gdsp
888 bra dsexit | done
889
890 .page
891
892| dsstop -- display stop
893| ------ ------------
894dsstop: tst.w P_CF(a6) | center update ?
895 beq dsstop0 | jump if not
896
897 jsr dclkmd | show that clock is stopped
898 move.w #AT08,-(a7) | put attribute on stack
899 move.w #40,-(a7) | put 1st column on stack
900 move.w #1,-(a7) | put row on stack
901 move.l obj8,-(a7) | put sbase on stack
902 jsr vputa | hilite first column
903 move.w #41,COL(a7) | put 2nd column on stack
904 jsr vputa | hilite second column
905 move.w #42,COL(a7) | put 3rd column on stack
906 jsr vputa | hilite third column
907 move.w #43,COL(a7) | put 4th column on stack
908 jsr vputa | hilite fourth column
909 add.l #10,a7 | clean up stack
910 bset #7,vrcw | set video reset type bits
911 bset #0,vrbw15 | ...
912 tst.w ctrsw | update center for scupd ?
913 beq dsexit | done if not
914
915dsstop0: move.l gdfsep,d0 | quit if no elements left
916 beq dsexit | ...
917
918 movea.l d0,a1 | a1 = gdsp
919 move.l G_NEXT(a1),gdfsep | gdfsep = gdsp->next
920 move.w #56,d2 | d2 = event PRIORITY * 4
921 movea.l P_SL(a6),a2 | a2 points at gdstb
922 move.l 0(a2,d2.W),G_NEXT(a1) | gdsp->next = gdstb[pri]
923 move.w #0x3333,G_NOTE(a1) | gdsp->note = COLOR
924 move.w #5,G_CODE(a1) | gdsp->code = PATTERN
925 move.l a1,0(a2,d2.W) | gdstb[pri] = gdsp
926 bra dsexit | done
927
928 .page
929
930| dsnext -- display next
931| ------ ------------
932dsnext: tst.w P_CF(a6) | center update ?
933 beq dsnext0 | jump if not
934
935 move.w #AT08,-(a7) | put attribute on stack
936 move.w #45,-(a7) | put 1st column on stack
937 move.w #1,-(a7) | put row on stack
938 move.l obj8,-(a7) | put sbase on stack
939 jsr vputa | hilite first column
940 move.w #46,COL(a7) | put 2nd column on stack
941 jsr vputa | hilite second column
942 move.w #47,COL(a7) | put 3rd column on stack
943 jsr vputa | hilite third column
944 move.w #48,COL(a7) | put 4th column on stack
945 jsr vputa | hilite fourth column
946 add.l #10,a7 | clean up stack
947 bset #7,vrcw | set video reset type bits
948 bset #1,vrbw15 | ...
949 tst.w ctrsw | update center for scupd ?
950 beq dsexit | done if not
951
952dsnext0: move.l gdfsep,d0 | quit if no elements left
953 beq dsexit | ...
954
955 movea.l d0,a1 | a1 = gdsp
956 move.l G_NEXT(a1),gdfsep | gdfsep = gdsp->next
957 move.w #56,d2 | d2 = event PRIORITY * 4
958 movea.l P_SL(a6),a2 | a2 points at gdstb
959 move.l 0(a2,d2.W),G_NEXT(a1) | gdsp->next = gdstb[pri]
960 move.w #0x3333,G_NOTE(a1) | gdsp->note = COLOR
961 move.w #5,G_CODE(a1) | gdsp->code = PATTERN
962 move.l a1,0(a2,d2.W) | gdstb[pri] = gdsp
963 bra dsexit | done
964
965 .page
966
967| dsgrp -- display group status
968| ----- --------------------
969dsgrp: tst.w P_CF(a6) | center update ?
970 beq dsgrp0 | jump if not
971
972 tst.w ctrsw | update center for scupd ?
973 beq dsexit | done if not
974
975dsgrp0: move.l gdfsep,d0 | quit if no elements left
976 beq dsexit | ...
977
978 movea.l d0,a1 | a1 = gdsp
979 move.l G_NEXT(a1),gdfsep | gdfsep = gdsp->next
980 move.w #60,d2 | d2 = event PRIORITY * 4
981 movea.l P_SL(a6),a2 | a2 points at gdstb
982 move.l 0(a2,d2.W),G_NEXT(a1) | gdsp->next = gdstb[pri]
983 move.w #0x9999,G_NOTE(a1) | gdsp->note = COLOR
984 move.w #3,G_CODE(a1) | gdsp->code = PATTERN
985 move.l a1,0(a2,d2.W) | gdstb[pri] = gdsp
986 bra dsexit | done
987
988 .page
989
990| dsinst -- display instrument
991| ------ ------------------
992dsinst: clr.w d0 | get group number
993 move.b E_DATA1(a0),d0 | ... in d0
994 add.w d0,d0 | ... as a word offset
995 lea grpstat,a1 | check grpstat[grp]
996 tst.w 0(a1,d0.W) | ...
997 beq dsexit | done if not enabled
998
999 tst.w P_CF(a6) | center update ?
1000 beq dsins00 | jump if not
1001
1002 lea ins2grp,a1 | point at ins2grp[]
1003 clr.w d0 | get instrument number
1004 move.b E_DATA2(a0),d0 | ... in d0
1005 move.w d0,-(a7) | save instrument number
1006 clr.w d1 | get group number
1007 move.b E_DATA1(a0),d1 | ... in d1
1008 move.w d1,-(a7) | save group number
1009 move.w (a7),d0 | col = group number
1010 add.w d0,d0 | ... * 5
1011 add.w d0,d0 | ...
1012 move.w (a7)+,d2 | ... (d2 = group number)
1013 add.w d2,d0 | ...
1014 add.w #7,d0 | ... + 7
1015 clr.l d1 | get instrument number
1016 move.w (a7)+,d1 | ... as a long in d1
1017 divu #10,d1 | divide by 10 for conversion
1018 add.l #0x00300030,d1 | add '0' for ASCII conversion
1019 move.b d1,numstr | put MS byte in work area
1020 swap d1 | swap register halves
1021 move.b d1,numstr+1 | put LS byte in work area
1022 clr.b numstr+2 | terminate string
1023 move.w d2,-(a7) | save group number
1024 move.w #AT11,-(a7) | put attribute on stack
1025 move.l #numstr,-(a7) | put buffer address on stack
1026 move.w d0,-(a7) | put column on stack
1027 move.w #2,-(a7) | put row on stack
1028 move.l obj8,-(a7) | put object address on stack
1029 jsr vputs | update the screen
1030 add.l #14,a7 | clean up stack
1031
1032 .page
1033 move.w (a7)+,d0 | get group number
1034 cmp.w #8,d0 | see which word it's in
1035 bcc dsinst1 | jump if in MS word
1036
1037 bset d0,vrbw08+1 | set group bit in LS byte
1038 bra dsinst2 | ...
1039
1040dsinst1: sub.w #8,d0 | adjust for for byte
1041 bset d0,vrbw08 | set group bit in MS byte
1042
1043dsinst2: bset #0,vrcw | set video reset type bit
1044 tst.w ctrsw | update center for scupd ?
1045 beq dsexit | done if not
1046
1047dsins00: move.l gdfsep,d0 | quit if no elements left
1048 beq dsexit | ...
1049
1050 movea.l d0,a1 | a1 = gdsp
1051 move.l G_NEXT(a1),gdfsep | gdfsep = gdsp->next
1052 move.w #60,d2 | d2 = event PRIORITY * 4
1053 movea.l P_SL(a6),a2 | a2 points at gdstb
1054 move.l 0(a2,d2.W),G_NEXT(a1) | gdsp->next = gdstb[pri]
1055 move.w #0x9999,G_NOTE(a1) | gdsp->note = COLOR
1056 move.w #3,G_CODE(a1) | gdsp->code = PATTERN
1057 move.l a1,0(a2,d2.W) | gdstb[pri] = gdsp
1058 bra dsexit | done
1059
1060 .page
1061
1062| dsintp -- display interpolation
1063| ------ ---------------------
1064dsintp: tst.w P_CF(a6) | center update ?
1065 beq dsintp0 | jump if not
1066
1067 move.w E_DATA1(a0),-(a7) | get interpolate value
1068 jsr fromfpu | convert to milliseconds
1069 tst.w (a7)+ | ...
1070 andi.l #0x0000FFFF,d0 | clear high bits
1071 divu #10000,d0 | convert 1st digit
1072 addi.w #0x0030,d0 | ... to ASCII
1073 move.b d0,numstr | ... in numstr
1074 swap d0 | convert 2nd digit
1075 ext.l d0 | ...
1076 divu #1000,d0 | ...
1077 addi.w #0x0030,d0 | ... to ASCII
1078 move.b d0,numstr+1 | ... in numstr
1079 move.b #'.',numstr+2 | insert decimal point
1080 swap d0 | convert 3rd digit
1081 ext.l d0 | ...
1082 divu #100,d0 | ...
1083 addi.w #0x0030,d0 | ... to ASCII
1084 move.b d0,numstr+3 | ... in numstr
1085 clr.b numstr+4 | terminate numstr
1086 move.w #AT07,-(a7) | vputs(obj8, 1, 35, numstr, AT07)
1087 move.l #numstr,-(a7) | ...
1088 move.w #35,-(a7) | ...
1089 move.w #1,-(a7) | ...
1090 move.l obj8,-(a7) | ...
1091 jsr vputs | ...
1092 add.l #14,a7 | ...
1093 bset #3,vrcw+1 | set video reset bit
1094 tst.w ctrsw | update center for scupd ?
1095 beq dsexit | done if not
1096
1097dsintp0: move.l gdfsep,d0 | quit if no elements left
1098 beq dsexit | ...
1099
1100 movea.l d0,a1 | a1 = gdsp
1101 move.l G_NEXT(a1),gdfsep | gdfsep = gdsp->next
1102 move.w #60,d2 | d2 = event PRIORITY * 4
1103 movea.l P_SL(a6),a2 | a2 points at gdstb
1104 move.l 0(a2,d2.W),G_NEXT(a1) | gdsp->next = gdstb[pri]
1105 move.w #0xCCCC,G_NOTE(a1) | gdsp->note = COLOR
1106 move.w #4,G_CODE(a1) | gdsp->code = PATTERN
1107 move.l a1,0(a2,d2.W) | gdstb[pri] = gdsp
1108 bra dsexit | done
1109
1110 .page
1111
1112| dspnch -- display punch in/out
1113| ------ --------------------
1114dspnch: tst.w P_CF(a6) | center update ?
1115 beq dspnch0 | jump if not
1116
1117 tst.w E_DATA1(a0) | punch in ?
1118 beq dspnch1 | jump if not
1119
1120 move.w #AT09,-(a7) | put attribute on stack
1121 move.w #50,-(a7) | put 1st col on stack
1122 move.w #1,-(a7) | put row on stack
1123 move.l obj8,-(a7) | put object address on stack
1124 jsr vputa | highlight 1st column
1125 move.w #51,COL(a7) | put 2nd col on stack
1126 jsr vputa | highlight 2nd col
1127 add.l #10,a7 | clean up stack
1128 bset #5,vrcw+1 | set video reset bit
1129 bra dspnch2 | go do maker update
1130
1131dspnch1: move.w #AT09,-(a7) | put attribute on stack
1132 move.w #53,-(a7) | put 1st col on stack
1133 move.w #1,-(a7) | put row on stack
1134 move.l obj8,-(a7) | put object address on stack
1135 jsr vputa | highlight 1st column
1136 move.w #54,COL(a7) | put 2nd col on stack
1137 jsr vputa | highlight 2nd column
1138 move.w #55,COL(a7) | put 3rd col on stack
1139 jsr vputa | highlight 3rd column
1140 add.l #10,a7 | clean up stack
1141 bset #6,vrcw+1 | set video reset bit
1142
1143dspnch2: jsr dsgmodz | display updated modes
1144 tst.w ctrsw | update center for scupd ?
1145 beq dsexit | done if not
1146
1147dspnch0: move.l gdfsep,d0 | quit if no elements left
1148 beq dsexit | ...
1149
1150 movea.l d0,a1 | a1 = gdsp
1151 move.l G_NEXT(a1),gdfsep | gdfsep = gdsp->next
1152 move.w #60,d2 | d2 = event PRIORITY * 4
1153 movea.l P_SL(a6),a2 | a2 points at gdstb
1154 move.l 0(a2,d2.W),G_NEXT(a1) | gdsp->next = gdstb[pri]
1155 move.w #0xCCCC,G_NOTE(a1) | gdsp->note = COLOR
1156 tst.w E_DATA1(a0) | see which kind we have
1157 bne dspnchi | jump if 'punch in'
1158
1159 move.w #6,G_CODE(a1) | gdsp->code = 'out' PATTERN
1160 bra dspnchx
1161
1162dspnchi: move.w #5,G_CODE(a1) | gdsp->code = 'in' PATTERN
1163
1164dspnchx: move.l a1,0(a2,d2.W) | gdstb[pri] = gdsp
1165 bra dsexit | done
1166
1167 .page
1168
1169| dsbar -- display a bar marker
1170| ----- --------------------
1171dsbar: tst.w P_CF(a6) | center update ?
1172 beq dsbar0 | jump if not
1173
1174 tst.w ctrsw | update center for scupd ?
1175 beq dsexit | done if not
1176
1177dsbar0: movea.l P_SL(a6),a2 | a2 points at gdstb
1178 move.l #-1,BARFLAG(a2) | set the bar marker flag
1179 bra dsexit | done
1180
1181 .page
1182
1183| ==============================================================================
1184 .data
1185| ==============================================================================
1186
1187| sddtab -- score display dispatch table -- MUST match score.h definitions
1188| ------ ---------------------------- ------------------------------
1189sddtab: .dc.l dsexit | 0 null
1190 .dc.l dsexit | 1 score begin
1191 .dc.l dssbgn | 2 section begin
1192 .dc.l dssend | 3 section end
1193 .dc.l dsinst | 4 instrument change
1194 .dc.l dsnbx | 5 note begin
1195 .dc.l dsnex | 6 note end
1196 .dc.l dsstop | 7 stop
1197 .dc.l dsintp | 8 interpolate
1198 .dc.l dstmpo | 9 tempo
1199 .dc.l dstune | 10 tuning
1200 .dc.l dsgrp | 11 group status
1201 .dc.l dslocn_ | 12 location
1202 .dc.l dsdyn | 13 dynamics
1203 .dc.l dsanvl | 14 analog value
1204 .dc.l dsanrs | 15 analog resolution
1205 .dc.l dsasgn | 16 I/O assign
1206 .dc.l dstrns | 17 transposition
1207 .dc.l dsexit | 18 repeat
1208 .dc.l dspnch | 19 punch in/out
1209 .dc.l dsexit | 20 polyphonic pressure
1210 .dc.l dsexit | 21 score end
1211 .dc.l dsexit | 22 channel pressure
1212 .dc.l dsbar | 23 bar marker
1213 .dc.l dsnext | 24 next score
1214
1215| ==============================================================================
1216 .bss
1217| ==============================================================================
1218
1219| globals:
1220| --------
1221ac_code: .ds.b 1 | accidental code
1222
1223| locals:
1224| -------
1225numstr: .ds.b 65 | video display update work area
1226
1227| ------------------------------------------------------------------------------
1228
1229 .end
Note: See TracBrowser for help on using the repository browser.