2 ** PattEditClassAsm.asm
4 ** Copyright (C) 1995,96 Bernardo Innocenti
6 ** Pattern Editor gadget assembler subroutines
13 include libraries/SongClass.i
15 xdef _Note2ASCIIBlank0
20 * void Note2ASCIIBlank0 (UBYTE *s, struct Note *note)
23 * Fill the buffer pointed by A1 with the ASCII representation of the
24 * Note structure pointed by A2. The buffer will be able to hold at
25 * least <ped->TrackChars> characters.
32 move.b note_Note(a2),d1 ; note_Note
37 move.b note_Inst(a2),d1
38 lea HexValuesNo0(pc),a0
42 move.l d0,(a1)+ ; Put Note and Instrument high nibble
52 move.w d1,(a1)+ ; Put Instrument low nibble and white space
56 move.w #'- ',(a1)+ ; Put Instrument low nibble and white space
62 move.b note_EffNum(a2),d0
63 move.b note_EffVal(a2),d1
74 move.w d0,(a1)+ ;Put EffNum and EffVal high nibble
80 move.w d2,(a1)+ ; Put EffVal low nibble and space
88 move.l #' . ',(a1)+ ; Put white spaces
93 * void Note2ASCII (UBYTE *s, struct Note *note)
96 * Fill the buffer pointed by A1 with the ASCII representation of the
97 * Note structure pointed by A2. The buffer will be able to hold at
98 * least <ped->TrackChars> characters.
102 move.b note_Note(a2),d0 ; note_Note
108 move.l (a0,d0.w),(a1) ; Put Note
117 move.b note_Inst(a2),d0
121 lea HexValuesNo0(pc),a0
123 move.b (a0,d1),(a1)+ ; Put Instrument high nibble
127 move.b (a0,d0),(a1)+ ; Put Instrument low nibble
129 move.b #' ',(a1)+ ; Put white space
134 move.b note_EffNum(a2),d0
135 move.b note_EffVal(a2),d1
143 move.w d0,(a1)+ ;Put EffNum and EffVal high nibble
149 move.w d2,(a1)+ ; Put EffVal low nibble and space
159 dc.l 'C-0 ', 'C#0 ', 'D-0 ', 'D#0 ', 'E-0 ', 'F-0 '
160 dc.l 'F#0 ', 'G-0 ', 'G#0 ', 'A-0 ', 'A#0 ', 'B-0 '
162 dc.l 'C-1 ', 'C#1 ', 'D-1 ', 'D#1 ', 'E-1 ', 'F-1 '
163 dc.l 'F#1 ', 'G-1 ', 'G#1 ', 'A-1 ', 'A#1 ', 'B-1 '
165 dc.l 'C-2 ', 'C#2 ', 'D-2 ', 'D#2 ', 'E-2 ', 'F-2 '
166 dc.l 'F#2 ', 'G-2 ', 'G#2 ', 'A-2 ', 'A#2 ', 'B-2 '
168 dc.l 'C-3 ', 'C#3 ', 'D-3 ', 'D#3 ', 'E-3 ', 'F-3 '
169 dc.l 'F#3 ', 'G-3 ', 'G#3 ', 'A-3 ', 'A#3 ', 'B-3 '
171 dc.l 'C-4 ', 'C#4 ', 'D-4 ', 'D#4 ', 'E-4 ', 'F-4 '
172 dc.l 'F#4 ', 'G-4 ', 'G#4 ', 'A-4 ', 'A#4 ', 'B-4 '
174 dc.l 'C-5 ', 'C#5 ', 'D-5 ', 'D#5 ', 'E-5 ', 'F-5 '
175 dc.l 'F#5 ', 'G-5 ', 'G#5 ', 'A-5 ', 'A#5 ', 'B-5 '
178 dc.b '0','1','2','3','4','5','6','7','8','9'
179 dc.b 'A','B','C','D','E','F','G','H','I','J'
182 dc.b ' ','1','2','3','4','5','6','7','8','9'
183 dc.b 'A','B','C','D','E','F'