------------------------------------------------
--- $FFE0 --------------------------------------
--- continued from ROMLOW $0ffe
------------------------------------------------
0000: 34 04          PSHS        B
0002: 26 19          BNE         $001D		; VDBh: song position
0004: 20 0A          BRA         $0010		; VDBh: song select

--- via $8077, $8085, $8077
------------------------------------------------
0006: 34 01          PSHS        CC
0008: C6 02          LDB         #$02		; VDBh: sequencer start
000A: 35 01          PULS        CC		; VDBh: sequencer continue
000C: 34 04          PSHS        B		; VDBh: sequencer stop
000E: 26 0D          BNE         $001D		; b!=0 -> $801d
0010: 44             LSRA 			; /32
0011: 44             LSRA 
0012: 44             LSRA 
0013: 44             LSRA 
0014: 44             LSRA 
0015: A1 E4          CMPA        ,S
0017: 23 17          BLS         $0030
0019: A6 E4          LDA         ,S
001B: 20 13          BRA         $0030
------------------------------------------------
001D: A6 C4          LDA         ,U
001F: 84 7F          ANDA        #$7F
0021: 0D C9          TST         $C9
0023: 2B 07          BMI         $002C
0025: A1 E4          CMPA        ,S
0027: 24 0B          BCC         $0034
0029: 4C             INCA 
002A: 20 04          BRA         $0030
------------------------------------------------
002C: 4D             TSTA 
002D: 27 05          BEQ         $0034
002F: 4A             DECA 			; byte to be ORed with
0030: C6 80          LDB         #$80		; byte to be ANDed with
0032: 8D 03          BSR         $0037		; U = U & B | A
0034: 32 61          LEAS        +$01,S		; s++
0036: 39             RTS  

--- (U) = (U) & B | A
------------------------------------------------
0037: 34 04          PSHS        B		; byte to be ANDed with
0039: E6 C4          LDB         ,U		; get byte from U
003B: E4 E4          ANDB        ,S		; AND with byte from S
003D: E7 C4          STB         ,U		
003F: AA C4          ORA         ,U		; OR with A
0041: A7 C4          STA         ,U		; write back
0043: 35 84          PULS        PC,B
------------------------------------------------

--- 36 vectors referring to ROMLOW $0000
--- accessed by ROMLOW $04e0, $07bf
0045: 7B 5E	     FDB	 $7B5E
0047: 7B 92	     FDB	 $7B92
0049: 7B 65	     FDB	 $7B65
004B: 7B 60	     FDB	 $7B60
004D: 7B F7	     FDB	 $7BF7
004F: 7B BE	     FDB	 $7BBE
0051: 7C 3B	     FDB	 $7C3B
0053: 7F A8	     FDB	 $7FA8

0055: 7C 96	     FDB	 $7C96
0057: 7C C4	     FDB	 $7CC4
0059: 7C F7	     FDB	 $7CF7
005B: 7D 31	     FDB	 $7D31
005D: 7D 67	     FDB	 $7D67
005F: 7D 8A	     FDB	 $7D8A
0061: 7F CC	     FDB	 $7FCC
0063: 7D C4	     FDB	 $7DC4

0065: 7D E2	     FDB	 $7DE2
0067: 7D C4	     FDB	 $7DC4
0069: 7D E2	     FDB	 $7DE2
006B: 7E 00	     FDB	 $7E00
006D: 7E 1D	     FDB	 $7E1D
006F: 7E 3F	     FDB	 $7E3F
0071: 7E 60	     FDB	 $7E60
0073: 7E 83	     FDB	 $7E83

0075: 7F FA	     FDB	 $7FFA
0077: 80 06	     FDB	 $8006
0079: 7F 4C	     FDB	 $7F4C
007B: 7F 8A	     FDB	 $7F8A
007D: 7E FD	     FDB	 $7EFD
007F: 7F 26	     FDB	 $7F26
0081: 7E C1	     FDB	 $7EC1
0083: 7F E2	     FDB	 $7FE2

0085: 80 06	     FDB	 $8006
0087: 80 06	     FDB	 $8006
0089: 7F EE	     FDB	 $7FEE
008B: 7F C0	     FDB	 $7FC0
008D: 7D C4	     FDB	 $7DC4
008F: 7F B4	     FDB	 $7FB4
0091: 7D C4	     FDB	 $7DC4
0093: BF 0A	     FDB	 $BF0A
0095: 7C 20	     FDB	 $7C20

------------------------------------------------
--- jump to selected track menu ----------------
------------------------------------------------
0097: 96 CE          LDA         $CE		; get track menu
0099: 48             LSLA
009A: 8E 80 9F	     LDX         #$809F		; track menu address base
009D: 6E 96          JMP         [A,X]		; jump to menu handler

------------------------------------------------
--- track menu vectors -------------------------
------------------------------------------------
009F: 81 02	     FDB 	 $8102		; TRACK MIX menu
00A1: 81 AF	     FDB	 $81AF		; TRACK MIDI CHAN menu
00A3: 82 0B	     FDB	 $820B		; TRACK STATUS menu
00A5: 82 66	     FDB	 $8266		; TRACK PROG NUM menu

------------------------------------------------
00A7: 0F B0          CLR         $B0
00A9: 96 B6          LDA         $B6		; track to be modified
00AB: 27 0F          BEQ         $00BC		; track is 0 -> proceed
00AD: BE 0D 0B       LDX         $0D0B
00B0: 6D 02          TST         +$02,X
00B2: 2A 08          BPL         $00BC
00B4: 5F             CLRB 			; 
00B5: BD AB 0B       JSR         $AB0B
00B8: 96 A8          LDA         $A8		; get function code
00BA: 20 09          BRA         $00C5		; parse it

------------------------------------------------
00BC: 96 A8          LDA         $A8		; get function code

------------------------------------------------
--- function 3:	TRACK TYPE ---------------------
------------------------------------------------
00BE: 81 03          CMPA        #$03
00C0: 26 03          BNE         $00C5
00C2: 7E C2 A9       JMP         $C2A9		; TRACK TYPE menu

------------------------------------------------
--- function 4-7: TRACK menu -------------------
------------------------------------------------
00C5: 81 04          CMPA        #$04
00C7: 25 06          BCS         $00CF		; check for MAIN menu
00C9: 81 07          CMPA        #$07
00CB: 22 02          BHI         $00CF		; check for MAIN menu
00CD: 20 C8          BRA         $0097		; TRACK menu

------------------------------------------------
--- function 8: MAIN menu ---------------------- 
------------------------------------------------
00CF: 81 08          CMPA        #$08
00D1: 26 03          BNE         $00D6		; check for CONTROL menu
00D3: 7E BF AD       JMP         $BFAD		; MAIN menu

------------------------------------------------
--- function 9: CONTROL menu -------------------
------------------------------------------------
00D6: 81 09          CMPA        #$09
00D8: 26 05          BNE         $00DF
00DA: 86 14          LDA         #$14		; simulate control button
00DC: 7E 7A 53       JMP         $7A53		; CONTROL menu ($0a53)
------------------------------------------------
00DF: 39             RTS  

------------------------------------------------
--- $a8-function $04: print track volumes ------
------------------------------------------------
00E0: 96 A8          LDA         $A8		; function =
00E2: 81 04          CMPA        #$04		;   print track volumes
00E4: 26 1B          BNE         $0101		; no -> RTS
00E6: CC 81 24       LDD         #$8124		; prepare track vol. printing
00E9: 8C 02 D4       CMPX        #$02D4		; return if TDB start reached
00EC: 27 13          BEQ         $0101		;
00EE: 34 06          PSHS        B,A		; print handler to stack
00F0: 1F 13          TFR         X,U		; u points to actual TDB
00F2: 5F             CLRB 			; track = 0
00F3: 8C 02 D4       CMPX        #$02D4		; end of TDB reached?
00F6: 27 06          BEQ         $00FE		; yes -> jump
00F8: 5C             INCB 			; track++
00F9: 30 88 E5       LEAX        -$1B,X		; next track data block
00FC: 20 F5          BRA         $00F3
------------------------------------------------
00FE: 5A             DECB 			; track to pointer
00FF: 6E F1          JMP         [,S++]		; jump to track vol. printing
------------------------------------------------
0101: 39             RTS  

------------------------------------------------
--- TRACK MIX menu -----------------------------
------------------------------------------------
0102: CE F8 36       LDU         #$F836		; "TRACK MIX *MORE*"
0105: BD 99 56       JSR         $9956
0108: C6 03          LDB         #$03
010A: 10 8E F8 48    LDY         #$F848		; get display position
010E: BD 82 D7       JSR         $82D7		; print XXX to track
0111: 8E 81 6C       LDX         #$816C		; button handler $816c
0114: 86 04          LDA         #$04		
0116: C6 7E          LDB         #$7E		; max. value for volume
0118: BD 82 ED       JSR         $82ED
011B: 8E 81 24       LDX         #$8124		; prepare track vol. printing
011E: 7E 82 C1       JMP         $82C1		; print all 8 tracks

------------------------------------------------
--- print volume of track in $b6 ---------------
------------------------------------------------
0121: D6 B6          LDB         $B6		; track to display
0123: 5A             DECB 			; track number to offset

------------------------------------------------
--- print volume of track in B -----------------
------------------------------------------------
0124: 10 8E F8 48    LDY         #$F848		; track display position
0128: A6 A5          LDA         B,Y		; get track's position
012A: C6 E8          LDB         #$E8		; position cursor, print #$e8
012C: BD 99 7D       JSR         $997D		;
012F: 10 8E 0D 1C    LDY         #$0D1C
0133: A6 4C          LDA         +$0C,U		; get track volume
0135: 27 15          BEQ         $014C		; track volume 0 -> OFF
0137: 81 7F          CMPA        #$7F
0139: 23 01          BLS         $013C
013B: 39             RTS  

------------------------------------------------
--- track volume 1-63 as number to buffer ------
------------------------------------------------
013C: 44             LSRA 			; 7bit to 6bit
013D: BD BB B4       JSR         $BBB4		; a=int(b/10)
0140: 8B 30          ADDA        #$30		; a to ascii
0142: CB 30          ADDB        #$30		; b to ascii
0144: ED 21          STD         +$01,Y		; 2 numbers to buffer
0146: 86 20          LDA         #$20		; space to buffer
0148: A7 23          STA         +$03,Y		;
014A: 20 09          BRA         $0155

------------------------------------------------
--- track volume 0 as OFF to buffer ------------
------------------------------------------------
014C: CC 4F 46       LDD         #$4F46		; "OFF" to buffer		
014F: ED 21          STD         +$01,Y		;
0151: 86 46          LDA         #$46		;	
0153: A7 23          STA         +$03,Y		;
0155: A6 45          LDA         +$05,U		; track muted?
0157: 26 05          BNE         $015E		; yes -> use mute symbols
0159: CC 20 20       LDD         #$2020		; encapsulate volume within		
015C: 20 03          BRA         $0161		;   spaces

------------------------------------------------
--- encapsulate track volume within < > --------
------------------------------------------------
015E: CC 3C 3E       LDD         #$3C3E		; encapsulate volume within
0161: A7 A4          STA         ,Y		;   < >
0163: E7 24          STB         +$04,Y		;
0165: 6F 25          CLR         +$05,Y
0167: 1F 23          TFR         Y,U
0169: 7E 99 56       JMP         $9956

------------------------------------------------
--- TRACK MIX menu: softbutton 0 ---------------
------------------------------------------------
016C: C1 00          CMPB        #$00
016E: 26 01          BNE         $0171
0170: 39             RTS  

------------------------------------------------
--- TRACK MIX menu: softbutton 5 (MORE) --------
------------------------------------------------
0171: C1 05          CMPB        #$05
0173: 26 07          BNE         $017C
0175: 86 01          LDA         #$01		; track menu = MIDI channel
0177: 97 CE          STA         $CE
0179: 7E 80 97       JMP         $8097		; prepare track menu

------------------------------------------------
--- TRACK MIX menu: softbutton 6 ---------------
------------------------------------------------
017C: C1 06          CMPB        #$06		; tracks 1-4
017E: 25 05          BCS         $0185

------------------------------------------------
--- TRACK MIX menu: softbutton 9 ---------------
------------------------------------------------
0180: C1 09          CMPB        #$09		; tracks 5-8
0182: 22 01          BHI         $0185
0184: 5A             DECB 			; track no. to offset
0185: 34 04          PSHS        B		; track offset to stack
0187: CE 02 D4       LDU         #$02D4		; TDB table base
018A: 86 1B          LDA         #$1B		; table length
018C: 3D             MUL  			; get track entry from 
018D: 33 CB          LEAU        D,U		;   TDB table
018F: 35 04          PULS        B		; current track is
0191: D1 B6          CMPB        $B6		;   selected track?
0193: 26 14          BNE         $01A9		; no -> $81a9
0195: 30 45          LEAX        +$05,U		; check track-muted flag
0197: 6D 84          TST         ,X
0199: 27 04          BEQ         $019F		; track is not muted

------------------------------------------------; mute track
019B: 6F 84          CLR         ,X		
019D: 20 0D          BRA         $01AC		; prepare track menu

------------------------------------------------; unmute track
019F: 6C 84          INC         ,X
01A1: 1F 98          TFR         B,A
01A3: 4A             DECA 
01A4: BD CA 37       JSR         $CA37
01A7: 20 03          BRA         $01AC		; prepare track menu

------------------------------------------------
01A9: BD AB 0B       JSR         $AB0B
01AC: 7E 80 97       JMP         $8097		; prepare track menu

------------------------------------------------
--- TRACK MIDI CHAN menu -----------------------
------------------------------------------------
01AF: CE F8 50       LDU         #$F850		; "TRACK MIDI CHAN *MORE*"
01B2: BD 99 56       JSR         $9956
01B5: C6 02          LDB         #$02
01B7: 10 8E F8 68    LDY         #$F868		; position on display
01BB: BD 82 D7       JSR         $82D7
01BE: 8E 81 EC       LDX         #$81EC		; button handler
01C1: 86 05          LDA         #$05
01C3: C6 78          LDB         #$78
01C5: BD 82 ED       JSR         $82ED
01C8: 8E 81 D1       LDX         #$81D1		; track channels to display
01CB: 7E 82 C1       JMP         $82C1

------------------------------------------------
01CE: D6 B6          LDB         $B6
01D0: 5A             DECB 
01D1: 10 8E F8 68    LDY         #$F868		; "TRACK STATUS *MORE*"
01D5: A6 A5          LDA         B,Y
01D7: BD 99 81       JSR         $9981
01DA: 96 E2          LDA         $E2
01DC: 81 03          CMPA        #$03
01DE: 26 06          BNE         $01E6
01E0: 1F 98          TFR         B,A
01E2: 9B DE          ADDA        $DE
01E4: 20 02          BRA         $01E8
------------------------------------------------
01E6: A6 44          LDA         +$04,U
01E8: 4C             INCA 
01E9: 7E BB AB       JMP         $BBAB		; print A 

------------------------------------------------
--- TRACK MIDI chan: softbutton 0 --------------
------------------------------------------------
01EC: C1 00          CMPB        #$00
01EE: 26 01          BNE         $01F1
01F0: 39             RTS  

------------------------------------------------
--- TRACK MIDI chan: softbutton 5 (MORE) -------
------------------------------------------------
01F1: C1 05          CMPB        #$05
01F3: 26 07          BNE         $01FC
01F5: 86 02          LDA         #$02		; TRACK STATUS menu
01F7: 97 CE          STA         $CE
01F9: 7E 80 97       JMP         $8097		; jump to selected track menu

------------------------------------------------
--- TRACK MIDI chan: softbutton 6 --------------
------------------------------------------------
01FC: C1 06          CMPB        #$06		; track 1-4
01FE: 25 05          BCS         $0205

------------------------------------------------
--- TRACK MIDI chan: softbutton 9 --------------
------------------------------------------------
0200: C1 09          CMPB        #$09		; track 5-8
0202: 22 01          BHI         $0205
0204: 5A             DECB 
0205: BD AB 06       JSR         $AB06
0208: 7E 80 97       JMP         $8097		; jump to selected track menu

------------------------------------------------
--- TRACK STATUS menu --------------------------
------------------------------------------------
020B: CE F8 70       LDU         #$F870		; "TRACK STATUS *MORE*"
020E: BD 99 56       JSR         $9956
0211: C6 05          LDB         #$05
0213: 10 8E F8 85    LDY         #$F885		; track status display pos.
0217: BD 82 D7       JSR         $82D7		; print XXX to track
021A: 8E 82 47       LDX         #$8247		; button handler
021D: 86 06          LDA         #$06
021F: C6 78          LDB         #$78
0221: BD 82 ED       JSR         $82ED
0224: 8E 82 2D       LDX         #$822D		; display track status
0227: 7E 82 C1       JMP         $82C1

------------------------------------------------
--- show track status --------------------------
------------------------------------------------
022A: D6 B6          LDB         $B6		; get track number
022C: 5A             DECB 
022D: 10 8E F8 85    LDY         #$F885		; track status display pos.
0231: A6 A5          LDA         B,Y
0233: BD 99 81       JSR         $9981
0236: A6 43          LDA         +$03,U		; get track status
0238: 84 C0          ANDA        #$C0
023A: 1C FE          ANDCC       #$FE		; clear carry
023C: 49             ROLA 
023D: 49             ROLA 
023E: 49             ROLA 
023F: 8E 76 D3       LDX         #$76D3		; -SEQ-/LOCAL/MIDI/BOTH
0242: C6 05          LDB         #$05		; length 5
0244: 7E B9 71       JMP         $B971		; print

------------------------------------------------
--- TRACK STATUS menu: softbutton 0 ------------
------------------------------------------------
0247: C1 00          CMPB        #$00
0249: 26 01          BNE         $024C
024B: 39             RTS  

------------------------------------------------
--- TRACK STATUS menu: softbutton 5 ------------
------------------------------------------------
024C: C1 05          CMPB        #$05		; more
024E: 26 07          BNE         $0257
0250: 86 03          LDA         #$03		; TRACK PROGRAM NUM menu
0252: 97 CE          STA         $CE
0254: 7E 80 97       JMP         $8097		; jump to selected track menu

------------------------------------------------
--- TRACK STATUS menu: softbutton 6 ------------
------------------------------------------------
0257: C1 06          CMPB        #$06		; track 1-4
0259: 25 05          BCS         $0260

------------------------------------------------
--- TRACK STATUS menu: softbutton 9 ------------
------------------------------------------------
025B: C1 09          CMPB        #$09		; track 5-8
025D: 22 01          BHI         $0260
025F: 5A             DECB 
0260: BD AB 06       JSR         $AB06
0263: 7E 80 97       JMP         $8097		; jump to selected track menu

------------------------------------------------
--- TRACK PROG NUM menu ------------------------
------------------------------------------------
0266: CE F8 8D       LDU         #$F88D		; "TRACK PROG NUM *MORE*"
0269: BD 99 56       JSR         $9956
026C: C6 03          LDB         #$03
026E: 10 8E F8 A4    LDY         #$F8A4		; track display pos. base
0272: BD 82 D7       JSR         $82D7		; print XXX to track
0275: 8E 82 A2       LDX         #$82A2		; button handler
0278: 86 07          LDA         #$07		; items to change (?)
027A: C6 7F          LDB         #$7F		; parameter maximum (?)
027C: BD 82 ED       JSR         $82ED
027F: 8E 82 88       LDX         #$8288		; display program numbers
0282: 7E 82 C1       JMP         $82C1

------------------------------------------------
--- print XXX to track selected by $b6 ---------
--- if unused (track status pointer: U) --------
------------------------------------------------
0285: D6 B6          LDB         $B6		; track
0287: 5A             DECB 
0288: 10 8E F8 A4    LDY         #$F8A4		; get track's display position
028C: A6 A5          LDA         B,Y
028E: BD 99 81       JSR         $9981		; position cursor to track
0291: E6 42          LDB         +$02,U		; b=u+2 (u=track pointer?)
0293: C1 FF          CMPB        #$FF		; track unused?
0295: 26 06          BNE         $029D		; no -> $029d
0297: CE F8 AC       LDU         #$F8AC		; "XXX"
029A: 7E 99 56       JMP         $9956
------------------------------------------------
029D: 4F             CLRA 
029E: 5C             INCB 
029F: 7E C3 CA       JMP         $C3CA		; print result of x=int(d/100)

------------------------------------------------
--- TRACK PROGRAM menu: softbutton 0 -----------
------------------------------------------------
02A2: C1 00          CMPB        #$00
02A4: 26 01          BNE         $02A7
02A6: 39             RTS  

------------------------------------------------
--- TRACK PROGRAM menu: softbutton 5 (MORE) ----
------------------------------------------------
02A7: C1 05          CMPB        #$05
02A9: 26 07          BNE         $02B2
02AB: 86 00          LDA         #$00		; TRACK MIX menu
02AD: 97 CE          STA         $CE
02AF: 7E 80 97       JMP         $8097		; prepare track menu

------------------------------------------------
--- TRACK PROGRAM menu: softbutton 6 -----------
------------------------------------------------
02B2: C1 06          CMPB        #$06		; track 1-4
02B4: 25 05          BCS         $02BB

------------------------------------------------
--- TRACK PROGRAM menu: softbutton 9 -----------
------------------------------------------------
02B6: C1 09          CMPB        #$09		; track 4-8
02B8: 22 01          BHI         $02BB
02BA: 5A             DECB 
02BB: BD AB 06       JSR         $AB06
02BE: 7E 80 97       JMP         $8097		; prepare menu

------------------------------------------------
--- create track data table for display --------
------------------------------------------------
02C1: 5F             CLRB 			; track count
02C2: CE 02 D4       LDU         #$02D4		; track table base
02C5: 33 C8 1B       LEAU        +$1B,U		; next track table block
02C8: 34 54          PSHS        U,X,B
02CA: AD 84          JSR         ,X		; -> handler
02CC: 35 54          PULS        U,X,B
02CE: 33 C8 1B       LEAU        +$1B,U		; next track table block
02D1: 5C             INCB 			; all 8 tracks done?
02D2: C1 07          CMPB        #$07		; loop until all tracks done
02D4: 23 F2          BLS         $02C8
02D6: 39             RTS  

------------------------------------------------
--- print XXX to track specified by $b6 --------
------------------------------------------------
02D7: 96 B6          LDA         $B6		; track to be modified
02D9: 27 11          BEQ         $02EC		; none selected -> $82ec
02DB: 4A             DECA 			; get track's position on
02DC: A6 A6          LDA         A,Y		;   display
02DE: 34 04          PSHS        B
02E0: D6 CE          LDB         $CE		; if $ce<>0 then a++
02E2: C1 00          CMPB        #$00
02E4: 26 01          BNE         $02E7
02E6: 4C             INCA 
02E7: 35 04          PULS        B
02E9: BD BB DA       JSR         $BBDA		; print stuff
02EC: 39             RTS  

------------------------------------------------
--- TRACK menu ---------------------------------
--- set number of items ($a8) ------------------
--- set max. value of parameters ($c8) ---------
--- set softbutton handler ($0d11) -------------
------------------------------------------------
02ED: 97 A8          STA         $A8		; # of items to change (?)
02EF: D7 C8          STB         $C8		; parameter max. value (?)
02F1: BF 0D 11       STX         $0D11		; handler hook
02F4: BD C3 63       JSR         $C363		; print seq. mode 
02F7: 86 E8          LDA         #$E8		; print #$e8
02F9: BD 99 81       JSR         $9981		;
02FC: 7E BC AE       JMP         $BCAE		; clear $ac, $ad

------------------------------------------------
--- SWI2 ---------------------------------------
------------------------------------------------
02FF: 86 02          LDA         #$02		; SWI mode = 2
0301: 20 02          BRA         $0305

------------------------------------------------
--- SWI3 ---------------------------------------
------------------------------------------------
0303: 86 03          LDA         #$03		; SWI mode = 3
0305: B7 0B 8B       STA         $0B8B		; SWI mode
0308: 1A 50          ORCC        #$50		; disable FIRQ/IRQ

------------------------------------------------
--- RESET / SWI --------------------------------
------------------------------------------------
030A: 10 CE 0F BD    LDS         #$0FBD		; sstack = $0fbd
030E: CC 00 0E       LDD         #$000E		; A=$00, B=$0E
0311: 1F 8B          TFR         A,DP		; select zeropage
0313: B6 64 0D       LDA         $640D		; ramcard inserted?
0316: 85 04          BITA        #$04
0318: 27 0A          BEQ         $0324
031A: B6 3F FF       LDA         $3FFF		; yes, ramcard formatted?
031D: 81 55          CMPA        #$55
031F: 26 03          BNE         $0324
0321: 7E 20 00       JMP         $2000		; yes, jump to ramcard

------------------------------------------------
--- DOC master reset ---------------------------
------------------------------------------------
0324: 86 2E          LDA         #$2E		; activate 24 oscillators
0326: B7 60 E1       STA         $60E1
0329: 8E 60 00       LDX         #$6000		; reset all voices
032C: 6F 80          CLR         ,X+		
032E: 8C 60 E1       CMPX        #$60E1
0331: 26 F9          BNE         $032C
0333: BD 85 16       JSR         $8516		; init DOC
0336: BD 85 65       JSR         $8565		; init DUART
0339: 86 E7          LDA         #$E7		; transmit $E7 to panel
033B: B7 64 0B       STA         $640B
033E: 7F 64 0D       CLR         $640D		; all outputs = 1
0341: 86 AB          LDA         #$AB		; irq on input port change,
0343: B7 64 05       STA         $6405		;   rxB, counter rdy, breakA, txA
0346: 8E 0B 4F       LDX         #$0B4F		; clear $0b4f to $0b8a
0349: 6F 80          CLR         ,X+
034B: 8C 0B 8B       CMPX        #$0B8B
034E: 25 F9          BCS         $0349
0350: 8E 00 00       LDX         #$0000		; clear $0000 to $00c7
0353: 6F 80          CLR         ,X+
0355: 8C 00 C7       CMPX        #$00C7
0358: 25 F9          BCS         $0353
035A: 8E 10 0C       LDX         #$100C			
035D: 4F             CLRA 			; if $100c/d/e/f=0 then perform
035E: A1 80          CMPA        ,X+		;   ordinary reset
0360: 27 29          BEQ         $038B		;   ($838b)

------------------------------------------------
--- voice bank initialization ------------------
------------------------------------------------
0362: 8E 00 00       LDX         #$0000		; else 
0365: 6F 80          CLR         ,X+		;   clear $0000 to $100c
0367: 8C 10 0C       CMPX        #$100C
036A: 25 F9          BCS         $0365
036C: BD C4 A4       JSR         $C4A4		;   copy stuff to display buffer
036F: BD A6 63       JSR         $A663		;   select ROMLOW $3000
0372: BD 85 EF       JSR         $85EF		;   copy factory presets
0375: CC 0E 04       LDD         #$0E04		;   select ROMLOW $2000
0378: FD 64 0E       STD         $640E		;
037B: BD 7F 5E       JSR         $7F5E		;   edit buffer init (?)
037E: 8E 10 0C       LDX         #$100C		;   $100C/D/E/F = 0/1/2/3
0381: 4F             CLRA 
0382: A7 80          STA         ,X+
0384: 4C             INCA 
0385: 81 04          CMPA        #$04
0387: 26 F9          BNE         $0382
0389: 20 05          BRA         $0390		; do rest of reset routine

------------------------------------------------
--- ordinary reset -----------------------------
------------------------------------------------
038B: 4C             INCA 			; a=a+1
038C: 81 04          CMPA        #$04		; if a!=4 return
038E: 26 CE          BNE         $035E
0390: CC 0E 04       LDD         #$0E04		; select ROMLOW $2000
0393: FD 64 0E       STD         $640E		;
0396: FD 0B 8C       STD         $0B8C		; 
0399: BD 7C C3       JSR         $7CC3		; init DOSRAM, do magic ($1859)
039C: CC 0E 00       LDD         #$0E00		; select ROMLOW $0000
039F: FD 64 0E       STD         $640E		;
03A2: FD 0B 8C       STD         $0B8C		;
03A5: BD 89 B0       JSR         $89B0		; misc DUART
03A8: BD 99 4A       JSR         $994A		; $003b/$003d=$0cf7, $3f=$00
03AB: BD 99 DB       JSR         $99DB		; output S/R = $8040
03AE: BD 89 E7       JSR         $89E7		; ?
03B1: BD A6 4B       JSR         $A64B		; save D, CC, set ROMLOW $2000
03B4: BD 70 00       JSR         $7000		; floppy reset
03B7: 8E 03 C7       LDX         #$03C7		; struct ramtable
03BA: 9F 10          STX         $10
03BC: 33 08          LEAU        +$08,X		; u=[x+8]
03BE: EF 84          STU         ,X		; 
03C0: 1F 31          TFR         U,X
03C2: CC 00 00       LDD         #$0000
03C5: ED C4          STD         ,U
03C7: 8C 0B 47       CMPX        #$0B47
03CA: 26 F0          BNE         $03BC
03CC: 8E F7 5E       LDX         #$F75E		; transfer $f75e - $f77a
03CF: CE 0B 4F       LDU         #$0B4F		; jump base
03D2: 10 EE 81       LDS         ,X++		; s = [x] (destination addr)		
03D5: EC 81          LDD         ,X++		; d = [x+2] (jump addr)		 
03D7: 34 06          PSHS        B,A		; -> stack
03D9: EC 81          LDD         ,X++		; d = [x+4] (outport)
03DB: 34 06          PSHS        B,A		; -> stack
03DD: 10 EF 4D       STS         +$0D,U		; save destination addr+4
03E0: A6 80          LDA         ,X+		; a = [x+6] (step ?)
03E2: A7 43          STA         +$03,U		; save step(?)
03E4: 33 4F          LEAU        +$0F,U		; next U block		
03E6: 8C F7 7A       CMPX        #$F77A		; repeat until
03E9: 25 E7          BCS         $03D2		;   all data transferred
03EB: BD 85 65       JSR         $8565		; init DUART
03EE: BD 87 0A       JSR         $870A		; reset MRb, $14 to $873E
03F1: 20 0A          BRA         $03FD

------------------------------------------------
--- perform jump to handler routine -----------
------------------------------------------------
03F3: DE 0E          LDU         $0E		; stackpointer hook
03F5: FC 0B 8C       LDD         $0B8C		; outport config
03F8: 34 06          PSHS        B,A		;   to stack
03FA: 10 EF 4D       STS         +$0D,U		; stack address to stack+13
03FD: 1A 10          ORCC        #$10		; disable IRQ
03FF: 8E 0B 4F       LDX         #$0B4F		; jump base
0402: A6 02          LDA         +$02,X		; get step
0404: 26 18          BNE         $041E		; if step>0
0406: 10 EE 0D       LDS         +$0D,X		;   get destination address
0409: 10 AE 04       LDY         +$04,X		;   get "?"
040C: CC 00 00       LDD         #$0000
040F: ED 04          STD         +$04,X		;   clear "?"
0411: 9F 0E          STX         $0E		;   jump base as stack pointer
0413: 1C EF          ANDCC       #$EF		;   enable IRQ
0415: 35 06          PULS        B,A		;   restore ROMLOW
0417: FD 64 0E       STD         $640E
041A: FD 0B 8C       STD         $0B8C
041D: 39             RTS 			;   jump to destination address
------------------------------------------------; else
041E: 30 0F          LEAX        +$0F,X		;   get next set
0420: 8C 0B 8B       CMPX        #$0B8B		;   end of set?
0423: 25 DD          BCS         $0402		;   yes -> $0402
0425: 3C             CWAI 			; end of set: wait for IRQ	
0427: 20 D4          BRA         $03FD		

--- stack manipulation
------------------------------------------------
0429: DE 0E          LDU         $0E		; voice block hook (?)
042B: 1A 10          ORCC        #$10		; disable IRQ
042D: E6 42          LDB         +$02,U		
042F: AE 46          LDX         +$06,U		
0431: 27 11          BEQ         $0444
0433: AF 44          STX         +$04,U
0435: 10 AE 84       LDY         ,X
0438: 10 AF 46       STY         +$06,U
043B: 26 03          BNE         $0440
043D: 10 AF 48       STY         +$08,U
0440: C4 FE          ANDB        #$FE
0442: 20 02          BRA         $0446
------------------------------------------------
0444: CA 01          ORB         #$01
0446: E7 42          STB         +$02,U
0448: 7E 83 F5       JMP         $83F5		; master loop

--- prepare WAVEROM 0/1 access (?)
------------------------------------------------
044B: DE 0E          LDU         $0E		; stackpointer hook
044D: 1A 10          ORCC        #$10		; disable IRQ
044F: E6 42          LDB         +$02,U		; b = stack+2
0451: A6 4C          LDA         +$0C,U		; a = stack+12
0453: 26 04          BNE         $0459		; if a=0 then
0455: C4 FD          ANDB        #$FD		;   mask out bit 1 of B
0457: 20 02          BRA         $045B
------------------------------------------------; else
0459: CA 02          ORB         #$02		;   mask in bit 1 of B
045B: E7 42          STB         +$02,U		; stack+2 = b
045D: 7E 83 F5       JMP         $83F5		; master loop

------------------------------------------------
--- store A to [$0e]+$0c -----------------------
------------------------------------------------
0460: 34 10          PSHS        X		
0462: 9E 0E          LDX         $0E		; stackpointer hook
0464: A7 0C          STA         +$0C,X		; a to stack+12
0466: 35 90          PULS        PC,X		

------------------------------------------------
--- carry manipulation: compare $12 to #$b4 ----
------------------------------------------------
0468: 34 02          PSHS        A
046A: 96 12          LDA         $12
046C: 81 B4          CMPA        #$B4
046E: 25 05          BCS         $0475
0470: 35 02          PULS        A
0472: 1A 01          ORCC        #$01		; set carry
0474: 39             RTS  
------------------------------------------------
0475: 35 02          PULS        A
0477: 1C FE          ANDCC       #$FE		; clear carry

------------------------------------------------
--- $FFE2 --------------------------------------
--- check for set VDB handler ($10) ------------
--- process if set, else SWI -------------------
------------------------------------------------
0479: 34 13          PSHS        X,A,CC		; store X, A, CC
047B: 1A 10          ORCC        #$10		; disable IRQ
047D: 10 9E 10       LDY         $10		; get VDB handler
0480: 26 08          BNE         $048A		; handler set -> process
0482: 86 01          LDA         #$01		; else perform SWI1
0484: B7 0B 8B       STA         $0B8B		; 
0487: 7E 83 0A       JMP         $830A		; reset

------------------------------------------------
--- next VDB handler to $10 --------------------
--- zero next VDB handler in Y structure -------
--- inc. VDB counter and set new maximum value -
------------------------------------------------
048A: AE A4          LDX         ,Y		; get next VDB handler
048C: 9F 10          STX         $10		; store to $10
048E: 8E 00 00       LDX         #$0000		; zero next VDB handler
0491: AF A4          STX         ,Y		; 
0493: 0C 12          INC         $12		; inc. voice counter
0495: 96 12          LDA         $12		; if necessary, 
0497: 91 13          CMPA        $13		;   set new VDB counter max.
0499: 23 02          BLS         $049D		;
049B: 97 13          STA         $13		;
049D: 35 93          PULS        PC,X,A,CC

------------------------------------------------
--- $FFE4 --------------------------------------
--- get next VDB handler and dec. VDB counter --
------------------------------------------------
049F: 34 11          PSHS        X,CC		
04A1: 1A 10          ORCC        #$10		; disable IRQ
04A3: 9E 10          LDX         $10		; x = next VDB handler
04A5: 10 9F 10       STY         $10		; $10 = current VDB handler
04A8: AF A4          STX         ,Y		; set next VDB handler
04AA: 0A 12          DEC         $12		; dec VDB counter
04AC: 35 91          PULS        PC,X,CC

--- if $cc cleared process postcode
--- else get next VDB handler
------------------------------------------------
04AE: 34 11          PSHS        X,CC		; save X, CC
04B0: 1A 10          ORCC        #$10		; disable IRQ	
04B2: 0D CC          TST         $CC		; if $cc cleared
04B4: 27 02          BEQ         $04B8		;   process routine
04B6: 20 EB          BRA         $04A3		; else next VDB handler

--- process postcode
------------------------------------------------			
04B8: 35 11          PULS        X,CC		; restore X, CC
04BA: 34 57          PSHS        U,X,B,A,CC	; store regs (7)
04BC: 1A 10          ORCC        #$10		; disable IRQ
04BE: AE 67          LDX         +$07,S		; x=PC
04C0: EE 81          LDU         ,X++		; U = "postcode" (address)
04C2: AF 67          STX         +$07,S		; return address after postcode
04C4: AE 48          LDX         +$08,U		; get address 
04C6: 27 08          BEQ         $04D0		; if x=0 goto $84D0
04C8: 10 AF 84       STY         ,X		; (address+8)=y 
04CB: 10 AF 48       STY         +$08,U		; address+8=y
04CE: 20 15          BRA         $04E5		;		--------+
------------------------------------------------			|
04D0: A6 42          LDA         +$02,U		; a=[address+2]		|
04D2: 85 01          BITA        #$01		; bit 0 set?		|
04D4: 27 09          BEQ         $04DF		; no -> $84DF -----+	|
04D6: EC 44          LDD         +$04,U		; d=[address+4/5]  |	|
04D8: 26 05          BNE         $04DF		; <>0 -------------+	|
04DA: 10 AF 44       STY         +$04,U		; [address+4/5]=y  |	|
04DD: 20 06          BRA         $04E5		;	---------- | ---+
------------------------------------------------		   |	|
04DF: 10 AF 46       STY         +$06,U		; [address+6/7]=y <+	|
04E2: 10 AF 48       STY         +$08,U		; [address+8/9]=y	|
04E5: 8E 00 00       LDX         #$0000		; x=$0000	<-------+
04E8: AF A4          STX         ,Y		; [y]=$0000
04EA: A6 42          LDA         +$02,U		; a=[address+2]
04EC: 84 FE          ANDA        #$FE		; demask bit 0
04EE: A7 42          STA         +$02,U		; ...store back
04F0: 35 D7          PULS        PC,U,X,B,A,CC	; return to PC+2

--- process 5 sets of #$0c sized data blocks
------------------------------------------------
04F2: 8E 0B 4F       LDX         #$0B4F		; start of data block area	
04F5: A6 0C          LDA         +$0C,X
04F7: 27 0B          BEQ         $0504
04F9: 4A             DECA 
04FA: A7 0C          STA         +$0C,X
04FC: 26 06          BNE         $0504
04FE: A6 02          LDA         +$02,X
0500: 84 FD          ANDA        #$FD
0502: A7 02          STA         +$02,X
0504: 30 0F          LEAX        +$0F,X
0506: 8C 0B 8B       CMPX        #$0B8B		; loop until end of
0509: 25 EA          BCS         $04F5		;   data block area reached
050B: BE 0D EF       LDX         $0DEF		; if $0def not zero
050E: 27 05          BEQ         $0515		;   decrement $0def
0510: 30 1F          LEAX        -$01,X
0512: BF 0D EF       STX         $0DEF
0515: 39             RTS  

------------------------------------------------
--- init 5503 DOC ------------------------------
------------------------------------------------
0516: 8E 60 80       LDX         #$6080		; set all wavetable pages to
0519: 86 01          LDA         #$01		;  page $01
051B: A7 80          STA         ,X+
051D: 8C 60 A0       CMPX        #$60A0		
0520: 26 F7          BNE         $0519
0522: 8E 60 A0       LDX         #$60A0		; halt all oscillators, 
0525: 86 01          LDA         #$01		;   no IRQ
0527: A7 80          STA         ,X+
0529: 8C 60 C0       CMPX        #$60C0
052C: 26 F7          BNE         $0525
052E: C6 20          LDB         #$20	
0530: B6 60 E0       LDA         $60E0		; clear interrupt register
0533: 10 8E 00 31    LDY         #$0031		; wait for DOC ready
0537: 31 3F          LEAY        -$01,Y
0539: 5A             DECB 
053A: 26 FB          BNE         $0537
053C: 39             RTS  

------------------------------------------------
--- IRQ ----------------------------------------
------------------------------------------------
053D: B6 64 05       LDA         $6405		; get IRQ flags
0540: 85 07          BITA        #$07		; serial port A? (MIDI)
0542: 27 03          BEQ         $0547		
0544: 7E 8C 2F       JMP         $8C2F		; port A IRQ handling
------------------------------------------------
0547: 85 08          BITA        #$08		; counter ready?
0549: 27 03          BEQ         $054E
054B: 7E 99 E6       JMP         $99E6		; counter IRQ handling
------------------------------------------------
054E: 85 80          BITA        #$80		; inport change? (RAMcard?)
0550: 27 03          BEQ         $0555
0552: 7E 9A 3E       JMP         $9A3E		; inport change IRQ handling
------------------------------------------------
0555: 85 20          BITA        #$20		; port B rx IRQ? (Panel)
0557: 27 03          BEQ         $055C
0559: 7E 87 2B       JMP         $872B		; port B rx IRQ handler
------------------------------------------------
055C: 85 10          BITA        #$10		; port B txrdy IRQ? (Panel)
055E: 27 03          BEQ         $0563
0560: 7E 99 B5       JMP         $99B5		; port B txrdy IRQ handler
------------------------------------------------
0563: 11 3F          SWI3 			; spurious interrupt

------------------------------------------------
--- init DUART ---------------------------------
------------------------------------------------
0565: 0F FB          CLR         $FB		; $00fa = $0000
0567: 0F FA          CLR         $FA
0569: CC 07 D0       LDD         #$07D0		; timerA = $d007
056C: FD 64 06       STD         $6406
056F: 86 60          LDA         #$60		; baud rate 2, 
0571: B7 64 04       STA         $6404		;   clocked by xtal
0574: 86 20          LDA         #$20		; reset receiver
0576: B7 64 0A       STA         $640A
0579: 86 30          LDA         #$30		; reset transmitter
057B: B7 64 0A       STA         $640A
057E: 86 10          LDA         #$10		; mr pointer = mr1
0580: B7 64 0A       STA         $640A
0583: 86 13          LDA         #$13		; select 8n2
0585: B7 64 08       STA         $6408
0588: C6 0F          LDB         #$0F
058A: F7 64 08       STB         $6408
058D: 86 EE          LDA         #$EE		; rx/tx clock = IP6/5-16x
058F: B7 64 09       STA         $6409
0592: 86 05          LDA         #$05		; enable rx/tx
0594: B7 64 0A       STA         $640A
0597: 10 8E 00 00    LDY         #$0000		; delay loop
059B: 31 3F          LEAY        -$01,Y
059D: 26 FC          BNE         $059B
059F: 39             RTS  

------------------------------------------------
--- restore outport configuration --------------
------------------------------------------------
05A0: FC 0B 8C       LDD         $0B8C		; outport storage
05A3: FD 64 0E       STD         $640E
05A6: 39             RTS  

------------------------------------------------
--- jump to ROMLOW $2b2b -----------------------
------------------------------------------------
05A7: 34 06          PSHS        B,A
05A9: CC 7B 2B       LDD         #$7B2B		; ROMLOW $2b2b
05AC: 34 06          PSHS        B,A
05AE: CC 0E 04       LDD         #$0E04		; ROMLOW $2000
05B1: 8D 01          BSR         $05B4
05B3: 39             RTS  

------------------------------------------------
--- do indirect jump within ROMLOW -------------
--- input:  D     romlow-bank
---	    [S]   jumpto address 2
---	    [S-2] jumpto address 1
---	    [S-4] parameter
--- output: D    
------------------------------------------------
05B4: FD 64 0E       STD         $640E		; set ROMLOW
05B7: FD 0B 8E       STD         $0B8E
05BA: 35 06          PULS        B,A		; get jumpto address 2
05BC: FD 0B 90       STD         $0B90
05BF: 35 06          PULS        B,A		; get jumpto address 1
05C1: FD 0B 92       STD         $0B92
05C4: 35 06          PULS        B,A		; get parameter
05C6: FD 0B 94       STD         $0B94
05C9: FC 0B 90       LDD         $0B90		; jumpto address to stack
05CC: 34 06          PSHS        B,A
05CE: FC 0B 8C       LDD         $0B8C		; old ROMLOW to stack
05D1: 34 06          PSHS        B,A
05D3: FC 0B 8E       LDD         $0B8E		; old ROMLOW = new ROMLOW
05D6: FD 0B 8C       STD         $0B8C
05D9: FC 0B 94       LDD         $0B94		; get parameter 
05DC: AD 9F 0B 92    JSR         [$0B92]	; jsr to #1
05E0: FD 0B 94       STD         $0B94		; save parameter
05E3: 35 06          PULS        B,A		; restore old ROMLOW
05E5: FD 64 0E       STD         $640E
05E8: FD 0B 8C       STD         $0B8C
05EB: FC 0B 94       LDD         $0B94		; restore parameter
05EE: 39             RTS  

------------------------------------------------
--- copy factory presets -----------------------
------------------------------------------------
05EF: BD EB 2B       JSR         $EB2B		; check for ramcard
05F2: CE 10 10       LDU         #$1010		; copy factory presets to
05F5: 8E 70 00       LDX         #$7000		;   $1010
05F8: A6 80          LDA         ,X+
05FA: A7 C0          STA         ,U+
05FC: 8C 7F F0       CMPX        #$7FF0
05FF: 25 F7          BCS         $05F8
0601: 39             RTS  

------------------------------------------------
--- master init --------------------------------
------------------------------------------------
0602: 34 06          PSHS        B,A
0604: 86 1E          LDA         #$1E
0606: BD 84 60       JSR         $8460		; store $1E to stack+12
0609: BD 84 4B       JSR         $844B		; stack magic
060C: 35 06          PULS        B,A		
060E: 34 06          PSHS        B,A
0610: 1F A8          TFR         CC,A		; rescue CC
0612: 1A 50          ORCC        #$50		; disable FIRQ/IRQ
0614: 7F 64 05       CLR         $6405		; disable all DUART IRQ
0617: B7 0B 96       STA         $0B96		; store CC
061A: BD 85 16       JSR         $8516		; init DOC
061D: BD BB E5       JSR         $BBE5		; clear $a2/$a3
0620: BD D8 99       JSR         $D899
0623: 8D 11          BSR         $0636		; reset & disable MIDI
0625: 8D 31          BSR         $0658		; reset & disable panel
0627: 34 06          PSHS        B,A
0629: CC 78 59       LDD         #$7859		; jump to ROMLOW $1859
062C: 34 06          PSHS        B,A		;
062E: CC 0E 02       LDD         #$0E02		;
0631: BD 85 B4       JSR         $85B4		;
0634: 35 86          PULS        PC,B,A


------------------------------------------------
--- Reset & Disable RX/TX Port A ---------------
------------------------------------------------
0636: F6 64 03       LDB         $6403		; rxA -> B
0639: 86 40          LDA         #$40		; reset error status A
063B: B7 64 02       STA         $6402
063E: 86 50          LDA         #$50		; rst break change i.rupt A
0640: B7 64 02       STA         $6402
0643: 86 20          LDA         #$20		; reset receiver A
0645: B7 64 02       STA         $6402
0648: 86 02          LDA         #$02		; disable receiver A
064A: B7 64 02       STA         $6402
064D: 86 30          LDA         #$30		; reset transmitter A
064F: B7 64 02       STA         $6402
0652: 86 08          LDA         #$08		; disable transmitter A
0654: B7 64 02       STA         $6402
0657: 39             RTS  

------------------------------------------------
--- Reset & Disable RX/TX Port B ---------------
------------------------------------------------
0658: F6 64 0B       LDB         $640B		; data B -> B
065B: 86 40          LDA         #$40		; reset error status B
065D: B7 64 0A       STA         $640A	
0660: 86 50          LDA         #$50		; rst break change i.rupt B
0662: B7 64 0A       STA         $640A
0665: 86 20          LDA         #$20		; reset receiver B
0667: B7 64 0A       STA         $640A
066A: 86 02          LDA         #$02		; disable receiver B
066C: B7 64 0A       STA         $640A
066F: 86 30          LDA         #$30		; reset transmitter B
0671: B7 64 0A       STA         $640A
0674: 86 08          LDA         #$08		; disable transmitter B
0676: B7 64 0A       STA         $640A
0679: 86 04          LDA         #$04		; enable transmitter A
067B: B7 64 0A       STA         $640A
067E: BD 87 02       JSR         $8702		; get status B, wait for rdy
0681: C6 FF          LDB         #$FF
0683: 8D 6C          BSR         $06F1		; enable transmitter B
0685: 86 08          LDA         #$08		; disable transmitter A
0687: B7 64 0A       STA         $640A
068A: 10 8E 05 DC    LDY         #$05DC
068E: 31 3F          LEAY        -$01,Y
0690: 26 FC          BNE         $068E
0692: 39             RTS  

--- jump to $2cc3
--- init DUART
--- panel IRQ to $873e
------------------------------------------------
0693: 34 06          PSHS        B,A		
0695: 1A 50          ORCC        #$50		; disable FIRQ/IRQ
0697: 34 06          PSHS        B,A
0699: CC 7C C3       LDD         #$7CC3		; jump to ROMLOW $2CC3
069C: 34 06          PSHS        B,A		; 
069E: CC 0E 04       LDD         #$0E04		; 
06A1: BD 85 B4       JSR         $85B4		;
06A4: 8D 90          BSR         $8636		; reset & disable MIDI
06A6: BD 85 65       JSR         $8565		; init DUART
06A9: BD 89 B0       JSR         $89B0		; init MIDI
06AC: BD 87 0A       JSR         $870A		; reset panel, pIRQ to $873E
06AF: 86 09          LDA         #$09		; disable txA, enable rxA 
06B1: B7 64 02       STA         $6402		;
06B4: 86 05          LDA         #$05		; enable rx/tx B
06B6: B7 64 0A       STA         $640A		;
06B9: B6 0B 96       LDA         $0B96
06BC: 34 02          PSHS        A
06BE: BD 85 A0       JSR         $85A0		; $0b8c/d -> outport
06C1: 86 AB          LDA         #$AB		; IRQ on inport change,
06C3: B7 64 05       STA         $6405		; rxrdy/ffullAB, txrdy A 
06C6: 35 87          PULS        PC,B,A,CC	; counter ready

------------------------------------------------
--- send $FCF0 to panel ------------------------
------------------------------------------------
06C8: C6 F0          LDB         #$F0
06CA: 8D 25          BSR         $06F1		; enable txB, send #$FCF0
06CC: 86 08          LDA         #$08		; disable txB
06CE: B7 64 0A       STA         $640A
06D1: 39             RTS  

------------------------------------------------
--- reset display ------------------------------
------------------------------------------------
06D2: BD 86 02       JSR         $8602		; master init
06D5: C6 FD          LDB         #$FD
06D7: 8D 18          BSR         $06F1
06D9: 86 09          LDA         #$09		; disable txB, enable rxB
06DB: B7 64 0A       STA         $640A
06DE: B6 64 09       LDA         $6409		; wait for rxrdy
06E1: 85 01          BITA        #$01		; 
06E3: 27 F9          BEQ         $06DE		;
06E5: F6 64 0B       LDB         $640B		; get data B
06E8: BD 87 14       JSR         $8714		; S/R to xx01->0101
06EB: C1 C0          CMPB        #$C0		; repeat if B < 192
06ED: 25 EF          BCS         $06DE
06EF: 20 A2          BRA         $0693		; initialization post proc.

------------------------------------------------
--- enable transmitter B, send #$FB(B), wait for answer
------------------------------------------------
06F1: 86 04          LDA         #$04		; enable transmitter B
06F3: B7 64 0A       STA         $640A
06F6: 8D 0A          BSR         $0702		; wait for receiver B ready
06F8: 86 FB          LDA         #$FB		; transmit #$FB
06FA: B7 64 0B       STA         $640B
06FD: 8D 03          BSR         $0702		; wait for receiver B ready
06FF: F7 64 0B       STB         $640B		
0702: B6 64 09       LDA         $6409		; get status B
0705: 84 04          ANDA        #$04		; receiver ready?
0707: 27 F9          BEQ         $0702		; no -> wait
0709: 39             RTS  			; yes -> return

--- send #$fcf0 to panel, panel IRQ to $873e
------------------------------------------------
070A: BD 86 C8       JSR         $86C8		; #$fcf0 to panel
070D: CC 87 3E       LDD         #$873E		; prepare jump to $873E
0710: DD 14          STD         $14
0712: 20 0C          BRA         $0720

------------------------------------------------
--- outport sequence xx01->0101 ----------------
------------------------------------------------
0714: 86 01          LDA         #$01		; reset bit 0 of outport
0716: B7 64 0F       STA         $640F
0719: B7 64 0E       STA         $640E		; set bit 0 of outport
071C: B7 64 0F       STA         $640F		; reset bit 0 of outport
071F: 39             RTS  

------------------------------------------------
--- clear panel communication buffer -----------
------------------------------------------------
0720: 8E 0B 97       LDX         #$0B97		; clear $0b97 to $0b9e
0723: 6F 80          CLR         ,X+
0725: 8C 0B 9F       CMPX        #$0B9F
0728: 26 F9          BNE         $0723
072A: 39             RTS  

------------------------------------------------
--- port B (Panel) receive interrupt -----------
------------------------------------------------
072B: B6 64 09       LDA         $6409		; status B
072E: 85 F0          BITA        #$F0		; error occured?
0730: 27 02          BEQ         $0734		; no
0732: 11 3F          SWI3 			; yes -> swi3
------------------------------------------------	
0734: F6 64 0B       LDB         $640B		; get data B
0737: AD 9F 00 14    JSR         [$0014]	; rx interrupt
073B: 8D D7          BSR         $0714		; outport to $0101
073D: 3B             RTI  			; return from interrupt

------------------------------------------------
--- panel receive interrupt --------------------
------------------------------------------------
073E: C1 C8          CMPB        #$C8		; got keyb. proc. error #1
0740: 27 04          BEQ         $0746		;  
0742: C1 C7          CMPB        #$C7		; got keyb. proc. error #2
0744: 26 16          BNE         $075C		;  
0746: C4 01          ANDB        #$01		; get error number
0748: 27 02          BEQ         $074C		; error 2 -> don't change pIRQh
074A: 8D 14          BSR         $0760		; error 1 -> set pIRQh to $8766
074C: 8E 70 D6       LDX         #$70D6		; keyboard proc. error handler
074F: BD 84 79       JSR         $8479		; [$FFE2]
0752: E7 24          STB         +$04,Y		; error number
0754: AF 22          STX         +$02,Y		; VDB handler to $70d6
0756: BD 84 AE       JSR         $84AE		: process $0b4f
0759: 0B 4F          fdb 	 $0B4F		; address for U pointer
075B: 39             RTS  

------------------------------------------------
--- panel IRQ: $ff received -> pIRQh = $8766 ---
------------------------------------------------
075C: C1 FF          CMPB        #$FF		; $ff not received -> return
075E: 26 05          BNE         $0765
0760: 8E 87 66       LDX         #$8766		; panel IRQ vector to $8766
0763: 9F 14          STX         $14
0765: 39             RTS  

------------------------------------------------
--- panel IRQ: 2nd part ------------------------
------------------------------------------------
0766: 2A 14          BPL         $077C		; received data <$80
0768: C1 C0          CMPB        #$C0		; received data $80-$bf
076A: 25 0B          BCS         $0777
076C: C1 FC          CMPB        #$FC		; received #$fc
076E: 27 02          BEQ         $0772
0770: 10 3F          SWI2 

------------------------------------------------
--- panel IRQ: $fc received -> pIRQh = $878f ---
------------------------------------------------
0772: 8E 87 8F       LDX         #$878F		; panel IRQ handler to $878f
0775: 20 03          BRA         $077A

------------------------------------------------
--- panel IRQ: $80-$bf received -> pIRQh = $8898 
------------------------------------------------
0777: 8E 88 98       LDX         #$8898		; panel IRQ handler to $8898
077A: 20 0C          BRA         $0788

------------------------------------------------
--- panel IRQ: $00-$7f received ----------------
------------------------------------------------
077C: C1 40          CMPB        #$40		; $00-$3f received
077E: 25 05          BCS         $0785		;   -> panel IRQ h. to $87fa
0780: 8E 87 98       LDX         #$8798		; $40-$7f received
0783: 20 03          BRA         $0788		;   -> panel IRQ h. to $8798

------------------------------------------------
--- panel IRQ: $00-$3f received -> pIRQh = $878f 
------------------------------------------------
0785: 8E 87 FA       LDX         #$87FA		; panel IRQ handler to $87fa
0788: C4 3F          ANDB        #$3F		; limit b to 0-63
078A: D7 16          STB         $16		; store b
078C: 9F 14          STX         $14		; prepare jump to $87FA
078E: 39             RTS  

------------------------------------------------
--- panel IRQ: received $fc <data> -------------
------------------------------------------------
078F: 8E 87 66       LDX         #$8766		; panel IRQ handler to $8766
0792: 9F 14          STX         $14		;
0794: F7 0B 9F       STB         $0B9F		; store data
0797: 39             RTS  

------------------------------------------------
--- panel IRQ: received <cmd> <data> -----------
---            $40 <= cmd <= $7f ---------------
------------------------------------------------
0798: 8E 87 66       LDX         #$8766		; panel IRQ handler to $8766
079B: 9F 14          STX         $14
079D: 0D CC          TST         $CC		; process only if $cc cleared
079F: 27 01          BEQ         $07A2		;
07A1: 39             RTS  			;
------------------------------------------------
07A2: 9E C1          LDX         $C1
07A4: 96 16          LDA         $16		; increase received byte 
07A6: 8B 24          ADDA        #$24		;   by 36
07A8: 97 16          STA         $16
07AA: 81 61          CMPA        #$61		; a<97: polyphonic aftertouch
07AC: 25 05          BCS         $07B3		; a>96: channel aftertouch
07AE: BD 8A E8       JSR         $8AE8		; send channel aftertouch
07B1: 20 03          BRA         $07B6
------------------------------------------------
07B3: BD 8B DA       JSR         $8BDA		; send polyphonic aftertouch
07B6: 34 06          PSHS        B,A
07B8: 81 61          CMPA        #$61		; if a>96 (channel AT)
07BA: 25 02          BCS         $07BE		;   set bit 7
07BC: 8A 80          ORA         #$80		;   of accu a
07BE: BD 84 68       JSR         $8468		; $12 checking:
07C1: 25 19          BCS         $07DC		;   $12 > 180 ($b4)
07C3: AF 24          STX         +$04,Y		; content of $c1
07C5: ED 26          STD         +$06,Y		; byte1+$24, byte2
07C7: CC 7C 65       LDD         #$7C65		; handler to $2c65
07CA: ED 22          STD         +$02,Y		; 
07CC: 86 40          LDA         #$40
07CE: A4 03          ANDA        +$03,X
07D0: 27 07          BEQ         $07D9
07D2: BD 84 AE       JSR         $84AE
07D5: 0B 5E	     fdb	 $0B5E		; U pointer to $0b5e
07D7: 20 03          BRA         $07DC
------------------------------------------------
07D9: BD 84 9F       JSR         $849F		; next VDB handler
07DC: 35 06          PULS        B,A
07DE: BD 84 68       JSR         $8468		; $12>#$b3 -> RTS
07E1: 25 16          BCS         $07F9
07E3: 81 61          CMPA        #$61		; polyphonic aftertouch
07E5: 25 04          BCS         $07EB
07E7: 86 05          LDA         #$05		; a = 5
07E9: 20 02          BRA         $07ED
------------------------------------------------
07EB: 8A 80          ORA         #$80		; set bit 7
07ED: ED 24          STD         +$04,Y
07EF: CE 00 14       LDU         #$0014		; VDB handler to $0014
07F2: EF 22          STU         +$02,Y		;
07F4: BD 84 AE       JSR         $84AE
07F7: 0B 6D	     fdb	 $0B6D		; U pointer to $0b6d
07F9: 39             RTS

------------------------------------------------
--- panel IRQ: received <cmd> <data> -----------
---            $00 <= cmd <= $3f ---------------
------------------------------------------------
07FA: CE 87 66       LDU         #$8766		; pIRQh to $8766
07FD: DF 14          STU         $14		;
07FF: C1 00          CMPB        #$00
0801: 26 39          BNE         $083C
------------------------------------------------; received $ff cmd $00
0803: 96 16          LDA         $16		; previously received byte
0805: 81 00          CMPA        #$00
0807: 26 1C          BNE         $0825		
0809: 9E C1          LDX         $C1
080B: 6F 07          CLR         +$07,X
080D: 5F             CLRB 
080E: 8D 76          BSR         $0886
0810: BD 84 79       JSR         $8479
0813: AF 24          STX         +$04,Y
0815: CC 7B 62       LDD         #$7B62		; VDB handler +$02,Y to $2b62
0818: ED 22          STD         +$02,Y		;
081A: BD 84 AE       JSR         $84AE
081D: 0B 5E	     fdb	 $0B5E		; U pointer = $0b5e
081F: 86 01          LDA         #$01
0821: 5F             CLRB 
0822: 7E 8B B8       JMP         $8BB8
------------------------------------------------
0825: 81 01          CMPA        #$01
0827: 26 01          BNE         $082A
0829: 39             RTS  
------------------------------------------------
082A: BD 84 79       JSR         $8479
082D: 80 02          SUBA        #$02
082F: A7 24          STA         +$04,Y
0831: CC 73 8B       LDD         #$738B		; VDB handler +$02,Y to $238b
0834: ED 22          STD         +$02,Y		;
0836: BD 84 AE       JSR         $84AE
0839: 0B 4F	     fdb	 $0B4F		; U pointer = $0b4f
083B: 39             RTS  

------------------------------------------------; received $ff cmd $xx
083C: 0D CC          TST         $CC		; keyboard on?
083E: 27 01          BEQ         $0841
0840: 39             RTS  
------------------------------------------------
0841: 9E C1          LDX         $C1
0843: 96 16          LDA         $16		; increase received byte
0845: 8B 24          ADDA        #$24		;   by 36
0847: 97 16          STA         $16
0849: BD 8B 7A       JSR         $8B7A		; note on (2)
084C: BD 84 79       JSR         $8479
084F: ED 24          STD         +$04,Y
0851: CE 00 12       LDU         #$0012		; VDB handler to $0012
0854: EF 22          STU         +$02,Y		;
0856: BD 84 AE       JSR         $84AE
0859: 0B 6D	     fdb	 $0B6D		; U pointer = $0b6d
0A5B: BD 84 79 	     JSR	 $8479
085E: ED 26          STD         +$06,Y
0860: DC C1          LDD         $C1
0862: ED 24          STD         +$04,Y
0864: CC 7A E1       LDD         #$7AE1		; VDB handler to ROMLOW $2ae1
0867: ED 22          STD         +$02,Y		;
0869: BD 84 AE       JSR         $84AE
086C: 0B 5E          fdb	 $0B5E		; U pointer = $0b5e
086E: D6 16          LDB         $16
0870: C0 24          SUBB        #$24
0872: CE 0B 97       LDU         #$0B97		; U pointer = $0b97
0875: 1F 98          TFR         B,A
0877: 44             LSRA 
0878: 44             LSRA 
0879: 44             LSRA 
087A: C4 07          ANDB        #$07		; limit b to 0-7
087C: 8E 89 A8       LDX         #$89A8		; offset table
087F: E6 85          LDB         B,X		; get value from table
0881: E4 C6          ANDB        A,U
0883: E7 C6          STB         A,U
0885: 39             RTS  

------------------------------------------------
0886: BD 84 79       JSR         $8479
0889: CE 00 14       LDU         #$0014		; VDB handler +$02,Y to $0014
088C: EF 22          STU         +$02,Y		; 
088E: 86 01          LDA         #$01
0890: ED 24          STD         +$04,Y
0892: BD 84 AE       JSR         $84AE
0895: 0B 6D	     fdb	 $0B6D		; U pointer = $0b6d
0897: 39             RTS

------------------------------------------------
--- $80-$bf received (2) -> pIRQh = $8766 ------
------------------------------------------------
0898: CE 87 66       LDU         #$8766		; panel IRQ handler to $8766
089B: DF 14          STU         $14		;
089D: C1 00          CMPB        #$00
089F: 26 30          BNE         $08D1
08A1: 96 16          LDA         $16
08A3: 81 00          CMPA        #$00
08A5: 26 0F          BNE         $08B6
08A7: 9E C1          LDX         $C1
08A9: C6 7F          LDB         #$7F
08AB: E7 07          STB         +$07,X
08AD: 8D D7          BSR         $0886	
08AF: 86 01          LDA         #$01
08B1: BD 8B B8       JSR         $8BB8		; send controller in B / $e0
08B4: 20 1A          BRA         $08D0
------------------------------------------------
08B6: 81 01          CMPA        #$01
08B8: 26 05          BNE         $08BF
08BA: BD DC A5       JSR         $DCA5
08BD: 20 11          BRA         $08D0
------------------------------------------------
08BF: BD 84 79       JSR         $8479
08C2: 80 02          SUBA        #$02
08C4: A7 24          STA         +$04,Y
08C6: CC 71 34       LDD         #$7134		; VDB handler to ROMLOW $2134
08C9: ED 22          STD         +$02,Y		;
08CB: BD 84 BA       JSR         $84BA
08CE: 0B             FDB	 $0B4F		; U pointer to $0b4f
08D0: 39             RTS  

------------------------------------------------
08D1: 0D CC          TST         $CC		; keyboard processing ok?
08D3: 27 01          BEQ         $08D6
08D5: 39             RTS  
------------------------------------------------
08D6: 9E C1          LDX         $C1
08D8: 96 16          LDA         $16
08DA: 8B 24          ADDA        #$24
08DC: 97 16          STA         $16
08DE: BD 8B 53       JSR         $8B53		; note off (2)
08E1: BD 84 79       JSR         $8479
08E4: ED 24          STD         +$04,Y
08E6: CE 00 10       LDU         #$0010		; VDB handler to $0010
08E9: EF 22          STU         +$02,Y		;
08EB: BD 84 AE       JSR         $84AE
08EE: 0B 6D	     fdb	 $0B6D
08F0: BD 84 79       JSR	 $8479
08F3: ED 26          STD         +$06,Y
08F5: 9E C1          LDX         $C1
08F7: AF 24          STX         +$04,Y
08F9: CC 7A 52       LDD         #$7A52		; VDB handler to $2a52
08FC: ED 22          STD         +$02,Y		;
08FE: 86 40          LDA         #$40
0900: A4 03          ANDA        +$03,X
0902: 27 07          BEQ         $090B
0904: BD 84 AE       JSR         $84AE
0907: 0B 5E	     fdb	 $0B5E
0909: 20 03          BRA         $090E
------------------------------------------------
090B: BD 84 9F       JSR         $849F
090E: D6 16          LDB         $16
0910: 96 A9          LDA         $A9
0912: 81 06          CMPA        #$06
0914: 26 17          BNE         $092D
0916: BD 84 79       JSR         $8479
0919: E7 24          STB         +$04,Y
091B: 8E 74 5F       LDX         #$745F		; VDB handler to $245f
091E: AF 22          STX         +$02,Y		;
0920: BD 84 AE       JSR         $84AE
0923: 0B 4F          fdb	 $0B4F		; U pointer to $0b4f
0925: 86 07          LDA         #$07		; number of tracks
0927: 8E 02 D4       LDX         #$02D4		; track table base
092A: BD 8B B8       JSR         $8BB8		; send controller in B / $e0
092D: C0 24          SUBB        #$24
092F: CE 0B 97       LDU         #$0B97
0932: 1F 98          TFR         B,A
0934: 44             LSRA 
0935: 44             LSRA 
0936: 44             LSRA 

------------------------------------------------
--- merge value referring to B from $89a0 to A,U
------------------------------------------------
0937: C4 07          ANDB        #$07		; limit to max. tracks
0939: 8E 89 A0       LDX         #$89A0		; table at $89a0
093C: E6 85          LDB         B,X
093E: EA C6          ORB         A,U
0940: E7 C6          STB         A,U
0942: 39             RTS  

------------------------------------------------
0943: 34 10          PSHS        X
0945: CE 0B 97       LDU         #$0B97		; panel comm. buffer
0948: 5F             CLRB 			; for b=0 to 64 step 8
0949: A6 C0          LDA         ,U+
094B: 27 02          BEQ         $094F
094D: 8D 17          BSR         $0966
094F: CB 08          ADDB        #$08		; 
0951: C1 40          CMPB        #$40		; 
0953: 26 F4          BNE         $0949		; end for
0955: BD 87 20       JSR         $8720		; clear panel comm. buffer
0958: 96 E5          LDA         $E5
095A: 2A 05          BPL         $0961
095C: 9E C1          LDX         $C1
095E: BD E4 89       JSR         $E489
0961: EC E1          LDD         ,S++
0963: DD C1          STD         $C1
0965: 39             RTS  

------------------------------------------------
0966: 34 06          PSHS        B,A
0968: 6F E2          CLR         ,-S
096A: 67 61          ASR         +$01,S
096C: 24 26          BCC         $0994
096E: 86 24          LDA         #$24
0970: AB 62          ADDA        +$02,S
0972: AB E4          ADDA        ,S
0974: 34 02          PSHS        A
0976: 9E C1          LDX         $C1
0978: C6 40          LDB         #$40
097A: BD 8B 77       JSR         $8B77		; note on (2)
097D: BD 84 79       JSR         $8479
0980: 35 02          PULS        A
0982: C6 40          LDB         #$40
0984: ED 26          STD         +$06,Y
0986: DC C1          LDD         $C1
0988: ED 24          STD         +$04,Y
098A: CC 7A E1       LDD         #$7AE1		; VDB handler to ROMLOW $2ae1
098D: ED 22          STD         +$02,Y		;
098F: BD 84 AE       JSR         $84AE
0992: 0B 5E	     fdb	 $0B5E		; U pointer to $0b5e
0994: 6C E4          INC         ,S
0996: A6 E4          LDA         ,S
0998: 81 08          CMPA        #$08
099A: 26 CE          BNE         $096A
099C: 32 61          LEAS        +$01,S
099E: 35 86          PULS        PC,B,A
------------------------------------------------

--- 00000001 00000010 00000100 00001000
--- 00010000 00100000 01000000 10000000
09A0: 01 02 04 08 10 20 40 80				..... @.

--- 11111110 11111101 11111011 11110111
--- 11101111 11011111 10111111 01111111
09A8: FE FD FB F7 EF DF BF 7F				........

------------------------------------------------
--- reset & initialize MIDI interface ----------
------------------------------------------------
09B0: 7F 00 CC       CLR         $00CC		; MIDI receive mode       
09B3: 7F 0B A2       CLR         $0BA2
09B6: 7F 0B A5       CLR         $0BA5
09B9: BD 86 36       JSR         $8636		; reset & disable MIDI
09BC: 86 10          LDA         #$10		; reset MR pointer
09BE: B7 64 02       STA         $6402
09C1: 86 13          LDA         #$13		; A: force odd parity, 8bit
09C3: B7 64 00       STA         $6400
09C6: C6 07          LDB         #$07		; A: 1 stop bit
09C8: F7 64 00       STB         $6400
09CB: 86 EE          LDA         #$EE		; A clk: inport 4 x 16
09CD: B7 64 01       STA         $6401
09D0: 86 01          LDA         #$01		; enable Rx
09D2: B7 64 02       STA         $6402
09D5: CC 8C 76       LDD         #$8C76		; MIDI tx handler to
09D8: DD 25          STD         $25		;   $8c76
09DA: CC 8D 47       LDD         #$8D47		; MIDI rx handler to
09DD: DD 1C          STD         $1C		;   $8d47
09DF: CC 0B A6       LDD         #$0BA6		; MIDI tx buffer to
09E2: DD 18          STD         $18		;   $0ba6
09E4: DD 1A          STD         $1A		; "not sent" ptr to buffer
09E6: 39             RTS  
------------------------------------------------

09E7: CE 0B C6       LDU         #$0BC6		; clear MIDI receive buffer
09EA: 6F C0          CLR         ,U+		; 
09EC: 11 83 0B E6    CMPU        #$0BE6		; 
09F0: 26 F8          BNE         $09EA		;
09F2: 96 E2          LDA         $E2		
09F4: 81 03          CMPA        #$03
09F6: 27 24          BEQ         $0A1C
09F8: 8E 03 AC       LDX         #$03AC		; track data block table end
09FB: CE 0B C6       LDU         #$0BC6		; MIDI receive buffer base
09FE: E6 04          LDB         +$04,X
0A00: 58             LSLB 
0A01: A6 03          LDA         +$03,X
0A03: 84 C0          ANDA        #$C0
0A05: 2E 06          BGT         $0A0D
0A07: A6 02          LDA         +$02,XA
0A09: 2B 02          BMI         $0A0D
0A0B: AF C5          STX         B,U
0A0D: 30 88 E5       LEAX        -$1B,X		; next track data block
0A10: 8C 02 D4       CMPX        #$02D4		; loop until all track data
0A13: 26 E9          BNE         $09FE		;   blocks processed
0A15: D6 DE          LDB         $DE
0A17: 58             LSLB 
0A18: AF C5          STX         B,U
0A1A: 20 35          BRA         $0A51
------------------------------------------------
0A1C: CE 0B C6       LDU         #$0BC6		; MIDI receive buffer
0A1F: D6 DE          LDB         $DE
0A21: C1 08          CMPB        #$08
0A23: 23 07          BLS         $0A2C
0A25: C0 09          SUBB        #$09
0A27: F7 02 D8       STB         $02D8
0A2A: D7 DE          STB         $DE
0A2C: 5A             DECB 
0A2D: C4 0F          ANDB        #$0F
0A2F: D7 23          STB         $23
0A31: D6 DE          LDB         $DE
0A33: 58             LSLB 
0A34: 33 C5          LEAU        B,U
0A36: 8E 02 EF       LDX         #$02EF		; track block table
0A39: A6 02          LDA         +$02,X
0A3B: 2A 0A          BPL         $0A47
0A3D: B6 02 D6       LDA         $02D6
0A40: A7 02          STA         +$02,X
0A42: FC 02 D4       LDD         $02D4		; track table base
0A45: ED 84          STD         ,X
0A47: AF C1          STX         ,U++
0A49: 30 88 1B       LEAX        +$1B,X
0A4C: 8C 03 AC       CMPX        #$03AC		; loop until all track
0A4F: 23 E8          BLS         $0A39		;   blocks processed
0A51: 39             RTS  

--- get song position (?)
------------------------------------------------
0A52: 34 16          PSHS        X,B,A
0A54: 96 29          LDA         $29
0A56: 81 08          CMPA        #$08
0A58: 25 30          BCS         $0A8A
0A5A: 9E 0E          LDX         $0E
0A5C: A6 02          LDA         +$02,X		; mask bit 2
0A5E: 8A 04          ORA         #$04		;
0A60: A7 02          STA         +$02,X		;
0A62: 1A 10          ORCC        #$10		; disable IRQ
0A64: 9E 27          LDX         $27		; MIDI vector
0A66: 27 0E          BEQ         $0A76		; cleared -> $8a76
0A68: EC 84          LDD         ,X		
0A6A: 27 02          BEQ         $0A6E
0A6C: 1F 01          TFR         D,X
0A6E: 26 F8          BNE         $0A68
0A70: DC 0E          LDD         $0E
0A72: ED 84          STD         ,X
0A74: 20 04          BRA         $0A7A
------------------------------------------------
0A76: 9E 0E          LDX         $0E
0A78: 9F 27          STX         $27
0A7A: CC 00 00       LDD         #$0000		; zero [$000e]
0A7D: ED 9F 00 0E    STD         [$000E]
0A81: 34 60          PSHS        U,Y
0A83: 1C EF          ANDCC       #$EF		; enable IRQ
0A85: BD 83 F3       JSR         $83F3
0A88: 35 60          PULS        U,Y
0A8A: 35 96          PULS        PC,X,B,A

------------------------------------------------
--- send compare button status message ---------
------------------------------------------------
0A8C: 8D C4          BSR         $0A52
0A8E: 34 01          PSHS        CC
0A90: 1A 10          ORCC        #$10		; disable IRQ
0A92: C6 F0          LDB         #$F0		; transmit sysex header
0A94: BD 8C 16       JSR         $8C16
0A97: C6 0F          LDB         #$0F		; transmit ensoniq code
0A99: BD 8C 16       JSR         $8C16
0A9C: C6 02          LDB         #$02		; sq80 product code
0A9E: BD 8C 16       JSR         $8C16
0AA1: D6 DE          LDB         $DE		; MIDI channel number
0AA3: BD 8C 16       JSR         $8C16
0AA6: C6 10          LDB         #$10		; compare status cmd. code
0AA8: BD 8C 16       JSR         $8C16
0AAB: D6 C7          LDB         $C7		; button status
0AAD: C4 01          ANDB        #$01		; get compare button status
0AAF: BD 8C 16       JSR         $8C16		; tx compare button status
0AB2: C6 F7          LDB         #$F7		; end of sysex
0AB4: D7 17          STB         $17		; set & transmit command
0AB6: BD 8C 16       JSR         $8C16		; 
0AB9: 35 81          PULS        PC,CC

------------------------------------------------
--- send PROGRAM CHANGE ------------------------
------------------------------------------------
0ABB: 8D 95          BSR         $0A52
0ABD: 34 01          PSHS        CC
0ABF: 1A 10          ORCC        #$10		; disable IRQ
0AC1: A6 03          LDA         +$03,X
0AC3: 84 C0          ANDA        #$C0
0AC5: 2F 04          BLE         $0ACB
0AC7: 96 DF          LDA         $DF		; keyboard only local?
0AC9: 27 18          BEQ         $0AE3		; yes -> skip
0ACB: 96 E3          LDA         $E3
0ACD: 81 02          CMPA        #$02
0ACF: 25 12          BCS         $0AE3
0AD1: 34 04          PSHS        B
0AD3: C6 C0          LDB         #$C0		; program change
0AD5: EA 04          ORB         +$04,X		; MIDI channel
0AD7: D7 17          STB         $17		; -> byte to transmit
0AD9: 1A 10          ORCC        #$10		; disable IRQ
0ADB: BD 8C 16       JSR         $8C16		; transmit prog. change command
0ADE: 35 04          PULS        B		; transmit data
0AE0: BD 8C 16       JSR         $8C16		; 
0AE3: 35 81          PULS        PC,CC

------------------------------------------------
--- send CHANNEL PRESSURE ----------------------
------------------------------------------------
0AE5: BD 8A 52       JSR         $8A52
0AE8: 34 07          PSHS        B,A,CC
0AEA: 1A 10          ORCC        #$10		; disable IRQ
0AEC: D7 1E          STB         $1E
0AEE: C6 D0          LDB         #$D0		; channel pressure
0AF0: EA 04          ORB         +$04,X		; MIDI channel
0AF2: A6 03          LDA         +$03,X
0AF4: 84 C0          ANDA        #$C0
0AF6: 2E 0E          BGT         $0B06
0AF8: D1 17          CMPB        $17		; same command as before?
0AFA: 27 05          BEQ         $0B01		; yes -> skip header tx
0AFC: D7 17          STB         $17		; set & transmit command
0AFE: BD 8C 16       JSR         $8C16		; 
0B01: D6 1E          LDB         $1E		; transmit pressure
0B03: BD 8C 16       JSR         $8C16		; 
0B06: 35 87          PULS        PC,B,A,CC

------------------------------------------------
--- send SONG SELECT ---------------------------
------------------------------------------------
0B08: BD 8A 52       JSR         $8A52
0B0B: 34 01          PSHS        CC
0B0D: 1A 10          ORCC        #$10		; disable IRQ
0B0F: D7 1E          STB         $1E		; save data byte
0B11: C6 F3          LDB         #$F3		; transmit song select cmd
0B13: 0F 17          CLR         $17		; clear command register
0B15: BD 8C 16       JSR         $8C16		;
0B18: D6 1E          LDB         $1E		; transmit song number
0B1A: BD 8C 16       JSR         $8C16		; transmit data byte
0B1D: 35 81          PULS        PC,CC

------------------------------------------------
--- send SONG POSITION -------------------------
------------------------------------------------
0B1F: BD 8A 52       JSR         $8A52		; get song position (?)
0B22: 34 01          PSHS        CC
0B24: 1A 10          ORCC        #$10		; disable IRQ
0B26: 1E 98          EXG         B,A		; swap bytes in song position
0B28: DD 1E          STD         $1E		; store song position for tx
0B2A: C6 F2          LDB         #$F2		; transmit song position cmd
0B2C: 0F 17          CLR         $17		; clear command register
0B2E: 7E 8C 00       JMP         $8C00		; perform transmission

------------------------------------------------
--- send SEQUENCER START -----------------------
------------------------------------------------
0B31: C6 FA          LDB         #$FA		; sequencer start
0B33: 20 06          BRA         $0B3B

------------------------------------------------
--- send SEQUENCER STOP ------------------------
------------------------------------------------
0B35: C6 FC          LDB         #$FC		; sequencer stop
0B37: 20 02          BRA         $0B3B

------------------------------------------------
--- send SEQUENCER CONTINUE --------------------
------------------------------------------------
0B39: C6 FB          LDB         #$FB		; sequencer continue
0B3B: D7 17          STB         $17		; set command register
0B3D: 1A 10          ORCC        #$10		; disable IRQ
0B3F: BD 8C 16       JSR         $8C16		; perform transmission
0B42: 1C EF          ANDCC       #$EF		; enable IRQ
0B44: 39             RTS  

------------------------------------------------
--- send NOTE OFF (1) --------------------------
------------------------------------------------
0B45: BD 8A 52       JSR         $8A52
0B48: 34 01          PSHS        CC
0B4A: 1A 10          ORCC        #$10		; disable IRQ
0B4C: DD 1E          STD         $1E		; key + velocity
0B4E: 20 13          BRA         $0B63

------------------------------------------------
--- send NOTE OFF (2) --------------------------
------------------------------------------------
0B50: BD 8A 52       JSR         $8A52
0B53: 34 01          PSHS        CC
0B55: 1A 10          ORCC        #$10		; disable IRQ
0B57: DD 1E          STD         $1E		; set key + velocity
0B59: E6 03          LDB         +$03,X
0B5B: C5 40          BITB        #$40
0B5D: 27 04          BEQ         $0B63
0B5F: 96 DF          LDA         $DF		; skip transmission of note
0B61: 26 05          BNE         $0B68		;   off if keyboard local
------------------------------------------------
0B63: C6 90          LDB         #$90		; note off command ($90)
0B65: 7E 8B F4       JMP         $8BF4		; perform transmission
------------------------------------------------
0B68: DC 1E          LDD         $1E		: get key + velocity
0B6A: 35 81          PULS        PC,CC

------------------------------------------------
--- send NOTE ON (1) ---------------------------
------------------------------------------------
0B6C: BD 8A 52       JSR         $8A52
0B6F: 34 01          PSHS        CC
0B71: 1A 10          ORCC        #$10		; disable IRQ
0B73: DD 1E          STD         $1E		; set key & velocity
0B75: 20 2A          BRA         $0BA1

------------------------------------------------
--- send NOTE ON (2) ---------------------------
------------------------------------------------
0B77: BD 8A 52       JSR         $8A52
0B7A: 34 01          PSHS        CC
0B7C: 1A 10          ORCC        #$10		; disable IRQ
0B7E: DD 1E          STD         $1E		; store key & velocity
0B80: E6 03          LDB         +$03,X
0B82: C5 40          BITB        #$40
0B84: 27 1B          BEQ         $0BA1		; note on (3)
0B86: 96 DF          LDA         $DF		; skip sound processing if
0B88: 27 17          BEQ         $0BA1		;   keyboard set to MIDI
0B8A: BD 84 79       JSR         $8479
0B8D: AF 24          STX         +$04,Y
0B8F: DC 1E          LDD         $1E		; set VDB key & velocity
0B91: ED 26          STD         +$06,Y		;
0B93: CC 7A 48       LDD         #$7A48		; VDB handler to ROMLOW $2a48
0B96: ED 22          STD         +$02,Y		;
0B98: BD 84 AE       JSR         $84AE		
0B9B: 0B 5E	     fdb	 $0B5E
0B9D: DC 1E          LDD         $1E		; get key & velocity
0B9F: 35 81          PULS        PC,CC

------------------------------------------------
--- send NOTE ON (3) ---------------------------
------------------------------------------------
0BA1: C6 80          LDB         #$80		; note on command ($80)
0BA3: 20 4F          BRA         $0BF4

------------------------------------------------
--- send PITCH BEND ----------------------------
------------------------------------------------
0BA5: BD 8A 52       JSR         $8A52
0BA8: 34 01          PSHS        CC
0BAA: 1A 10          ORCC        #$10		; disable IRQ
0BAC: 4F             CLRA 
0BAD: DD 1E          STD         $1E		; pitch bend value
0BAF: C6 E0          LDB         #$E0		; pitch bend command ($e0)
0BB1: EA 04          ORB         +$04,X		; merge in MIDI channel
0BB3: 20 1C          BRA         $0BD1

------------------------------------------------
--- send controller in B with value in $E0 -----
------------------------------------------------
0BB5: BD 8A 52       JSR         $8A52
0BB8: 34 01          PSHS        CC
0BBA: 1A 10          ORCC        #$10		; disable IRQ
0BBC: 81 04          CMPA        #$04
0BBE: 26 04          BNE         $0BC4
0BC0: 96 E0          LDA         $E0		; controller value
0BC2: 20 09          BRA         $0BCD

------------------------------------------------
--- init CONTROLLER ----------------------------
------------------------------------------------
0BC4: 34 10          PSHS        X
0BC6: 8E 90 B1       LDX         #$90B1		; get data byte
0BC9: A6 86          LDA         A,X		;  for controller
0BCB: 35 10          PULS        X	

------------------------------------------------
--- send CONTROLLER ----------------------------
------------------------------------------------
0BCD: DD 1E          STD         $1E		; store for transmission
0BCF: C6 B0          LDB         #$B0		; controller byte ($b0)
0BD1: 96 E3          LDA         $E3
0BD3: 27 3B          BEQ         $0C10
0BD5: 20 1D          BRA         $0BF4		; transmit controller + data

------------------------------------------------
--- send POLYPHONIC PRESSURE -------------------
------------------------------------------------
0BD7: BD 8A 52       JSR         $8A52
0BDA: 34 01          PSHS        CC
0BDC: 1A 10          ORCC        #$10		; disable IRQ
0BDE: DD 1E          STD         $1E		; store key & amount
0BE0: C6 A0          LDB         #$A0		; polypressure command ($a0)
0BE2: 20 ED          BRA         $0BD1

------------------------------------------------
--- send ALL NOTES OFF -------------------------
------------------------------------------------
0BE4: BD 8A 52       JSR         $8A52
0BE7: 34 01          PSHS        CC
0BE9: 1A 10          ORCC        #$10		; disable IRQ
0BEB: CC 7B 00       LDD         #$7B00		; all notes off controller
0BEE: DD 1E          STD         $1E		;
0BF0: C6 B0          LDB         #$B0		; controller command
0BF2: 20 00          BRA         $0BF4

------------------------------------------------
--- send 2 byte command via MIDI ---------------
------------------------------------------------
0BF4: EA 04          ORB         +$04,X		; merge in MIDI channel
0BF6: A6 03          LDA         +$03,X
0BF8: 84 C0          ANDA        #$C0
0BFA: 2F 04          BLE         $0C00
0BFC: 96 DF          LDA         $DF		; skip MIDI tx if keyboard
0BFE: 27 10          BEQ         $0C10		;   set to local
0C00: D1 17          CMPB        $17		; skip command byte if same
0C02: 27 04          BEQ         $0C08		;   as last command
0C04: D7 17          STB         $17		; set & transmit command
0C06: 8D 0E          BSR         $0C16		;   
0C08: D6 1E          LDB         $1E		; send data byte 1
0C0A: 8D 0A          BSR         $0C16		;
0C0C: D6 1F          LDB         $1F		; send data byte 2
0C0E: 8D 06          BSR         $0C16		;
0C10: DC 1E          LDD         $1E		; reload sent data
0C12: 35 81          PULS        PC,CC

------------------------------------------------
--- send TIMING CLOCK --------------------------
------------------------------------------------
0C14: C6 F8          LDB         #$F8		; timing clock command

------------------------------------------------
--- prepare transmittion of databyte in B ------
------------------------------------------------
0C16: 34 10          PSHS        X		
0C18: 0C 29          INC         $29		; increase data size counter
0C1A: 9E 18          LDX         $18		; get tx buffer position
0C1C: E7 80          STB         ,X+		; store B to tx buffer
0C1E: 8C 0B C6       CMPX        #$0BC6		; end of buffer reached?
0C21: 25 03          BCS         $0C26
0C23: 8E 0B A6       LDX         #$0BA6		; yes, reset pointer 
0C26: 9F 18          STX         $18		;
0C28: 86 04          LDA         #$04		; enable transmission
0C2A: B7 64 02       STA         $6402		;
0C2D: 35 90          PULS        PC,X

------------------------------------------------
--- Serial Interrupt: Port A (MIDI) ------------
------------------------------------------------
0C2F: B6 64 01       LDA         $6401		; get status A
0C32: 27 08          BEQ         $0C3C		; no status -> skip check
0C34: 85 04          BITA        #$04		; transmitter empty?
0C36: 26 38          BNE         $0C70		; yes, handler
0C38: 85 F0          BITA        #$F0		; break or error?
0C3A: 27 23          BEQ         $0C5F		; no
0C3C: 8E 02 EF       LDX         #$02EF		; 8 sets at $02ef/$03c6
0C3F: 6F 07          CLR         +$07,X		; x+7 = 0
0C41: 30 88 1B       LEAX        +$1B,X		; x=x+$1b
0C44: 8C 03 C7       CMPX        #$03C7
0C47: 25 F6          BCS         $0C3F
0C49: BD 84 79       JSR         $8479		; if $10=0 goto $848a else SWI
0C4C: CC 7C 90       LDD         #$7C90		; VDB handler to ROMLOW $2c90
0C4F: ED 22          STD         +$02,Y		;
0C51: CC 00 00       LDD         #$0000
0C54: ED 24          STD         +$04,Y		; ($10)+4 = $0000
0C56: BD 84 AE       JSR         $84AE
0C59: 0B 5E	     fdb	 $0B5E
0C5B: BD 89 B0       JSR         $89B0
0C5E: 3B             RTI  

------------------------------------------------
--- DUART interrupt source checking ------------
------------------------------------------------
0C5F: 85 01          BITA        #$01		; rxrdy IRQ?
0C61: 27 02          BEQ         $0C65	
0C63: 8D 42          BSR         $0CA7
0C65: 3B             RTI  			

------------------------------------------------
--- move MIDI rx handler from stack to $1c -----
------------------------------------------------
0C66: 35 06          PULS        B,A
0C68: DD 1C          STD         $1C
0C6A: 39             RTS  

------------------------------------------------
--- move MIDI tx handler from stack to $25 -----
------------------------------------------------
0C6B: 35 06          PULS        B,A
0C6D: DD 25          STD         $25
0C6F: 39             RTS  

------------------------------------------------
--- DUART interrupt: MIDI transmitter empty ----
------------------------------------------------
0C70: AD 9F 00 25    JSR         [$0025]	; jump to tx handler
0C74: 20 EF          BRA         $0C65		; RTI

------------------------------------------------
--- MIDI transmit routine ----------------------
------------------------------------------------
0C76: 0A 29          DEC         $29		; clean up length of ptr.
0C78: 9E 27          LDX         $27
0C7A: 27 10          BEQ         $0C8C
0C7C: 96 29          LDA         $29		; get length of MIDI cmd.
0C7E: 81 04          CMPA        #$04		; more than 4?
0C80: 22 0A          BHI         $0C8C		; yes -> $8c8c
0C82: A6 02          LDA         +$02,X		; get third byte from buffer
0C84: 84 FB          ANDA        #$FB		; clear bit 3
0C86: A7 02          STA         +$02,X		; write back byte
0C88: EC 84          LDD         ,X		; get first two bytes from
0C8A: DD 27          STD         $27		; buffer and use as tx ptr.
0C8C: 9E 1A          LDX         $1A		; transmit unsent bytes
0C8E: A6 80          LDA         ,X+		;   from tx buffer
0C90: B7 64 03       STA         $6403
0C93: 8C 0B C6       CMPX        #$0BC6
0C96: 25 03          BCS         $0C9B
0C98: 8E 0B A6       LDX         #$0BA6		; tx buffer base
0C9B: 9C 18          CMPX        $18		; same as actual tx-write base?
0C9D: 26 05          BNE         $0CA4		; no -> return
0C9F: C6 08          LDB         #$08		; yes, disable transmitter
0CA1: F7 64 02       STB         $6402
0CA4: 9F 1A          STX         $1A
0CA6: 39             RTS  

------------------------------------------------
--- DUART interrupt: MIDI receiver ready -------
------------------------------------------------
0CA7: F6 64 03       LDB         $6403		; receive register
0CAA: 96 A8          LDA         $A8
0CAC: 81 11          CMPA        #$11
0CAE: 26 03          BNE         $0CB3
0CB0: 7E 8D 44       JMP         $8D44		; get MIDI rx h. from stack

------------------------------------------------
--- MIDI receive mode "$11" --------------------
------------------------------------------------
0CB3: 5D             TSTB 
0CB4: 2B 06          BMI         $0CBC		; process MIDI command
0CB6: 6E 9F 00 1C    JMP         [$001C]	; process rx'ed MIDI data
------------------------------------------------
0CBA: 20 14          BRA         $0CD0		; sysex handling

------------------------------------------------
--- MIDI receive: command received -------------
------------------------------------------------
0CBC: 7D 00 CC       TST         $00CC		; awaiting sysex data?
0CBF: 27 0F          BEQ         $0CD0		; yes, process data
0CC1: C1 F8          CMPB        #$F8		; sysex received?		
0CC3: 25 01          BCS         $0CC6		; yes, process sysex
0CC5: 39             RTS  

------------------------------------------------
--- MIDI receive: sysex message received -------
------------------------------------------------
0CC6: C1 F0          CMPB        #$F0		; sysex
0CC8: 27 06          BEQ         $0CD0
0CCA: C1 F7          CMPB        #$F7		; EOX
0CCC: 10 26 00 74    LBNE        $0D44		; get MIDI rx h. from stack

------------------------------------------------
--- MIDI receive: sysex received ---------------
------------------------------------------------
0CD0: D7 2E          STB         $2E		; byte received
0CD2: C4 70          ANDB        #$70		; stripe off sysex command		
0CD4: C1 70          CMPB        #$70
0CD6: 27 62          BEQ         $0D3A		; byte = $70
0CD8: D6 2E          LDB         $2E		; restore received byte
0CDA: C4 0F          ANDB        #$0F		; get bit 3-0
0CDC: D7 20          STB         $20		; store received nibble
0CDE: D7 22          STB         $22		; store received nibble
0CE0: CE 90 91       LDU         #$9091		; handler?
0CE3: 0F 24          CLR         $24
0CE5: 96 E2          LDA         $E2
0CE7: 81 02          CMPA        #$02
0CE9: 27 04          BEQ         $0CEF
0CEB: 81 03          CMPA        #$03
0CED: 26 24          BNE         $0D13
0CEF: 1F 98          TFR         B,A		; $E2 = 2
0CF1: 48             LSLA 			; double nibble
0CF2: 8E 0B C6       LDX         #$0BC6		; MIDI receive buffer
0CF5: AE 86          LDX         A,X		; x = buffer + 2*A
0CF7: 9F 2C          STX         $2C		; store value
0CF9: 26 16          BNE         $0D11		; value != 0
0CFB: 96 E2          LDA         $E2
0CFD: 81 03          CMPA        #$03
0CFF: 26 0D          BNE         $0D0E
0D01: 96 22          LDA         $22
0D03: 91 23          CMPA        $23
0D05: 26 07          BNE         $0D0E
0D07: CE 90 A1       LDU         #$90A1
0D0A: 0A 24          DEC         $24
0D0C: 20 03          BRA         $0D11
------------------------------------------------
0D0E: 7E 8D 44       JMP         $8D44		; rx handler stack->$1c
------------------------------------------------
0D11: 20 1B          BRA         $0D2E
------------------------------------------------
0D13: 9E C1          LDX         $C1		; $E2 = 3
0D15: 9F 2C          STX         $2C
0D17: 96 E2          LDA         $E2
0D19: 81 01          CMPA        #$01
0D1B: 26 07          BNE         $0D24
0D1D: D1 DE          CMPB        $DE
0D1F: 27 03          BEQ         $0D24
0D21: 7E 8D 44       JMP         $8D44
------------------------------------------------
0D24: A6 03          LDA         +$03,X
0D26: 84 C0          ANDA        #$C0
0D28: 81 40          CMPA        #$40
0D2A: 10 27 00 16    LBEQ        $0D44
0D2E: D6 2E          LDB         $2E		; get rx'ed command
0D30: C4 70          ANDB        #$70		; limit to command part
0D32: 57             ASRB 			; part to table offset
0D33: 57             ASRB 			;
0D34: 57             ASRB 			;
0D35: EC C5          LDD         B,U		; set MIDI rx data proc. handler
0D37: DD 1C          STD         $1C		;
0D39: 39             RTS  

------------------------------------------------
--- jump to sysex processing handler -----------
------------------------------------------------
0D3A: D6 2E          LDB         $2E		; get rx'ed command
0D3C: C4 0F          ANDB        #$0F		; get sysex command
0D3E: 8E 90 BD       LDX         #$90BD		; indirect jump to 
0D41: 58             LSLB 			;   data processing handler
0D42: 6E 95          JMP         [B,X]

------------------------------------------------
--- move MIDI rx handler from stack to $1c -----
------------------------------------------------
0D44: BD 8C 66       JSR         $8C66
0D47: 39             RTS  

------------------------------------------------
0D48: D7 20          STB         $20
0D4A: BD 8C 66       JSR         $8C66		; rx handler stack->$1c
0D4D: 96 20          LDA         $20
0D4F: CE 8D 48       LDU         #$8D48		; rx handler to $8d48
0D52: DF 1C          STU         $1C		;
0D54: 9E 2C          LDX         $2C
0D56: 9C C1          CMPX        $C1
0D58: 26 0F          BNE         $0D69
0D5A: BD 84 79       JSR         $8479		; $10==0 ? $848a : SWI
0D5D: ED 24          STD         +$04,Y
0D5F: CE 00 12       LDU         #$0012		; VDB handler to $0012
0D62: EF 22          STU         +$02,Y		;
0D64: BD 84 AE       JSR         $84AE
0D67: 0B 6D	     fdb	 $0B6D
0D69: 96 DF          LDA         $DF
0D6B: 27 0D          BEQ         $0D7A
0D6D: A6 03          LDA         +$03,X
0D6F: 84 C0          ANDA        #$C0
0D71: 27 07          BEQ         $0D7A
0D73: 96 20          LDA         $20
0D75: CE 7A 48       LDU         #$7A48		; VDB handler to ROMLOW $2a48
0D78: 8D 05          BSR         $0D7F
0D7A: 96 20          LDA         $20
0D7C: CE 7A E1       LDU         #$7AE1		; VDB handler to ROMLOW $2ae1
0D7F: BD 84 79       JSR         $8479		; $10==0 ? $848a : SWI
0D82: AF 24          STX         +$04,Y		; set address for U pointer
0D84: EF 22          STU         +$02,Y		; set VDC handler
0D86: ED 26          STD         +$06,Y		; set SEQRAM address pointer
0D88: A6 03          LDA         +$03,X
0D8A: 84 C0          ANDA        #$C0
0D8C: 26 05          BNE         $0D93
0D8E: BD 84 9F       JSR         $849F		; $10->[$10], Y->$10, $12--
0D91: 20 05          BRA         $0D98
------------------------------------------------
0D93: BD 84 AE       JSR         $84AE
0D96: 0B 5E	     fdb	 $0B5E
0D98: 39             RTS  
------------------------------------------------
0D99: D7 20          STB         $20
0D9B: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
0D9E: 96 20          LDA         $20
0DA0: C1 00          CMPB        #$00
0DA2: 26 0B          BNE         $0DAF
0DA4: C6 40          LDB         #$40
0DA6: 96 20          LDA         $20
0DA8: CE 8D 99       LDU         #$8D99		; rx handler to $8d99
0DAB: DF 1C          STU         $1C
0DAD: 20 A5          BRA         $0D54
------------------------------------------------
0DAF: 96 20          LDA         $20
0DB1: CE 8D 99       LDU         #$8D99		; rx handler to $8d99
0DB4: DF 1C          STU         $1C
0DB6: 9E 2C          LDX         $2C
0DB8: 9C C1          CMPX        $C1
0DBA: 26 0F          BNE         $0DCB
0DBC: BD 84 79       JSR         $8479
0DBF: ED 24          STD         +$04,Y
0DC1: CE 00 10       LDU         #$0010		; VDB handler to $0010
0DC4: EF 22          STU         +$02,Y
0DC6: BD 84 AE       JSR         $84AE
0DC9: 0B 6D	     fdb	 $0B6D
0DCB: CE 7A 52       LDU         #$7A52		; VDB handler to $2a52
0DCE: 20 AF          BRA         $0D7F

------------------------------------------------
--- MIDI controller parsing --------------------
------------------------------------------------
0DD0: BD 8C 66       JSR         $8C66		; rx handler stack -> $1c
0DD3: C1 01          CMPB        #$01		; mod. wheel ctrl
0DD5: 26 06          BNE         $0DDD
0DD7: CC 8F 0A       LDD         #$8F0A		; rx handler to $8f0a
0DDA: DD 1C          STD         $1C
0DDC: 39             RTS  
------------------------------------------------
0DDD: C1 40          CMPB        #$40		; sustain pedal ctrl
0DDF: 26 06          BNE         $0DE7
0DE1: CC 8F 0E       LDD         #$8F0E		; rx handler to $8f0e
0DE4: DD 1C          STD         $1C
0DE6: 39             RTS  
------------------------------------------------
0DE7: C1 04          CMPB        #$04		; foot controller
0DE9: 26 06          BNE         $0DF1
0DEB: CC 8F 2E       LDD         #$8F2E		; rx handler to $8f2e
0DEE: DD 1C          STD         $1C
0DF0: 39             RTS  
------------------------------------------------
0DF1: C1 07          CMPB        #$07		; main volume ctrl
0DF3: 26 06          BNE         $0DFB
0DF5: CC 8E F5       LDD         #$8EF5		; rx handler to $8ef5
0DF8: DD 1C          STD         $1C
0DFA: 39             RTS  
------------------------------------------------
0DFB: D1 E0          CMPB        $E0		; user defined (XCTRL) ctrl.
0DFD: 26 06          BNE         $0E05
0DFF: CC 8F 32       LDD         #$8F32		; rx handler to $8f32
0E02: DD 1C          STD         $1C
0E04: 39             RTS  
------------------------------------------------; non-processed controller
0E05: CE 8F 81       LDU         #$8F81		; rx handler to $8f81
0E08: DF 1C          STU         $1C
0E0A: 96 22          LDA         $22
0E0C: 91 DE          CMPA        $DE
0E0E: 10 26 00 5D    LBNE        $0E6F
0E12: 96 E3          LDA         $E3
0E14: 81 04          CMPA        #$04
0E16: 26 57          BNE         $0E6F
0E18: 96 A8          LDA         $A8
0E1A: 81 01          CMPA        #$01
0E1C: 26 51          BNE         $0E6F
0E1E: C1 06          CMPB        #$06		; data entry ctrl
0E20: 26 05          BNE         $0E27
0E22: CE 8E 70       LDU         #$8E70		; rx handler to $8e70
0E25: 20 14          BRA         $0E3B
------------------------------------------------
0E27: C1 60          CMPB        #$60		; data increment ctrl
0E29: 26 05          BNE         $0E30	
0E2B: CE 8E 82       LDU         #$8E82		; rx handler to $8e82
0E2E: 20 0B          BRA         $0E3B
------------------------------------------------
0E30: C1 61          CMPB        #$61		; data decrement ctrl
0E32: 26 05          BNE         $0E39
0E34: CE 8E 86       LDU         #$8E86		; rx handler to $8e86
0E37: 20 02          BRA         $0E3B
------------------------------------------------
0E39: 20 0C          BRA         $0E47
------------------------------------------------
0E3B: 96 B4          LDA         $B4
0E3D: 81 89          CMPA        #$89
0E3F: 25 03          BCS         $0E44
0E41: CE 8F 81       LDU         #$8F81		; rx handler to $8f81
0E44: DF 1C          STU         $1C
0E46: 39             RTS  
------------------------------------------------
0E47: C1 62          CMPB        #$62		; param. select lsb ctrl
0E49: 26 06          BNE         $0E51
0E4B: CC 8E A1       LDD         #$8EA1		; rx handler to $8ea1
0E4E: DD 1C          STD         $1C
0E50: 39             RTS  
------------------------------------------------
0E51: C1 63          CMPB        #$63		; param. select msb ctrl
0E53: 26 06          BNE         $0E5B
0E55: CC 8E AD       LDD         #$8EAD		; rx handler to $8ead
0E58: DD 1C          STD         $1C
0E5A: 39             RTS  
------------------------------------------------
0E5B: C1 64          CMPB        #$64		; r. param lsb ctrl
0E5D: 26 06          BNE         $0E65
0E5F: CC 8E 9E       LDD         #$8E9E		; rx handler to $8e9e
0E62: DD 1C          STD         $1C
0E64: 39             RTS  
------------------------------------------------
0E65: C1 65          CMPB        #$65		; r. param msb ctrl
0E67: 26 06          BNE         $0E6F
0E69: CC 8E 9E       LDD         #$8E9E		; rx handler to $8e9e
0E6C: DD 1C          STD         $1C
0E6E: 39             RTS  
------------------------------------------------
0E6F: 39             RTS  

------------------------------------------------
--- data entry controller receive handler ------
------------------------------------------------
0E70: BD 84 79       JSR         $8479
0E73: E7 24          STB         +$04,Y
0E75: CC 74 5F       LDD         #$745F		; voice block to $245f
0E78: ED 22          STD         +$02,Y
0E7A: BD 84 AE       JSR         $84AE
0E7D: 0B 4F	     fdb	 $0B4F
0E7F: 7E 8D D0       JMP         $8DD0		; back to controller parsing

------------------------------------------------
--- data increment controller receive handler --
------------------------------------------------
0E82: C6 18          LDB         #$18		; INC button code
0E84: 20 02          BRA         $0E88

------------------------------------------------
--- data decrement controller receive handler --
------------------------------------------------
0E86: C6 19          LDB         #$19		; DEC button code
0E88: BD 84 79       JSR         $8479
0E8B: E7 24          STB         +$04,Y		; set keycode
0E8D: 86 01          LDA         #$01		; key down (?)
0E8F: A7 25          STA         +$05,Y		;
0E91: CC 74 71       LDD         #$7471		; VDB handler to ROMLOW $2471
0E94: ED 22          STD         +$02,Y		;
0E96: BD 84 AE       JSR         $84AE
0E99: 0B 4F	     fdb	 $0B4F
0E9B: 7E 8D D0       JMP         $8DD0		; back to controller parsing

------------------------------------------------
--- registered parameter controller rx handler -
------------------------------------------------
0E9E: 7E 8D D0       JMP         $8DD0		; back to controller parsing

------------------------------------------------
--- non-reg. param. lsb controller rx handler --
------------------------------------------------
0EA1: 8E 0B A3       LDX         #$0BA3
0EA4: CE A6 1C       LDU         #$A61C		; voice block to $a61c
0EA7: E7 01          STB         +$01,X
0EA9: 86 40          LDA         #$40
0EAB: 20 0A          BRA         $0EB7

------------------------------------------------
--- non-reg. param. msb controller rx handler --
------------------------------------------------
0EAD: 8E 0B A3       LDX         #$0BA3
0EB0: CE A6 1C       LDU         #$A61C		; VDB handler to $a61c
0EB3: E7 84          STB         ,X
0EB5: 86 80          LDA         #$80
0EB7: AA 02          ORA         +$02,X
0EB9: A7 02          STA         +$02,X
0EBB: 81 C0          CMPA        #$C0
0EBD: 26 13          BNE         $0ED2
0EBF: BD 84 79       JSR         $8479
0EC2: EF 22          STU         +$02,Y
0EC4: EC 84          LDD         ,X
0EC6: 44             LSRA 
0EC7: 24 02          BCC         $0ECB
0EC9: CA 80          ORB         #$80
0ECB: ED 24          STD         +$04,Y		; set VDB handler
0ECD: BD 84 AE       JSR         $84AE
0ED0: 0B 4F	     fdb	 $0B4F
0ED2: 7E 8D D0       JMP         $8DD0		; back to controller parsing

------------------------------------------------
0ED5: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
0ED8: 0D DF          TST         $DF
0EDA: 27 0F          BEQ         $0EEB
0EDC: 9E 2C          LDX         $2C
0EDE: A6 03          LDA         +$03,X
0EE0: 84 C0          ANDA        #$C0
0EE2: 27 07          BEQ         $0EEB
0EE4: 34 04          PSHS        B
0EE6: BD 8B A8       JSR         $8BA8		; pitch bend
0EE9: 35 04          PULS        B
0EEB: 86 06          LDA         #$06
0EED: 8D 5C          BSR         $0F4B
0EEF: CC 8E D5       LDD         #$8ED5		; MIDI rx handler to $8ed5
0EF2: DD 1C          STD         $1C
0EF4: 39             RTS  

------------------------------------------------
--- main volume controller receive handler -----
------------------------------------------------
0EF5: 86 0C          LDA         #$0C
0EF7: BD 84 79       JSR         $8479
0EFA: 8E 80 E0       LDX         #$80E0		; VDB handler to $80e0
0EFD: AF 22          STX         +$02,Y		;
0EFF: 9E 2C          LDX         $2C
0F01: AF 26          STX         +$06,Y
0F03: BD 84 AE       JSR         $84AE
0F06: 0B 4F	     fdb	 $0B4F
0F08: 20 2A          BRA         $0F34

------------------------------------------------
--- modulation wheel receive handler -----------
------------------------------------------------
0F0A: 86 08          LDA         #$08
0F0C: 20 26          BRA         $0F34

------------------------------------------------
--- sustain pedal receive handler --------------
------------------------------------------------
0F0E: 96 E3          LDA         $E3
0F10: 27 1B          BEQ         $0F2D
0F12: 86 07          LDA         #$07
0F14: 34 04          PSHS        B
0F16: 8D 1C          BSR         $0F34
0F18: 35 04          PULS        B
0F1A: C4 40          ANDB        #$40
0F1C: 26 0F          BNE         $0F2D
0F1E: BD 84 79       JSR         $8479
0F21: AF 24          STX         +$04,Y
0F23: CC 7B 62       LDD         #$7B62		; VDB handler to $2b62
0F26: ED 22          STD         +$02,Y		;
0F28: BD 84 AE       JSR         $84AE
0F2B: 0B 5E	     fdb	 $0B5E
0F2D: 39             RTS  

------------------------------------------------
--- foot controller receive handler ------------
------------------------------------------------
0F2E: 86 09          LDA         #$09
0F30: 20 02          BRA         $0F34

------------------------------------------------
--- user defined controller (XCTRL) handler ----
------------------------------------------------
0F32: 86 0A          LDA         #$0A
0F34: 0D DF          TST         $DF
0F36: 27 13          BEQ         $0F4B
0F38: 9E 2C          LDX         $2C
0F3A: 34 06          PSHS        B,A
0F3C: A6 03          LDA         +$03,X
0F3E: 84 C0          ANDA        #$C0
0F40: 27 07          BEQ         $0F49
0F42: A6 E4          LDA         ,S
0F44: 80 06          SUBA        #$06
0F46: BD 8B B8       JSR         $8BB8
0F49: 35 06          PULS        B,A
0F4B: CE 8D D3       LDU         #$8DD3		; rx handler to $8dd3
0F4E: DF 1C          STU         $1C
0F50: 9E 2C          LDX         $2C
0F52: 0D E3          TST         $E3
0F54: 27 2B          BEQ         $0F81
0F56: 0D 24          TST         $24
0F58: 26 1A          BNE         $0F74
0F5A: E7 86          STB         A,X
0F5C: 80 06          SUBA        #$06
0F5E: 9C C1          CMPX        $C1
0F60: 26 0F          BNE         $0F71
0F62: BD 84 79       JSR         $8479
0F65: ED 24          STD         +$04,Y
0F67: CE 00 14       LDU         #$0014		; VDB handler to $0014
0F6A: EF 22          STU         +$02,Y		;
0F6C: BD 84 AE       JSR         $84AE
0F6F: 0B 6D	     fdb	 $0B6D
0F71: 39             RTS
------------------------------------------------
0F72: 20 0D          BRA         $0F81

------------------------------------------------
--- store B to track table position A ----------
--- for all tracks but track 0 -----------------
------------------------------------------------
0F74: 8E 02 EF       LDX         #$02EF		; track table base +$1b
0F77: E7 86          STB         A,X		; write b to position a
0F79: 30 88 1B       LEAX        +$1B,X		; next track
0F7C: 8C 03 AC       CMPX        #$03AC		; all tracks processed?
0F7F: 23 F6          BLS         $0F77

------------------------------------------------
--- not-processed controller receive handler ---
------------------------------------------------
0F81: CE 8D D3       LDU         #$8DD3		; rx handler to $8dd3
0F84: DF 1C          STU         $1C
0F86: 39             RTS  

------------------------------------------------
0F87: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
0F8A: 96 E1          LDA         $E1
0F8C: 27 19          BEQ         $0FA7
0F8E: 86 05          LDA         #$05
0F90: 8D CC          BSR         $0F5E
0F92: 86 80          LDA         #$80
0F94: BD 84 79       JSR         $8479
0F97: ED 26          STD         +$06,Y
0F99: CE 7C 65       LDU         #$7C65		; VDB handler to ROMLOW $2c65
0F9C: EF 22          STU         +$02,Y		;
0F9E: 9E 2C          LDX         $2C
0FA0: AF 24          STX         +$04,Y
0FA2: BD 84 AE       JSR         $84AE
0FA5: 0B 5E	     fdb 	 $0B5E
0FA7: 20 DE          BRA         $0F87

------------------------------------------------
0FA9: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
0FAC: 96 E3          LDA         $E3
0FAE: 10 27 FD 92    LBEQ        $0D44
0FB2: 96 E1          LDA         $E1
0FB4: 10 27 FD 8C    LBEQ        $0D44
0FB8: D7 20          STB         $20
0FBA: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
0FBD: 96 20          LDA         $20
0FBF: 9E 2C          LDX         $2C
0FC1: BD 84 79       JSR         $8479
0FC4: CE 7C 65       LDU         #$7C65		; VDB handler to ROMLOW $2c65
0FC7: EF 22          STU         +$02,Y		;
0FC9: AF 24          STX         +$04,Y
0FCB: ED 26          STD         +$06,Y
0FCD: BD 84 AE       JSR         $84AE
0FD0: 0B 5E	     fdb	 $0B5E
0FD2: 8A 80          ORA         #$80
0FD4: 8D 88          BSR         $0F5E
0FD6: 20 D1          BRA         $0FA9

------------------------------------------------
0FD8: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
0FDB: 9E 2C          LDX         $2C
0FDD: 96 E3          LDA         $E3
0FDF: 81 02          CMPA        #$02
0FE1: 25 3C          BCS         $101F
0FE3: 96 A8          LDA         $A8
0FE5: 81 0E          CMPA        #$0E
0FE7: 27 36          BEQ         $101F
0FE9: 96 DF          LDA         $DF
0FEB: 27 13          BEQ         $1000
0FED: A6 03          LDA         +$03,X
0FEF: 34 12          PSHS        X,A
0FF1: 84 C0          ANDA        #$C0
0FF3: 27 07          BEQ         $0FFC
0FF5: 86 80          LDA         #$80
0FF7: A7 03          STA         +$03,X
0FF9: BD 8A BD       JSR         $8ABD
0FFC: 35 12          PULS        X,A
0FFE: A7 03          STA         +$03,X
1000: C1 78          CMPB        #$78
1002: 24 1B          BCC         $101F
1004: BD 84 79       JSR         $8479
1007: CE 74 01       LDU         #$7401		; VDB handler to ROMLOW $2401
100A: EF 22          STU         +$02,Y		;
100C: E7 24          STB         +$04,Y
100E: AF 26          STX         +$06,Y
1010: BD 84 AE       JSR         $84AE
1013: 0B 4F	     fdb	 $0B4F
1015: E7 02          STB         +$02,X
1017: 86 66          LDA         #$66		; PCB length
1019: 3D             MUL  
101A: C3 10 4A       ADDD        #$104A		; get program address
101D: ED 84          STD         ,X
101F: 20 B7          BRA         $0FD8

------------------------------------------------
1021: 96 E5          LDA         $E5
1023: 81 01          CMPA        #$01
1025: 27 04          BEQ         $102B
1027: 81 81          CMPA        #$81
1029: 26 03          BNE         $102E
102B: 7E 9A 94       JMP         $9A94
------------------------------------------------
102E: 39             RTS  

------------------------------------------------
--- sysex received: sequencer start ------------
------------------------------------------------
102F: 8E 00 08       LDX         #$0008		; VDB handler to $0008
1032: 20 08          BRA         $103C

------------------------------------------------
--- sysex received: sequencer stop -------------
------------------------------------------------
1034: 8E 00 0C       LDX         #$000C		; VDB handler to $000c
1037: 20 03          BRA         $103C

------------------------------------------------
--- sysex received: sequencer continue ---------
------------------------------------------------
1039: 8E 00 0A       LDX         #$000A		; VDB handler to $000a
103C: 96 E5          LDA         $E5
103E: 84 7F          ANDA        #$7F
1040: 81 01          CMPA        #$01
1042: 26 0E          BNE         $1052
1044: BD 84 79       JSR         $8479
1047: AF 22          STX         +$02,Y		; set VDB handler
1049: A7 24          STA         +$04,Y		
104B: A7 26          STA         +$06,Y
104D: BD 84 AE       JSR         $84AE
1050: 0B 6D	     fdb	 $0B6D

------------------------------------------------
--- sysex received: active sensing -------------
---		    system reset ---------------
------------------------------------------------
1052: 39             RTS

------------------------------------------------
--- sysex received: song position --------------
------------------------------------------------
1053: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
1056: D7 2E          STB         $2E
1058: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
105B: 1F 98          TFR         B,A
105D: D6 2E          LDB         $2E
105F: BD 84 79       JSR         $8479
1062: 8E 00 02       LDX         #$0002		; VDB handler to $0002
1065: AF 22          STX         +$02,Y		;
1067: ED 24          STD         +$04,Y
1069: BD 84 AE       JSR         $84AE
106C: 0B 6D	     fdb	 $0B6D
106E: 20 E3          BRA         $1053

------------------------------------------------
--- sysex received: song select ----------------
------------------------------------------------
1070: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
1073: 96 E3          LDA         $E3
1075: 81 03          CMPA        #$03
1077: 24 03          BCC         $107C
1079: 7E 8D 44       JMP         $8D44
------------------------------------------------
107C: BD 84 79       JSR         $8479
107F: E7 24          STB         +$04,Y
1081: CC 00 04       LDD         #$0004		; VDB handler to $0004
1084: ED 22          STD         +$02,Y		;
1086: 86 FF          LDA         #$FF
1088: A7 26          STA         +$06,Y
108A: BD 84 AE       JSR         $84AE
108D: 0B 6D	     fdb	 $0B6D
108F: 20 DF          BRA         $1070
------------------------------------------------

------------------------------------------------
--- MIDI handlers ------------------------------
------------------------------------------------
1091: 8D 48	     FDB	 $8D48		; MIDI rx handler (1)
1093: 8D 99	     FDB	 $8D99		; MIDI rx handler (2)
1095: 8F AC	     FDB	 $8FAC		; MIDI related
1097: 8D D3	     FDB	 $8DD3		; MIDI rx handler (data proc?)
1099: 8F DB	     FDB	 $8FDB		; MIDI related
109B: 8F 8A	     FDB	 $8F8A		; MIDI related
109D: 8E D5	     FDB	 $8ED5		; pitch bend related
109F: 8D 47 	     FDB	 $8D47		; RTS
10A1: 8D 47	     FDB	 $8D47		; RTS
10A3: 8D 47	     FDB	 $8D47		; RTS
10A5: 8D 47	     FDB	 $8D47		; RTS
10A7: 8D D3	     FDB	 $8DD3		; MIDI rx handler (data proc?)
10A9: 8D 47	     FDB	 $8D47		; RTS
10AB: 8F 8A	     FDB	 $8F8A		; MIDI related
10AD: 8E D5	     FDB	 $8ED5		; pitch bend related
10AF: 8D 47	     FDB	 $8D47		; RTS

------------------------------------------------
--- MIDI controller init values (byte 1/2)
------------------------------------------------
10B1: 00 40 
10B3: 01 04 
10B5: 00 00 
10B7: 07 06 
10B9: 60 61 
10BA: 62 63              

------------------------------------------------
--- MIDI sysex processing handler --------------
------------------------------------------------
10BD: 94 E3	     FDB	 $94E3	; universal sysex message
10BF: 8D 44	     FDB	 $8D44	; time code, rx h. from stack to $1c
10C1: 90 53	     FDB	 $9053	; song position
10C3: 90 70	     FDB	 $9070	; song select 
10C5: 8D 44	     FDB	 $8D44	; ndef, rx handler from stack to $1c
10C7: 8D 44	     FDB	 $8D44  ; ndef, rx handler from stack to $1c
10C9: 8D 44	     FDB	 $8D44	; tune request, rx h. from stack to $1c
10CB: 94 B7	     FDB	 $94B7	; end of sysex
10CD: 90 21	     FDB	 $9021	; timing clock
10CF: 8D 44	     FDB	 $8D44	; ndef, rx handler from stack to $1c
10D1: 90 2F	     FDB	 $902F	; sequencer start
10D3: 90 39	     FDB	 $9039	; sequencer continue
10D5: 90 34	     FDB	 $9034	; sequencer stop
10D7: 8D 44	     FDB	 $8D44	; ndef, rx handler from stack to $1c
10D9: 90 52	     FDB	 $9052	; active sensing, RTS
10DB: 90 52	     FDB	 $9052	; system reset, RTS

------------------------------------------------
10DD: 0F 0D          CLR         $0D
10DF: 0F 1E          CLR         $1E
10E1: 0F 17          CLR         $17
10E3: 86 FF          LDA         #$FF
10E5: 97 1F          STA         $1F
10E7: 1F 41          TFR         S,X		; stack base to X
10E9: 30 02          LEAX        +$02,X		; stack base + 2
10EB: 9F 37          STX         $37		;   to $37
10ED: 7E 86 02       JMP         $8602

------------------------------------------------
10F0: BD 97 C8       JSR         $97C8		; delay & reset DUART port A
10F3: 96 0D          LDA         $0D
10F5: 81 02          CMPA        #$02
10F7: 26 06          BNE         $10FF
10F9: BD C4 D5       JSR         $C4D5		; clear/init buffers
10FC: BD C4 03       JSR         $C403		; buffer stuff
10FF: 86 4A          LDA         #$4A		; reset errors, disable tx/rx
1101: B7 64 02       STA         $6402
1104: 86 5A          LDA         #$5A		; reset break irq, disable tx/rx
1106: B7 64 02       STA         $6402
1109: 10 DE 37       LDS         $37
110C: 96 1E          LDA         $1E
110E: 27 04          BEQ         $1114
1110: 96 0D          LDA         $0D
1112: 27 03          BEQ         $1117
1114: 7E 86 93       JMP         $8693
------------------------------------------------
1117: 32 7E          LEAS        -$02,S
1119: 0F 1E          CLR         $1E
111B: 86 06          LDA         #$06
111D: 97 0D          STA         $0D
111F: 6E 9F 0B E9    JMP         [$0BE9]	; jump to hook address

------------------------------------------------
1123: 8D B8          BSR         $10DD
1125: BD 96 C4       JSR         $96C4
1128: C6 01          LDB         #$01
112A: BD 98 0D       JSR         $980D
112D: FC 02 D4       LDD         $02D4		; track table base
1130: C3 FF C6       ADDD        #$FFC6
1133: 1F 01          TFR         D,X
1135: C3 00 66       ADDD        #$0066		; PCB length ?
1138: 34 06          PSHS        B,A
113A: E6 80          LDB         ,X+
113C: BD 98 18       JSR         $9818
113F: AC E4          CMPX        ,S
1141: 26 F7          BNE         $113A
1143: 32 62          LEAS        +$02,S
1145: 20 17          BRA         $115E

------------------------------------------------
--- dump internal sound bank via MIDI ----------
------------------------------------------------
1147: 8D 94          BSR         $10DD		
1149: BD 96 C4       JSR         $96C4		; transmit 
114C: C6 02          LDB         #$02		; sysex/all program dump header
114E: BD 98 0D       JSR         $980D
1151: 8E 10 10       LDX         #$1010		; sound program
1154: E6 80          LDB         ,X+		; B <- sound parameters
1156: BD 98 18       JSR         $9818		; transmit B via MIDI		
1159: 8C 20 00       CMPX        #$2000
115C: 26 F6          BNE         $1154
115E: C6 F7          LDB         #$F7		; transmit eof sysex
1160: BD 98 0D       JSR         $980D
1163: 96 0D          LDA         $0D
1165: 26 04          BNE         $116B
1167: 86 01          LDA         #$01
1169: 97 0D          STA         $0D
116B: 20 83          BRA         $10F0
------------------------------------------------
116D: 8D 02          BSR         $1171
116F: 20 F2          BRA         $1163
------------------------------------------------
1171: 7D 0B E6       TST         $0BE6
1174: 27 02          BEQ         $1178
1176: 8D 45          BSR         $11BD
1178: 0F CD          CLR         $CD
117A: 96 F5          LDA         $F5
117C: 2B 1C          BMI         $119A
117E: 8E 02 03       LDX         #$0203
1181: 6D 86          TST         A,X
1183: 2B 15          BMI         $119A
1185: BD 84 79       JSR         $8479
1188: A7 24          STA         +$04,Y
118A: C6 01          LDB         #$01
118C: E7 26          STB         +$06,Y
118E: 8E 00 04       LDX         #$0004		; VDB handler to $0004
1191: AF 22          STX         +$02,Y		;
1193: BD 84 AE       JSR         $84AE
1196: 0B 6D	     fdb	 $0B6D
1198: 20 05          BRA         $119F
------------------------------------------------                               
119A: 86 FF          LDA         #$FF
119C: BD B0 AD       JSR         $B0AD
119F: BD E2 85       JSR         $E285
11A2: BD 84 79       JSR         $8479
11A5: CC 00 00       LDD         #$0000
11A8: ED 24          STD         +$04,Y
11AA: CC AB 0B       LDD         #$AB0B		; VDB handler to $ab0b
11AD: ED 22          STD         +$02,Y		;
11AF: BD 84 AE       JSR         $84AE
11B2: 0B 4F	     fdb	 $0B4F
11B4: 0F ED          CLR         $ED
11B6: 86 18          LDA         #$18
11B8: 97 FC          STA         $FC
11BA: 7E C4 03       JMP         $C403
------------------------------------------------
11BD: 7F 0B E6       CLR         $0BE6
11C0: BD A6 69       JSR         $A669		; select ROMLOW $0000
11C3: BD A4 5A       JSR         $A45A
11C6: BD 85 A0       JSR         $85A0
11C9: 8E 01 9F       LDX         #$019F		; transfer $019f-$01db
11CC: 33 88 78       LEAU        +$78,X		;       to $0217-$0253
11CF: CC 00 3C       LDD         #$003C		; 
11D2: 8D 50          BSR         $1224		; perform transfer
11D4: 8E 01 95       LDX         #$0195		; transfer $0195-$019f
11D7: 33 88 6E       LEAU        +$6E,X		; 	to $0203-$020d
11DA: CC FF 0A       LDD         #$FF0A		; #$ff to $020e
11DD: 8D 45          BSR         $1224		; perform transfer
11DF: 8E 01 77       LDX         #$0177		; transfer $0177-$0195
11E2: 33 88 50       LEAU        +$50,X		;       to $01c7-$01e5
11E5: CC FF 1E       LDD         #$FF1E		; #$ff to $01e6
11E8: 8D 3A          BSR         $1224		; perform transfer
11EA: 8E 01 63       LDX         #$0163		; transfer $0163-$0177
11ED: 33 88 3C       LEAU        +$3C,X		;  	to $019f-$01b3
11F0: CC 00 14       LDD         #$0014		; #$00, 14 times
11F3: 8D 2F          BSR         $1224		; perform transfer
11F5: 8E 02 03       LDX         #$0203
11F8: 4F             CLRA 
11F9: 34 12          PSHS        X,A
11FB: 6D 86          TST         A,X
11FD: 2B 1D          BMI         $121C
11FF: CE 01 9F       LDU         #$019F
1202: 48             LSLA 
1203: EC C6          LDD         A,U
1205: C3 00 04       ADDD        #$0004
1208: 6F E2          CLR         ,-S
120A: BD D8 16       JSR         $D816
120D: 34 06          PSHS        B,A
120F: A6 62          LDA         +$02,S
1211: 8B 1E          ADDA        #$1E
1213: A7 62          STA         +$02,S
1215: 35 06          PULS        B,A		; get SEQRAM address
1217: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
121A: 32 61          LEAS        +$01,S		; get next byte
121C: 35 12          PULS        X,A
121E: 4C             INCA 
121F: 81 0A          CMPA        #$0A
1221: 25 D6          BCS         $11F9
1223: 39             RTS  

------------------------------------------------
--- transfer B bytes from [X] to [U] -----------
--- if A!=0 transfer A to [U+1] ----------------
------------------------------------------------
1224: 34 06          PSHS        B,A
1226: A6 80          LDA         ,X+
1228: A7 C0          STA         ,U+
122A: 5A             DECB 
122B: 26 F9          BNE         $1226
122D: 35 06          PULS        B,A
122F: 4D             TSTA 
1230: 27 05          BEQ         $1237
1232: A7 C0          STA         ,U+
1234: 5A             DECB 
1235: 26 FB          BNE         $1232
1237: 39             RTS  

------------------------------------------------
1238: BD 90 DD       JSR         $90DD
123B: CC 92 50       LDD         #$9250		; set hook to $9250
123E: FD 0B E9       STD         $0BE9
1241: 0C 1E          INC         $1E
1243: 86 80          LDA         #$80
1245: 97 1F          STA         $1F
1247: FC 01 21       LDD         $0121
124A: 34 06          PSHS        B,A
124C: C6 21          LDB         #$21
124E: 8D 57          BSR         $12A7

--- pointed to by $0be9
------------------------------------------------
1250: BD 96 C4       JSR         $96C4		; tx all prog. dump header
1253: C6 20          LDB         #$20		; SQ80 sequence dump code
1255: BD 98 0D       JSR         $980D
1258: 8E 00 EE       LDX         #$00EE
125B: E6 80          LDB         ,X+
125D: BD 98 18       JSR         $9818
1260: 8C 02 D4       CMPX        #$02D4
1263: 26 F6          BNE         $125B
1265: 8E 00 00       LDX         #$0000
1268: 34 04          PSHS        B
126A: 1F 10          TFR         X,D
126C: BD D8 16       JSR         $D816
126F: 35 04          PULS        B
1271: BD 98 18       JSR         $9818
1274: 30 01          LEAX        +$01,X
1276: AC E4          CMPX        ,S
1278: 26 EE          BNE         $1268
127A: 7E 91 5E       JMP         $915E

------------------------------------------------
127D: BD 90 DD       JSR         $90DD
1280: CC 92 95       LDD         #$9295		; set hook to $9295
1283: FD 0B E9       STD         $0BE9		;
1286: 0C 1E          INC         $1E
1288: 86 80          LDA         #$80
128A: 97 1F          STA         $1F
128C: BD E9 5F       JSR         $E95F
128F: 34 06          PSHS        B,A
1291: C6 07          LDB         #$07		; first byte to transmit
1293: 8D 12          BSR         $12A7

--- pointed to by $0be9
------------------------------------------------
1295: BD 96 C4       JSR         $96C4
1298: C6 08          LDB         #$08
129A: BD 98 0D       JSR         $980D
129D: 9E F0          LDX         $F0
129F: 1F 10          TFR         X,D
12A1: E3 E1          ADDD        ,S++
12A3: 34 06          PSHS        B,A
12A5: 20 C1          BRA         $1268

------------------------------------------------
12A7: 34 04          PSHS        B
12A9: BD D3 05       JSR         $D305
12AC: BD 96 C4       JSR         $96C4
12AF: 35 04          PULS        B
12B1: BD 98 0D       JSR         $980D		; transmit B via MIDI
12B4: E6 63          LDB         +$03,S
12B6: BD 98 18       JSR         $9818		; transmit B as 2x4bit
12B9: E6 62          LDB         +$02,S
12BB: C4 0F          ANDB        #$0F
12BD: BD 98 0D       JSR         $980D		; transmit B via MIDI
12C0: E6 62          LDB         +$02,S
12C2: 54             LSRB 
12C3: 54             LSRB 
12C4: 54             LSRB 
12C5: 54             LSRB 
12C6: BD 97 33       JSR         $9733
12C9: BD 96 FE       JSR         $96FE
12CC: C1 05          CMPB        #$05		; sequence reject code
12CE: 26 06          BNE         $12D6
12D0: 86 04          LDA         #$04
12D2: 97 0D          STA         $0D
12D4: 20 0F          BRA         $12E5
------------------------------------------------
12D6: C1 0D          CMPB        #$0D		; no free sequence reject code
12D8: 26 06          BNE         $12E0
12DA: 86 05          LDA         #$05
12DC: 97 0D          STA         $0D
12DE: 20 05          BRA         $12E5
------------------------------------------------
12E0: C1 04          CMPB        #$04		; sequence accept code
12E2: 26 01          BNE         $12E5
12E4: 39             RTS  
------------------------------------------------
12E5: 7E 90 F0       JMP         $90F0

------------------------------------------------
12E8: BD 90 DD       JSR         $90DD
12EB: BD 96 C4       JSR         $96C4
12EE: C6 04          LDB         #$04
12F0: BD 97 33       JSR         $9733
12F3: BD 96 FE       JSR         $96FE
12F6: C1 06          CMPB        #$06		; ESQ-1 one sequence dump code
12F8: 26 0C          BNE         $1306
12FA: F7 0B E6       STB         $0BE6
12FD: CE 02 D4       LDU         #$02D4		; track table base
1300: 33 C9 FF 4C    LEAU        -$00B4,U
1304: 20 07          BRA         $130D
------------------------------------------------
1306: C1 20          CMPB        #$20		; SQ80 all seq. dump packet
1308: 26 1F          BNE         $1329
130A: CE 02 D4       LDU         #$02D4		; track table base
130D: DF 30          STU         $30
130F: CE 00 EE       LDU         #$00EE
1312: BD 97 F6       JSR         $97F6
1315: E7 C0          STB         ,U+
1317: 11 93 30       CMPU        $30
131A: 26 F6          BNE         $1312
131C: 10 8E 00 00    LDY         #$0000
1320: DC 33          LDD         $33
1322: 34 06          PSHS        B,A
1324: 8D 3B          BSR         $1361
1326: 7E 91 6D       JMP         $916D
------------------------------------------------
1329: C1 08          CMPB        #$08		; one seq. dump packet
132B: 26 31          BNE         $135E
132D: 10 BE 01 21    LDY         $0121
1331: BD 97 F6       JSR         $97F6
1334: 34 04          PSHS        B
1336: 1F 20          TFR         Y,D		; get SEQRAM address
1338: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
133B: BD 97 F6       JSR         $97F6
133E: 34 04          PSHS        B
1340: 31 21          LEAY        +$01,Y		; increment SEQRAM address
1342: 1F 20          TFR         Y,D		; get SEQRAM address
1344: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
1347: 31 21          LEAY        +$01,Y		; increment SEQRAM address
1349: 35 06          PULS        B,A
134B: 1E 89          EXG         A,B
134D: 34 06          PSHS        B,A
134F: FC 01 21       LDD         $0121
1352: E3 E1          ADDD        ,S++
1354: 34 06          PSHS        B,A
1356: 8D 09          BSR         $1361
1358: BD E6 C9       JSR         $E6C9
135B: 7E 91 6D       JMP         $916D
------------------------------------------------
135E: 7E 90 F0       JMP         $90F0

------------------------------------------------
1361: BD 97 F6       JSR         $97F6
1364: 34 04          PSHS        B
1366: 1F 20          TFR         Y,D		; get SEQRAM address
1368: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
136B: 31 21          LEAY        +$01,Y		; increment SEQRAM address
136D: 35 04          PULS        B
136F: 10 AC 62       CMPY        +$02,S
1372: 26 ED          BNE         $1361
1374: 39             RTS  
------------------------------------------------
1375: BD 90 DD       JSR         $90DD
1378: C6 05          LDB         #$05
137A: 34 04          PSHS        B
137C: 20 07          BRA         $1385
------------------------------------------------
137E: BD 90 DD       JSR         $90DD
1381: C6 0D          LDB         #$0D
1383: 34 04          PSHS        B
1385: BD 96 C4       JSR         $96C4
1388: 35 04          PULS        B
138A: BD 98 0D       JSR         $980D
138D: 7E 91 5E       JMP         $915E
------------------------------------------------
1390: BD 90 DD       JSR         $90DD
1393: BD 97 C8       JSR         $97C8
1396: CC 0B E9       LDD         #$0BE9		; address start pointer
1399: DD 30          STD         $30		;   to $0be9
139B: CC 0B F3       LDD         #$0BF3		; address end pointer to
139E: DD 33          STD         $33		;   to $0bf3
13A0: CC 97 BF       LDD         #$97BF		; hook to $97bf
13A3: FD 0B E7       STD         $0BE7
13A6: BD 96 BD       JSR         $96BD		; tx single prog. dump header
13A9: C6 0B          LDB         #$0B		; transmit $0b
13AB: BD 98 0D       JSR         $980D
13AE: C6 10          LDB         #$10		; transmit $10
13B0: BD 98 0D       JSR         $980D
13B3: 5F             CLRB 			; transmit $00
13B4: BD 98 0D       JSR         $980D
13B7: C6 FF          LDB         #$FF		; transmit $0f/$0f
13B9: BD 98 18       JSR         $9818
13BC: C6 0A          LDB         #$0A		; transmit $00/$0a
13BE: BD 98 18       JSR         $9818
13C1: C6 FF          LDB         #$FF
13C3: BD 97 50       JSR         $9750
13C6: 10 24 00 D6    LBCC        $14A0
13CA: BD 86 36       JSR         $8636
13CD: 5F             CLRB 
13CE: 8E 0B E9       LDX         #$0BE9
13D1: E1 80          CMPB        ,X+
13D3: 27 07          BEQ         $13DC
13D5: 86 03          LDA         #$03
13D7: 97 0D          STA         $0D
13D9: 7E 90 F0       JMP         $90F0
------------------------------------------------
13DC: 5C             INCB 
13DD: C1 08          CMPB        #$08
13DF: 26 F0          BNE         $13D1
13E1: DC D3          LDD         $D3
13E3: 83 00 01       SUBD        #$0001
13E6: 34 06          PSHS        B,A
13E8: EC 84          LDD         ,X
13EA: 10 A3 E1       CMPD        ,S++
13ED: 23 07          BLS         $13F6
13EF: 86 04          LDA         #$04
13F1: 97 0D          STA         $0D
13F3: 7E 90 F0       JMP         $90F0

------------------------------------------------
13F6: EC 84          LDD         ,X
13F8: 34 06          PSHS        B,A
13FA: 86 02          LDA         #$02
13FC: 97 0D          STA         $0D
13FE: CC 00 EE       LDD         #$00EE		; start address = $00ee
1401: DD 30          STD         $30
1403: CC 02 20       LDD         #$0220		; end address = $0220
1406: DD 33          STD         $33
1408: CC 97 BF       LDD         #$97BF		; handler to $97bf
140B: FD 0B E7       STD         $0BE7
140E: BD 96 BD       JSR         $96BD		; tx single prog. dump header
1411: C6 0B          LDB         #$0B		; transmit $0b
1413: BD 98 0D       JSR         $980D
1416: C6 10          LDB         #$10		; transmit $10
1418: BD 98 0D       JSR         $980D
141B: 5F             CLRB 			; transmit $00
141C: BD 98 0D       JSR         $980D
141F: 5F             CLRB 			; transmit $00/$00
1420: BD 98 18       JSR         $9818
1423: C6 32          LDB         #$32		; transmit $03/$02
1425: BD 98 18       JSR         $9818
1428: C6 01          LDB         #$01
142A: BD 97 50       JSR         $9750
142D: 24 71          BCC         $14A0
142F: BD 86 36       JSR         $8636
1432: A6 64          LDA         +$04,S
1434: 27 35          BEQ         $146B
1436: CC 10 10       LDD         #$1010		; internal sound bank
1439: DD 30          STD         $30		; -> $30/$31
143B: CC 20 00       LDD         #$2000		; end of internal sound bank
143E: DD 33          STD         $33		; -> $33/$34
1440: CC 97 BF       LDD         #$97BF
1443: FD 0B E7       STD         $0BE7
1446: BD 96 BD       JSR         $96BD		; tx single prog. dump header
1449: C6 0B          LDB         #$0B		; transmit #$0b
144B: BD 98 0D       JSR         $980D
144E: C6 10          LDB         #$10		; transmit #$10
1450: BD 98 0D       JSR         $980D
1453: 5F             CLRB 			; transmit #$00
1454: BD 98 0D       JSR         $980D
1457: C6 10          LDB         #$10		; transmit #$01 / #$00
1459: BD 98 18       JSR         $9818		
145C: C6 F0          LDB         #$F0		; transmit #$0f / #$00
145E: BD 98 18       JSR         $9818		
1461: C6 1F          LDB         #$1F 
1463: BD 97 50       JSR         $9750
1466: 24 38          BCC         $14A0
1468: BD 86 36       JSR         $8636
146B: CC 00 00       LDD         #$0000
146E: DD 30          STD         $30
1470: EC E1          LDD         ,S++
1472: DD 33          STD         $33
1474: CC D7 E6       LDD         #$D7E6		; vector: stack to SEQRAM
1477: FD 0B E7       STD         $0BE7		; to $0be7
147A: BD 96 BD       JSR         $96BD
147D: C6 0B          LDB         #$0B		; transmit #$0b
147F: BD 98 0D       JSR         $980D	
1482: 5F             CLRB 			; transmit #$00 / #$00
1483: BD 98 18       JSR         $9818
1486: 5F             CLRB 			; transmit #$00 / #$00
1487: BD 98 18       JSR         $9818
148A: D6 34          LDB         $34		; transmit #$03 / #$04
148C: BD 98 18       JSR         $9818
148F: D6 33          LDB         $33
1491: BD 97 50       JSR         $9750
1494: 24 0A          BCC         $14A0
1496: 86 01          LDA         #$01
1498: 97 0D          STA         $0D
149A: B7 0B E6       STA         $0BE6
149D: 7E 91 6D       JMP         $916D
------------------------------------------------
14A0: 86 02          LDA         #$02
14A2: 97 0D          STA         $0D
14A4: 7E 90 F0       JMP         $90F0
------------------------------------------------
14A7: BD 84 79       JSR         $8479
14AA: E7 24          STB         +$04,Y
14AC: CC A1 6F       LDD         #$A16F		; voice block to $a16f
14AF: ED 22          STD         +$02,Y
14B1: BD 84 BA       JSR         $84BA
14B4: 0B             FDB	 $0B4F
14B6: 39             RTS  

------------------------------------------------
--- sysex received: end of sysex message -------
------------------------------------------------
14B7: 96 CC          LDA         $CC
14B9: 27 06          BEQ         $14C1
14BB: C6 F7          LDB         #$F7
14BD: 8D 05          BSR         $14C4
14BF: 8D E6          BSR         $14A7
14C1: 7E 8D 44       JMP         $8D44
------------------------------------------------
14C4: BE 0C F3       LDX         $0CF3
14C7: E7 80          STB         ,X+
14C9: 8C 0C F3       CMPX        #$0CF3
14CC: 26 03          BNE         $14D1
14CE: 8E 0B F3       LDX         #$0BF3
14D1: BF 0C F3       STX         $0CF3
14D4: BC 0C F5       CMPX        $0CF5
14D7: 26 09          BNE         $14E2
14D9: C6 FF          LDB         #$FF
14DB: 8D CA          BSR         $14A7
14DD: 32 62          LEAS        +$02,S
14DF: 7E 8D 44       JMP         $8D44
------------------------------------------------
14E2: 39             RTS  

------------------------------------------------
--- sysex received: start of sysex message -----
------------------------------------------------
14E3: 96 CC          LDA         $CC		; sysex allowed?
14E5: 27 14          BEQ         $14FB		; yes -> process
14E7: C6 F0          LDB         #$F0
14E9: 8D D9          BSR         $14C4
14EB: 8D BA          BSR         $14A7
14ED: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
14F0: 96 CC          LDA         $CC
14F2: 26 03          BNE         $14F7
14F4: 7E 8D 44       JMP         $8D44
------------------------------------------------
14F7: 8D CB          BSR         $14C4
14F9: 20 F2          BRA         $14ED

------------------------------------------------
--- get sysex data -----------------------------
------------------------------------------------
14FB: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
14FE: C1 7E          CMPB        #$7E		; non realtime message
1500: 26 22          BNE         $1524
1502: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
1505: C1 7F          CMPB        #$7F		; all channel broadcast
1507: 27 04          BEQ         $150D
1509: D1 DE          CMPB        $DE		; MIDI channel number
150B: 26 14          BNE         $1521
150D: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
1510: C1 06          CMPB        #$06		; general information msg code
1512: 26 0D          BNE         $1521
1514: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
1517: C1 01          CMPB        #$01		; device inquiry msg code
1519: 26 06          BNE         $1521
151B: CC 98 45       LDD         #$9845		; prepare tx of device ID msg.
151E: BD 96 9E       JSR         $969E
1521: 7E 8D 44       JMP         $8D44
------------------------------------------------
1524: C1 0F          CMPB        #$0F		; Ensoniq code		
1526: 10 26 F8 1A    LBNE        $0D44
152A: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
152D: C1 02          CMPB        #$02		; ESQ-1/SQ80 message code 
152F: 10 26 01 68    LBNE        $169B
1533: 96 E3          LDA         $E3
1535: 81 04          CMPA        #$04
1537: 10 26 01 60    LBNE        $169B
153B: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
153E: D1 DE          CMPB        $DE		; MIDI channel
1540: 10 26 01 57    LBNE        $169B
1544: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
1547: C1 10          CMPB        #$10		; compare button status
1549: 26 15          BNE         $1560
154B: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
154E: 8E 7A BD       LDX         #$7ABD		; VDB handler to ROMLOW $0abd
1551: BD 84 79       JSR         $8479
1554: AF 22          STX         +$02,Y		; set VDB handler
1556: E7 24          STB         +$04,Y		; compare button status code
1558: BD 84 AE       JSR         $84AE
155B: 0B 4F	     fdb	 $0B4F
155D: 7E 8D 44       JMP         $8D44
------------------------------------------------
1560: C1 11          CMPB        #$11		; ??? (not listed!)
1562: 26 08          BNE         $156C
1564: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
1567: 8E 74 5F       LDX         #$745F		; VDB handler to ROMLOW $245f
156A: 20 E5          BRA         $1551
------------------------------------------------
156C: C1 0E          CMPB        #$0E		; keypad command code
156E: 26 21          BNE         $1591
1570: BD 8C 66       JSR         $8C66		; rx-handler stack -> $1c
1573: BD 84 79       JSR         $8479
1576: C1 33          CMPB        #$33		; key up?
1578: 23 07          BLS         $1581
157A: 8E 73 90       LDX         #$7390		; VDB handler to ROMLOW $2390
157D: C0 33          SUBB        #$33		; get key number
157F: 20 03          BRA         $1584
------------------------------------------------; key down
1581: 8E 71 3A       LDX         #$713A		; VDB handler to ROMLOW $213a
1584: AF 22          STX         +$02,Y		; set VDB handler
1586: E7 24          STB         +$04,Y		; set keycode
1588: A7 25          STA         +$05,Y		; set key down/up (0/1)
158A: BD 84 AE       JSR         $84AE
158D: 0B 4F	     fdb	 $0B4F
158F: 20 DF          BRA         $1570

------------------------------------------------
--- rx'ed single program dump ------------------
------------------------------------------------
1591: 96 E5          LDA         $E5
1593: 10 2A F7 AD    LBPL        $0D44
1597: C1 01          CMPB        #$01		; single program dump
1599: 26 10          BNE         $15AB
159B: CC 0D 30       LDD         #$0D30		; single program start
159E: DD 30          STD         $30		; -> $30/$31
15A0: C3 00 66       ADDD        #$0066		; single program end
15A3: DD 33          STD         $33		; -> $33/$34
15A5: 86 16          LDA         #$16		; 22
15A7: 97 0D          STA         $0D
15A9: 20 12          BRA         $15BD

------------------------------------------------
--- rx'ed all program dump ---------------------
------------------------------------------------
15AB: C1 02          CMPB        #$02		; all program dump
15AD: 26 52          BNE         $1601
15AF: CC 10 10       LDD         #$1010		; sound bank start
15B2: DD 30          STD         $30		; -> $30/$31
15B4: C3 0F F0       ADDD        #$0FF0		; sound bank end
15B7: DD 33          STD         $33		; -> $33/$34
15B9: 86 26          LDA         #$26		; 38
15BB: 97 0D          STA         $0D
15BD: 96 A8          LDA         $A8
15BF: 81 00          CMPA        #$00
15C1: 26 3E          BNE         $1601
15C3: BD 98 2F       JSR         $982F
15C6: 9E 30          LDX         $30
15C8: E7 80          STB         ,X+
15CA: 9F 30          STX         $30
15CC: 9C 33          CMPX        $33
15CE: 26 F3          BNE         $15C3
15D0: 96 0D          LDA         $0D
15D2: 81 16          CMPA        #$16
15D4: 26 17          BNE         $15ED
15D6: 96 C7          LDA         $C7
15D8: 84 7F          ANDA        #$7F
15DA: 26 11          BNE         $15ED
15DC: BD 84 79       JSR         $8479
15DF: CC 74 71       LDD         #$7471		; VDB handler to ROMLOW $0471 
15E2: ED 22          STD         +$02,Y		;
15E4: 86 17          LDA         #$17
15E6: A7 24          STA         +$04,Y
15E8: BD 84 AE       JSR         $84AE
15EB: 0B 4F	     fdb	 $0B4F
15ED: BD 84 79       JSR         $8479
15F0: CC 74 71       LDD         #$7471		; VDB handler to ROMLOW $0471
15F3: ED 22          STD         +$02,Y		;
15F5: 96 0D          LDA         $0D
15F7: A7 24          STA         +$04,Y
15F9: BD 84 AE       JSR         $84AE
15FC: 0B 4F	     fdb	 $0B4F
15FE: 7E 8D 44       JMP         $8D44

------------------------------------------------
--- rx'ed all sequence dump alert --------------
------------------------------------------------
1601: C1 21          CMPB        #$21
1603: 26 02          BNE         $1607
1605: 20 04          BRA         $160B

------------------------------------------------
--- rx'ed ESQ1 all sequence dump alert ---------
------------------------------------------------
1607: C1 03          CMPB        #$03		; ESQ1 ASD alert
1609: 26 2F          BNE         $163A
160B: 0D E5          TST         $E5
160D: 2A 29          BPL         $1638
160F: BD 98 2F       JSR         $982F
1612: D7 34          STB         $34
1614: BD 98 2F       JSR         $982F
1617: 1F 98          TFR         B,A
1619: 97 33          STA         $33
161B: D6 34          LDB         $34
161D: 83 00 01       SUBD        #$0001
1620: 34 06          PSHS        B,A
1622: DC D3          LDD         $D3
1624: 83 00 01       SUBD        #$0001
1627: 10 A3 E1       CMPD        ,S++
162A: 25 07          BCS         $1633

------------------------------------------------
--- rx'ed ESQ1 all sequence dump alert type 1 --
------------------------------------------------
162C: CC 92 E8       LDD         #$92E8		; prepare ESQ1 ASD1 handler
162F: 8D 6D          BSR         $169E
1631: 20 05          BRA         $1638

------------------------------------------------
--- rx'ed ESQ1 all sequence dump alert type 2 --
------------------------------------------------
1633: CC 93 75       LDD         #$9375		; prepare ESQ1 ASD2 handler
1636: 8D 66          BSR         $169E
1638: 20 61          BRA         $169B

------------------------------------------------
--- rx'ed one sequence dump alert --------------
------------------------------------------------
163A: C1 07          CMPB        #$07		; OSD alert?
163C: 26 33          BNE         $1671
163E: 0D E5          TST         $E5
1640: 2A 2D          BPL         $166F		; MIDI rx handler from stack
1642: BD 98 2F       JSR         $982F
1645: D7 34          STB         $34
1647: BD 98 2F       JSR         $982F
164A: 1F 98          TFR         B,A
164C: D6 34          LDB         $34
164E: F3 01 21       ADDD        $0121
1651: 10 B3 01 23    CMPD        $0123
1655: 24 13          BCC         $166A
1657: BD A7 0A       JSR         $A70A		; misc. panel (tx, IRQ)
165A: 25 07          BCS         $1663

------------------------------------------------
--- rx'ed one sequence dump alert type 1 -------
------------------------------------------------
165C: CC 92 E8       LDD         #$92E8		; prepare ASD1 alert handler
165F: 8D 3D          BSR         $169E
1661: 20 05          BRA         $1668		; MIDI rx handler from stack

------------------------------------------------
--- rx'ed one sequence dump alert type 3 -------
------------------------------------------------
1663: CC 93 7E       LDD         #$937E		; prepare OSD3 alert handler
1666: 8D 36          BSR         $169E
1668: 20 05          BRA         $166F		; MIDI rx handler from stack

------------------------------------------------
--- rx'ed one sequence dump alert type 2 -------
------------------------------------------------
166A: CC 93 75       LDD         #$9375		; prepare OSD2 alert handler
166D: 8D 2F          BSR         $169E
166F: 20 2A          BRA         $169B		; MIDI rx handler from stack

------------------------------------------------
--- rx'ed current program dump request ---------
------------------------------------------------
1671: C1 09          CMPB        #$09
1673: 26 07          BNE         $167C
1675: CC 91 23       LDD         #$9123		; prepare CPD request handler
1678: 8D 24          BSR         $169E
167A: 20 1F          BRA         $169B		; MIDI rx handler from stack

------------------------------------------------
--- rx'ed all program dump request -------------
------------------------------------------------
167C: C1 0A          CMPB        #$0A
167E: 26 07          BNE         $1687
1680: CC 91 47       LDD         #$9147		; prepare APD request handler
1683: 8D 19          BSR         $169E
1685: 20 14          BRA         $169B		; MIDI rx handler from stack

------------------------------------------------
--- rx'ed all sequence dump request ------------
------------------------------------------------
1687: C1 22          CMPB        #$22
1689: 26 07          BNE         $1692
168B: CC 92 38       LDD         #$9238		; prepare ASD request handler
168E: 8D 0E          BSR         $169E
1690: 20 09          BRA         $169B		; MIDI rx handler from stack

------------------------------------------------
--- rx'ed one sequence dump request ------------ 
------------------------------------------------
1692: C1 0C          CMPB        #$0C
1694: 26 05          BNE         $169B
1696: CC 92 7D       LDD         #$927D		; prepare OSD request handler
1699: 8D 03          BSR         $169E
169B: 7E 8D 44       JMP         $8D44		; MIDI rx handler from stack

------------------------------------------------
--- VDB handler = $a649, U=$0b4f ---------------
------------------------------------------------
169E: BD 84 79       JSR         $8479
16A1: ED 26          STD         +$06,Y
16A3: CC A6 49       LDD         #$A649		; VDB handler to $a649
16A6: ED 22          STD         +$02,Y		;
16A8: BD 84 AE       JSR         $84AE
16AB: 0B 4F	     fdb	 $0B4F
16AD: 39             RTS  

------------------------------------------------
--- transmit sysex header ----------------------
------------------------------------------------
16AE: 86 04          LDA         #$04		; enable tx A
16B0: B7 64 02       STA         $6402
16B3: C6 F0          LDB         #$F0		; transmit sysex header
16B5: BD 98 0D       JSR         $980D		;
16B8: C6 0F          LDB         #$0F		;
16BA: 7E 98 0D       JMP         $980D		;

------------------------------------------------
--- transmit single program dump header --------
------------------------------------------------
16BD: 8D EF          BSR         $16AE		; transmit sysex header
16BF: C6 01          LDB         #$01		; single program dump
16C1: 7E 98 0D       JMP         $980D

------------------------------------------------
--- transmit all program dump header -----------
------------------------------------------------
16C4: 8D E8          BSR         $16AE		; transmit sysex header
16C6: C6 02          LDB         #$02		; all program dump
16C8: BD 98 0D       JSR         $980D
16CB: D6 DE          LDB         $DE		; transmit MIDI channel
16CD: 7E 98 0D       JMP         $980D	

------------------------------------------------
--- check for Ensoniq SysEx header -------------
------------------------------------------------
16D0: 6F E2          CLR         ,-S
16D2: A6 E4          LDA         ,S
16D4: 81 14          CMPA        #$14
16D6: 26 03          BNE         $96DB
16D8: 7E 90 F0       JMP         $90F0
------------------------------------------------
16DB: BD 97 D5       JSR         $97D5		; MIDI receive (retry on error)
16DE: 6C E4          INC         ,S
16E0: C1 F0          CMPB        #$F0		; SysEx status byte?
16E2: 26 EE          BNE         $96D2		; no
16E4: 32 61          LEAS        +$01,S
16E6: BD 97 D5       JSR         $97D5		; MIDI receive
16E9: C1 0F          CMPB        #$0F		; Ensoniq ID code?
16EB: 10 26 FA 01    LBNE        $90F0		; no -> $90f0
16EF: 39             RTS  

------------------------------------------------
--- check for Mirage format wave sample requests 
-----------------------------------------------
16F0: 8D DE          BSR         $96D0		; check for Ensoniq header
16F2: BD 97 D5       JSR         $97D5		; MIDI receive
16F5: C1 01          CMPB        #$01		; Mirage product ID?
16F7: 10 26 F9 F5    LBNE        $90F0		; no -> $90f0
16FB: 7E 97 D5       JMP         $97D5		; MIDI receive

------------------------------------------------
--- check for ESQ/SQ80 SysEx header ------------
------------------------------------------------
16FE: 8D D0          BSR         $96D0		; check for Ensoniq header
1700: BD 97 D5       JSR         $97D5		; MIDI receive
1703: C1 02          CMPB        #$02		; ESQ/SQ80 product ID?
1705: 10 26 F9 E7    LBNE        $90F0
1709: BD 97 D5       JSR         $97D5		; MIDI receive
170C: D1 DE          CMPB        $DE		; correct MIDI channel?
170E: 10 26 F9 DE    LBNE        $90F0		; no -> $90f0
1712: 7E 97 D5       JMP         $97D5		; MIDI receive

------------------------------------------------
1715: D6 32          LDB         $32
1717: C4 7F          ANDB        #$7F
1719: 8D 18          BSR         $1733
171B: 8D D3          BSR         $16F0
171D: C1 09          CMPB        #$09
171F: 27 07          BEQ         $1728
1721: 86 02          LDA         #$02
1723: 97 0D          STA         $0D
1725: 7E 90 F0       JMP         $90F0

------------------------------------------------
--- DUART: reset error / break, disable MIDI ---
------------------------------------------------
1728: 86 4A          LDA         #$4A		; reset error, disable tx/rx
172A: B7 64 02       STA         $6402
172D: 86 5A          LDA         #$5A		; reset break, disable tx/rx
172F: B7 64 02       STA         $6402
1732: 39             RTS  

------------------------------------------------
--- DUART: reset error/break, finish sysex -----
------------------------------------------------
1733: BD 98 0D       JSR         $980D		; transmit B via MIDI
1736: 86 40          LDA         #$40		; reset error
1738: B7 64 02       STA         $6402
173B: 86 51          LDA         #$51		; reset break, enable rx
173D: B7 64 02       STA         $6402
1740: C6 F7          LDB         #$F7		; transmit EOX
1742: BD 98 0D       JSR         $980D		;
1745: 86 48          LDA         #$48		; reset error, disable tx
1747: B7 64 02       STA         $6402		
174A: 86 58          LDA         #$58		; reset break, disable tx
174C: B7 64 02       STA         $6402
174F: 39             RTS  

------------------------------------------------
1750: 34 04          PSHS        B		; transmit low nibble
1752: C4 0F          ANDB        #$0F
1754: BD 98 0D       JSR         $980D
1757: 86 40          LDA         #$40		; reset error
1759: B7 64 02       STA         $6402
175C: 86 20          LDA         #$20		; reset receiver
175E: B7 64 02       STA         $6402
1761: 86 51          LDA         #$51		; reset break, enable rx
1763: B7 64 02       STA         $6402
1766: 35 04          PULS        B		; transmit high nibble
1768: 54             LSRB 
1769: 54             LSRB 
176A: 54             LSRB 
176B: 54             LSRB 
176C: BD 97 33       JSR         $9733
176F: BD 96 F0       JSR         $96F0
1772: C1 0C          CMPB        #$0C
1774: 26 39          BNE         $17AF
1776: BD 97 D5       JSR         $97D5		; MIDI receive
1779: D7 32          STB         $32
177B: BD 97 D5       JSR         $97D5		; MIDI receive 
177E: BD 97 F6       JSR         $97F6		; receive low nibble
1781: BD 97 F6       JSR         $97F6		;	
1784: BD 97 F6       JSR         $97F6		; receive high nibble
1787: BD 97 F6       JSR         $97F6		;
178A: 34 04          PSHS        B
178C: DC 30          LDD         $30
178E: AD 9F 0B E7    JSR         [$0BE7]
1792: 32 61          LEAS        +$01,S
1794: C3 00 01       ADDD        #$0001
1797: DD 30          STD         $30
1799: 10 93 33       CMPD        $33
179C: 26 E9          BNE         $1787
179E: BD 97 D5       JSR         $97D5
17A1: 34 04          PSHS        B
17A3: 96 32          LDA         $32
17A5: 84 7F          ANDA        #$7F
17A7: A1 E0          CMPA        ,S+
17A9: 26 04          BNE         $17AF
17AB: 1A 01          ORCC        #$01		; set carry
17AD: 20 02          BRA         $17B1

------------------------------------------------
--- DUART: reset error / break, get last rx-byte
------------------------------------------------
17AF: 1C FE          ANDCC       #$FE		; enable IRQ
17B1: 86 4A          LDA         #$4A		; reset error, disable rx/tx
17B3: B7 64 02       STA         $6402
17B6: 86 5A          LDA         #$5A		; reset break, disable rx/tx
17B8: B7 64 02       STA         $6402
17BB: B6 64 03       LDA         $6403		; get received byte
17BE: 39             RTS  
------------------------------------------------
17BF: 1F 01          TFR         D,X
17C1: A6 62          LDA         +$02,S
17C3: A7 84          STA         ,X
17C5: 1F 10          TFR         X,D
17C7: 39             RTS  

------------------------------------------------
17C8: 8D 03          BSR         $17CD
17CA: 7E 86 36       JMP         $8636

------------------------------------------------
--- delay loop ---------------------------------
------------------------------------------------
17CD: 8E 04 E2       LDX         #$04E2		; for x=#$04e2 downto 0 ; do
17D0: 30 1F          LEAX        -$01,X
17D2: 26 FC          BNE         $17D0
17D4: 39             RTS  

------------------------------------------------
--- MIDI receive retry on error ----------------
------------------------------------------------
17D5: 5F             CLRB 
17D6: 96 1F          LDA         $1F		; get timeout countoff
17D8: DD 35          STD         $35		; init counter
17DA: 9E 35          LDX         $35		; count down
17DC: 30 1F          LEAX        -$01,X
17DE: 9F 35          STX         $35
17E0: 26 03          BNE         $17E5		; if not timeout retry
17E2: 7E 90 F0       JMP         $90F0		; timeout handler 

------------------------------------------------
--- MIDI receive on error/break ----------------
------------------------------------------------
17E5: B6 64 01       LDA         $6401		; get status	
17E8: 85 01          BITA        #$01		; rxdy?
17EA: 27 EE          BEQ         $17DA
17EC: 85 70          BITA        #$70		; error not break?
17EE: 10 26 F8 FE    LBNE        $10F0
17F2: F6 64 03       LDB         $6403		; get received byte
17F5: 39             RTS  

------------------------------------------------
--- receive two bytes, add to checksum & merge -
------------------------------------------------
17F6: 8D DD          BSR         $17D5		; MIDI receive
17F8: 34 04          PSHS        B		; save received
17FA: DB 32          ADDB        $32		; add to MIDI checksum
17FC: D7 32          STB         $32
17FE: 8D D5          BSR         $17D5		; MIDI receive
1800: 1F 98          TFR         B,A
1802: 9B 32          ADDA        $32		; add to MIDI checksum
1804: 97 32          STA         $32
1806: 58             LSLB			; high to low nibble 
1807: 58             LSLB 
1808: 58             LSLB 
1809: 58             LSLB 
180A: EA E0          ORB         ,S+		; OR with first RXed byte
180C: 39             RTS  

------------------------------------------------
--- transmit B via MIDI (DUART channel A) ------
------------------------------------------------
180D: B6 64 01       LDA         $6401		; status A
1810: 85 04          BITA        #$04		; wait for tx ready
1812: 27 F9          BEQ         $180D
1814: F7 64 03       STB         $6403		; transmit B on channel A
1817: 39             RTS  

------------------------------------------------
--- transmit 8 bit as 2x 4bit & calc checksum --
------------------------------------------------
1818: 34 04          PSHS        B		; save b
181A: C4 0F          ANDB        #$0F		; get low nibble
181C: 8D EF          BSR         $180D		; transmit low nibble
181E: DB 32          ADDB        $32		; calculate checksum
1820: D7 32          STB         $32		; write back
1822: 35 04          PULS        B		; restore B
1824: 54             LSRB 			; b=b>>4
1825: 54             LSRB 
1826: 54             LSRB 
1827: 54             LSRB 
1828: 8D E3          BSR         $180D		; transmit B
182A: DB 32          ADDB        $32		; calculate checksum
182C: D7 32          STB         $32
182E: 39             RTS  

------------------------------------------------
182F: 35 06          PULS        B,A
1831: DD 39          STD         $39
1833: BD 8C 66       JSR         $8C66		; rx handler stack->$1c
1836: D7 20          STB         $20
1838: BD 8C 66       JSR         $8C66		; rx handler stack->$1c
183B: 58             LSLB 
183C: 58             LSLB 
183D: 58             LSLB 
183E: 58             LSLB 
183F: DA 20          ORB         $20
1841: 6E 9F 00 39    JMP         [$0039]

------------------------------------------------
--- send device ID message ---------------------
------------------------------------------------
1845: BD 90 DD       JSR         $90DD
1848: 86 04          LDA         #$04		; enable tx;
184A: B7 64 02       STA         $6402
184D: C6 F0          LDB         #$F0		; sysex header
184F: 8D BC          BSR         $180D
1851: C6 7E          LDB         #$7E		; non real time message
1853: 8D B8          BSR         $180D
1855: D6 DE          LDB         $DE		; MIDI channel ($DE)
1857: 8D B4          BSR         $180D
1859: C6 06          LDB         #$06		; general information msg. code
185B: 8D B0          BSR         $180D
185D: C6 02          LDB         #$02		; device ID message code
185F: 8D AC          BSR         $180D
1861: C6 0F          LDB         #$0F		; Ensoniq sysex manf. code
1863: 8D A8          BSR         $180D
1865: C6 02          LDB         #$02		; ESQ1/SQ80 family code lsb
1867: 8D A4          BSR         $180D
1869: 5F             CLRB 			; ESQ1/SQ80 family code msb
186A: 8D A1          BSR         $180D
186C: C6 03          LDB         #$03		; SQ80 family member code lsb
186E: 8D 9D          BSR         $180D
1870: 5F             CLRB 			; SQ80 family member code msb
1871: 8D 9A          BSR         $180D
1873: 5F             CLRB 			; software revision info (1)
1874: 8D 97          BSR         $180D
1876: 5F             CLRB 			; software revision info (2)
1877: 8D 94          BSR         $180D
1879: CC 01 50       LDD         #$0150		; software number
187C: 34 02          PSHS        A
187E: 8D 8D          BSR         $180D		; major software version
1880: E6 E0          LDB         ,S+		; minor software version
1882: 8D 89          BSR         $180D
1884: C6 F7          LDB         #$F7		; EOX
1886: D7 17          STB         $17		; set last command
1888: 8D 83          BSR         $180D		; transmix EOX
188A: 7E 90 F0       JMP         $90F0

------------------------------------------------
188D: BD 86 02       JSR         $8602
1890: BD 89 B0       JSR         $89B0
1893: 86 05          LDA         #$05		; enable tx/rx
1895: B7 64 02       STA         $6402
1898: 8E 00 00       LDX         #$0000
189B: 34 04          PSHS        B
189D: 1F 10          TFR         X,D
189F: BD D8 16       JSR         $D816
18A2: B6 64 01       LDA         $6401		; get mode A
18A5: 84 04          ANDA        #$04		
18A7: 27 F9          BEQ         $18A2		; even parity
18A9: 35 04          PULS        B		; odd parity
18AB: F7 64 03       STB         $6403
18AE: 30 01          LEAX        +$01,X
18B0: BC 01 21       CMPX        $0121
18B3: 27 0C          BEQ         $18C1
18B5: C1 F7          CMPB        #$F7
18B7: 26 08          BNE         $18C1
18B9: 10 8E 92 7C    LDY         #$927C
18BD: 31 3F          LEAY        -$01,Y
18BF: 26 FC          BNE         $18BD
18C1: BC 01 21       CMPX        $0121
18C4: 26 D5          BNE         $189B
18C6: 86 08          LDA         #$08		; disable tx
18C8: B7 64 02       STA         $6402
18CB: BD 86 93       JSR         $8693
18CE: 39             RTS  
------------------------------------------------
18CF: CC 0B F3       LDD         #$0BF3
18D2: FD 0C F3       STD         $0CF3
18D5: FD 0C F5       STD         $0CF5
18D8: 86 01          LDA         #$01
18DA: 97 CC          STA         $CC
18DC: FC 0D EF       LDD         $0DEF
18DF: 26 0B          BNE         $18EC
18E1: 96 B1          LDA         $B1
18E3: 27 07          BEQ         $18EC
18E5: CE A2 05       LDU         #$A205
18E8: 8D 53          BSR         $193D
18EA: 0F B1          CLR         $B1
18EC: BE 0C F5       LDX         $0CF5
18EF: BC 0C F3       CMPX        $0CF3
18F2: 26 05          BNE         $18F9
18F4: BD 83 F3       JSR         $83F3
18F7: 20 3F          BRA         $1938
------------------------------------------------
18F9: E6 80          LDB         ,X+
18FB: 34 04          PSHS        B
18FD: FC 01 21       LDD         $0121		; get SEQRAM address
1900: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
1903: 32 61          LEAS        +$01,S		; get next byte
1905: 10 83 FF FF    CMPD        #$FFFF
1909: 26 06          BNE         $1911
190B: CE A1 6F       LDU         #$A16F		; voice block to $a16f
190E: 4F             CLRA 
190F: 20 2C          BRA         $193D
------------------------------------------------
1911: C3 00 01       ADDD        #$0001
1914: FD 01 21       STD         $0121
1917: FC 0D EF       LDD         $0DEF
191A: 26 0B          BNE         $1927
191C: 96 B1          LDA         $B1
191E: 26 07          BNE         $1927
1920: CE A1 6F       LDU         #$A16F		; VDB handler to $a16f
1923: 86 F0          LDA         #$F0
1925: 8D 16          BSR         $193D
1927: CC 00 64       LDD         #$0064
192A: FD 0D EF       STD         $0DEF
192D: 8C 0C F3       CMPX        #$0CF3
1930: 26 03          BNE         $1935
1932: 8E 0B F3       LDX         #$0BF3
1935: BF 0C F5       STX         $0CF5
1938: 96 CC          LDA         $CC
193A: 26 A0          BNE         $18DC
193C: 39             RTS  

------------------------------------------------
193D: BD 84 79       JSR         $8479
1940: EF 22          STU         +$02,Y
1942: A7 24          STA         +$04,Y
1944: BD 84 BA       JSR         $84BA
1947: 0B             FDB	 $0B4F
1949: 39             RTS  

------------------------------------------------
194A: CC 0C F7       LDD         #$0CF7
194D: DD 3B          STD         $3B
194F: DD 3D          STD         $3D
1951: 0F 3F          CLR         $3F
1953: 39             RTS  

------------------------------------------------
--- print system messages from ROMLOW $5000 ----
--- pointed to by U ----------------------------
------------------------------------------------
1954: 8D 23          BSR         $1979		; clear display
1956: C6 0A          LDB         #$0A		; select ROMLOW $5000
1958: 20 04          BRA         $195E

------------------------------------------------
--- print system messages from ROMLOW $6000 ----
--- pointed to by U ----------------------------
------------------------------------------------
195A: 8D 1D          BSR         $1979		; CLS
195C: C6 0C          LDB         #$0C		; select ROMLOW $6000
195E: 86 0E          LDA         #$0E		
1960: FD 64 0E       STD         $640E
1963: 34 46          PSHS        U,B,A		; save U, D
1965: A6 C0          LDA         ,U+		; get text		
1967: 27 0B          BEQ         $1974		; end of text reached?
1969: 8D 16          BSR         $1981		; print text
196B: EC E4          LDD         ,S		; get ROMLOW from stack
196D: FD 64 0E       STD         $640E		; switch ROMLOW
1970: A6 C0          LDA         ,U+		; get text
1972: 20 F3          BRA         $1967		; print loop
------------------------------------------------
1974: BD 85 A0       JSR         $85A0		; restore outport
1977: 35 C6          PULS        PC,U,B,A

------------------------------------------------
--- clear display ------------------------------
------------------------------------------------
1979: 86 D6          LDA         #$D6		; cls character	
197B: 20 04          BRA         $1981

------------------------------------------------
--- print characters chr(A) and chr(B) ---------
------------------------------------------------
197D: 8D 02          BSR         $1981
197F: 1F 98          TFR         B,A

------------------------------------------------
--- print character A to display ---------------
------------------------------------------------
1981: 34 10          PSHS        X		; save x
1983: 9E 3B          LDX         $3B		; display start address
1985: 1A 10          ORCC        #$10		; disable IRQ
1987: A7 80          STA         ,X+		; write A to display
1989: 0C 3F          INC         $3F
198B: 8C 0D 07       CMPX        #$0D07		; end of video buffer
198E: 25 03          BCS         $1993
1990: 8E 0C F7       LDX         #$0CF7		; set cursor
1993: 9F 3B          STX         $3B		; to base
1995: 86 04          LDA         #$04		; enable tx
1997: B7 64 0A       STA         $640A
199A: 96 3F          LDA         $3F
199C: 81 0E          CMPA        #$0E
199E: 25 11          BCS         $19B1
19A0: B6 0B 51       LDA         $0B51
19A3: 8A 04          ORA         #$04
19A5: B7 0B 51       STA         $0B51
19A8: 1C EF          ANDCC       #$EF		; enable IRQ
19AA: 34 74          PSHS        U,Y,X,B
19AC: BD 83 F3       JSR         $83F3		; jump to handler routine
19AF: 35 74          PULS        U,Y,X,B
19B1: 1C EF          ANDCC       #$EF		; enable IRQ
19B3: 35 90          PULS        PC,X

------------------------------------------------
--- front panel txrdy interrupt ----------------
------------------------------------------------
19B5: 96 3F          LDA         $3F		; something to transmit?
19B7: 26 0E          BNE         $19C7		; yes -> $99b7
19B9: 86 08          LDA         #$08		; disable txB
19BB: B7 64 0A       STA         $640A		;
19BE: B6 0B 51       LDA         $0B51
19C1: 84 FB          ANDA        #$FB		; skip bit 2
19C3: B7 0B 51       STA         $0B51	
19C6: 3B             RTI  

------------------------------------------------
--- transmit display buffer --------------------
------------------------------------------------
19C7: 9E 3D          LDX         $3D		; transmit from [$3D]
19C9: A6 80          LDA         ,X+		;   to $0d07
19CB: B7 64 0B       STA         $640B
19CE: 8C 0D 07       CMPX        #$0D07
19D1: 25 03          BCS         $19D6
19D3: 8E 0C F7       LDX         #$0CF7		; reset display buffer to
19D6: 9F 3D          STX         $3D		;   $0cf7
19D8: 0A 3F          DEC         $3F		; 
19DA: 3B             RTI  

------------------------------------------------
--- set output port to $8040 -------------------
------------------------------------------------
19DB: 86 80          LDA         #$80		; outport $8040
19DD: B7 64 0E       STA         $640E
19E0: 86 40          LDA         #$40
19E2: B7 64 0F       STA         $640F
19E5: 39             RTS  

------------------------------------------------
--- counter IRQ handler ------------------------
------------------------------------------------
19E6: B6 64 0F       LDA         $640F		; stop counter
19E9: D6 42          LDB         $42
19EB: 5A             DECB 
19EC: 26 05          BNE         $19F3
19EE: 86 C0          LDA         #$C0		; set output = $C0
19F0: B7 64 0E       STA         $640E
19F3: 2B 02          BMI         $19F7
19F5: D7 42          STB         $42
19F7: 8D 35          BSR         $1A2E
19F9: BD 84 F2       JSR         $84F2
19FC: 96 E5          LDA         $E5
19FE: 26 14          BNE         $1A14
1A00: DC 40          LDD         $40
1A02: D3 EB          ADDD        $EB
1A04: DD 40          STD         $40
1A06: 83 09 C4       SUBD        #$09C4
1A09: 25 09          BCS         $1A14
1A0B: DD 40          STD         $40
1A0D: BD 9A 94       JSR         $9A94
1A10: 8D 1C          BSR         $1A2E
1A12: 1C FE          ANDCC       #$FE		; clear carry
1A14: 96 E5          LDA         $E5
1A16: 81 02          CMPA        #$02
1A18: 26 11          BNE         $1A2B
1A1A: 96 43          LDA         $43
1A1C: 27 0D          BEQ         $1A2B
1A1E: 4A             DECA 
1A1F: 26 08          BNE         $1A29
1A21: B6 64 04       LDA         $6404		; clear input port change
1A24: 86 61          LDA         #$61		; x1/CLK, delta IP 0
1A26: B7 64 04       STA         $6404
1A29: 97 43          STA         $43
1A2B: 7E 99 B5       JMP         $99B5		; front panel txrdy handler

------------------------------------------------
--- store ($FA) to $640F-($FB) -----------------
------------------------------------------------
1A2E: 8E 64 0F       LDX         #$640F		
1A31: D6 FB          LDB         $FB
1A33: 50             NEGB 
1A34: 96 FA          LDA         $FA
1A36: A7 85          STA         B,X
1A38: 5C             INCB 
1A39: 26 02          BNE         $1A3D
1A3B: D7 FB          STB         $FB
1A3D: 39             RTS  

------------------------------------------------
--- inport change IRQ handler ------------------
------------------------------------------------
1A3E: B6 64 04       LDA         $6404		; clear inport change reg.
1A41: 96 E5          LDA         $E5		; if $e5=2 then return
1A43: 81 02          CMPA        #$02
1A45: 26 0C          BNE         $1A53
1A47: BD 9A 94       JSR         $9A94		; else jsr $9a94
1A4A: 86 08          LDA         #$08		;   $43 = 8
1A4C: 97 43          STA         $43
1A4E: 86 60          LDA         #$60		;   txB clock = x1/CLK
1A50: B7 64 04       STA         $6404
1A53: 3B             RTI  

------------------------------------------------
1A54: 96 E5          LDA         $E5
1A56: 1F 89          TFR         A,B
1A58: 8A 80          ORA         #$80
1A5A: 97 E5          STA         $E5
1A5C: 86 C0          LDA         #$C0		; outport $C040
1A5E: B7 64 0E       STA         $640E
1A61: 86 40          LDA         #$40
1A63: B7 64 0F       STA         $640F
1A66: 86 60          LDA         #$60		; timer clk x1
1A68: B7 64 04       STA         $6404
1A6B: B6 64 04       LDA         $6404		; get inport
1A6E: 39             RTS  

------------------------------------------------
1A6F: 0F 43          CLR         $43
1A71: 0F 42          CLR         $42
1A73: 0F 40          CLR         $40
1A75: 0F 41          CLR         $41
1A77: B6 02 C6       LDA         $02C6
1A7A: 26 17          BNE         $1A93
1A7C: 96 E5          LDA         $E5
1A7E: 84 7F          ANDA        #$7F
1A80: 97 E5          STA         $E5
1A82: 26 03          BNE         $1A87
1A84: 7E 9A 94       JMP         $9A94
------------------------------------------------
1A87: 81 02          CMPA        #$02
1A89: 26 08          BNE         $1A93
1A8B: B6 64 04       LDA         $6404
1A8E: 86 61          LDA         #$61		; clk x1 / ip0 int on
1A90: B7 64 04       STA         $6404		
1A93: 39             RTS  

------------------------------------------------
1A94: 86 C0          LDA         #$C0		; select ROMLOW $6000
1A96: B7 64 0F       STA         $640F
1A99: 86 05          LDA         #$05
1A9B: 97 42          STA         $42
1A9D: BD 8C 14       JSR         $8C14
1AA0: BD 84 79       JSR         $8479
1AA3: CC 00 0E       LDD         #$000E
1AA6: ED 22          STD         +$02,Y
1AA8: BD 84 AE       JSR         $84AE
1AAB: 0B 6D	     fdb	 $0B6D
1AAD: 96 E5          LDA         $E5
1AAF: 2B 03          BMI         $1AB4
1AB1: 7E DA 9E       JMP         $DA9E
------------------------------------------------
1AB4: 39             RTS  

------------------------------------------------
--- select ROMLOW page stored in $0ddd ---------
------------------------------------------------
1AB5: F6 0D DD       LDB         $0DDD		; outport $0e[$0ddd]
1AB8: 86 0E          LDA         #$0E
1ABA: FD 64 0E       STD         $640E		; select ROMLOW page
1ABD: 39             RTS  

------------------------------------------------
--- step through RAM area $4000-$5FFF ----------
------------------------------------------------
1ABE: 31 21          LEAY        +$01,Y		; Y++	
1AC0: 11 83 60 00    CMPU        #$6000		; end of muxRAM area?
1AC4: 26 0F          BNE         $1AD5		; no, return
1AC6: CE 40 00       LDU         #$4000		; select muxed RAM
1AC9: B6 0D DD       LDA         $0DDD		; increment ROMLOW page
1ACC: 8B 02          ADDA        #$02		;
1ACE: 84 0E          ANDA        #$0E		;
1AD0: B7 0D DD       STA         $0DDD		;
1AD3: 20 E0          BRA         $1AB5		; select ROMLOW page
------------------------------------------------
1AD5: 39             RTS  

------------------------------------------------
--- transfer DOSRAM to SEQRAM ------------------
------------------------------------------------
1AD6: 34 40          PSHS        U		; save U
1AD8: 8D DB          BSR         $1AB5		; select ROMLOW page
1ADA: 8E 50 00       LDX         #$5000		; RAM base = $5000
1ADD: 1F 20          TFR         Y,D		; save Y
1ADF: 31 3F          LEAY        -$01,Y		; Y--
1AE1: 84 1F          ANDA        #$1F		; Y to page boundary $0100
1AE3: C3 40 00       ADDD        #$4000		; DOSRAM base + page Y
1AE6: 1F 03          TFR         D,U		; to U
1AE8: B6 0D D7       LDA         $0DD7
1AEB: 81 00          CMPA        #$00
1AED: 26 1A          BNE         $1B09
1AEF: 86 01          LDA         #$01		; mapper = 1
1AF1: B7 6C 00       STA         $6C00
1AF4: E6 80          LDB         ,X+		; get DOSRAM data
1AF6: 7F 6C 00       CLR         $6C00		; mapper = 0
1AF9: E7 C0          STB         ,U+		; transfer it to SEQRAM p. Y
1AFB: 8D C1          BSR         $1ABE		; increment muxRAM pointer
1AFD: AC E4          CMPX        ,S
1AFF: 24 06          BCC         $1B07
1B01: 10 BC 0D D5    CMPY        $0DD5		; transfer end address?
1B05: 26 E8          BNE         $1AEF		; no, transfer next byte
1B07: 20 20          BRA         $1B29

------------------------------------------------
--- transfer data from SEQRAM to DOSRAM --------
------------------------------------------------
1B09: 7F 6C 00       CLR         $6C00		; mapper = 0
1B0C: E6 C0          LDB         ,U+		; get SEQRAM data
1B0E: 86 01          LDA         #$01		; mapper = 1
1B10: B7 6C 00       STA         $6C00		; transfer it to DOSRAM
1B13: E7 80          STB         ,X+
1B15: 8D A7          BSR         $1ABE		; increment muxRAM pointer
1B17: AC E4          CMPX        ,S
1B19: 24 06          BCC         $1B21
1B1B: 10 BC 0D D5    CMPY        $0DD5		; transfer end address?
1B1F: 26 E8          BNE         $1B09		; no, transfer next byte
1B21: AC E4          CMPX        ,S
1B23: 24 04          BCC         $1B29
1B25: 6F 80          CLR         ,X+
1B27: 20 F8          BRA         $1B21

------------------------------------------------
--- select DOSRAM and ROMLOW $2000 -------------
------------------------------------------------
1B29: 86 01          LDA         #$01		; mapper = 1 (DOSRAM)
1B2B: B7 6C 00       STA         $6C00
1B2E: 35 40          PULS        U		; restore U
1B30: CC 0E 04       LDD         #$0E04		; select ROMLOW $2000
1B33: 20 85          BRA         $1ABA		; switch to ROMLOW $2000

------------------------------------------------
--- DISK menu: FORMAT --------------------------
------------------------------------------------
1B35: 10 FF 0D EA    STS         $0DEA		; save stack ptr. to $0dea
1B39: 0F C4          CLR         $C4
1B3B: C1 09          CMPB        #$09
1B3D: 26 12          BNE         $1B51		; b=8?
1B3F: 8E 9C 00       LDX         #$9C00		; softbutton handler to $9c00
1B42: BF 0D 11       STX         $0D11
1B45: CE 79 E1       LDU         #$79E1		; FORMAT DISK ($69e1)
1B48: BD 99 5A       JSR         $995A		; print text
1B4B: CE 79 0D       LDU         #$790D		; *YES* ($590d)
1B4E: 7E 99 56       JMP         $9956		; print text

------------------------------------------------
--- DISK menu: COPY ----------------------------
------------------------------------------------
1B51: C1 08          CMPB        #$08		; soft button 8 pressed?
1B53: 26 03          BNE         $1B58		
1B55: 7E A2 56       JMP         $A256		; yes -> copy handler

------------------------------------------------
--- DISK menu: SAVE ----------------------------
------------------------------------------------
1B58: C1 06          CMPB        #$06		; soft button 6 pressed?
1B5A: 26 0C          BNE         $1B68		
1B5C: 8E 9B A9       LDX         #$9BA9		; softbutton handler to $9ba9
1B5F: BF 0D 11       STX         $0D11		;
1B62: CE 79 7E       LDU         #$797E		; SAVE NEW... ($697e)
1B65: 7E 99 5C       JMP         $995C		; print text

------------------------------------------------
--- DISK menu: LOAD ----------------------------
------------------------------------------------
1B68: C1 07          CMPB        #$07		; soft button 7 pressed?
1B6A: 26 07          BNE         $1B73		
1B6C: 86 02          LDA         #$02		; floppy job = load
1B6E: 8E 7A 70       LDX         #$7A70		; LOAD menu end address
1B71: 20 09          BRA         $1B7C		;	($6a70)

------------------------------------------------
--- DISK menu: DELETE --------------------------
------------------------------------------------
1B73: C1 05          CMPB        #$05		; soft button 5 pressed?
1B75: 26 31          BNE         $1BA8		; return
1B77: 86 80          LDA         #$80		; floppy job = delete
1B79: 8E 7A 7A       LDX         #$7A7A		; DELETE ($6a7a)
1B7C: 97 0D          STA         $0D		; floppy action
1B7E: BF 0D 17       STX         $0D17
1B81: CE 79 9E       LDU         #$799E		; READING DIRECTORY ($699e)
1B84: BD 99 5A       JSR         $995A		; print text
1B87: 86 00          LDA         #$00		; floppy read access?
1B89: D6 0D          LDB         $0D		; get floppy job
1B8B: C1 02          CMPB        #$02		; job = load
1B8D: 27 02          BEQ         $1B91		;   -> $9b91
1B8F: 86 09          LDA         #$09		; floppy write access?
1B91: BD 9E D5       JSR         $9ED5		; check/read floppy
1B94: 8D 32          BSR         $1BC8		; floppy buffer magic
1B96: CE 7A 31       LDU         #$7A31		; SELECT FILE TYPE ($6a31)
1B99: BD 99 5A       JSR         $995A		; print
1B9C: 8E 9C 5C       LDX         #$9C5C		; softbutton handler to	$9c5c
1B9F: BF 0D 11       STX         $0D11		;
1BA2: FE 0D 17       LDU         $0D17		; text base
1BA5: 7E 99 5C       JMP         $995C		; print text
------------------------------------------------
1BA8: 39             RTS  

------------------------------------------------
--- DISK/SAVE menu -----------------------------
------------------------------------------------
1BA9: C1 05          CMPB        #$05		; SAVE NEW FILE button
1BAB: 27 04          BEQ         $1BB1
1BAD: C1 06          CMPB        #$06		; SAVE NEW FILE button
1BAF: 26 07          BNE         $1BB8
1BB1: 86 00          LDA         #$00		; floppy job = save
1BB3: 8E 7A 75       LDX         #$7A75		; [SAVE]
1BB6: 20 C4          BRA         $1B7C
------------------------------------------------
1BB8: C1 08          CMPB        #$08		; UPDATE OLD FILE button
1BBA: 27 04          BEQ         $1BC0
1BBC: C1 09          CMPB        #$09		; UPDATE OLD FILE button
1BBE: 26 07          BNE         $1BC7
1BC0: 86 01          LDA         #$01		; floppy job = update
1BC2: 8E 7A 81       LDX         #$7A81		; [UPDATE]
1BC5: 20 B5          BRA         $1B7C
------------------------------------------------
1BC7: 39             RTS  

------------------------------------------------
--- generate 16bit checksum of floppy buffer ---
------------------------------------------------
1BC8: 34 16          PSHS        X,B,A
1BCA: 8E 47 38       LDX         #$4738		; base of floppy buffer
1BCD: 0F C5          CLR         $C5		; clear checksum	
1BCF: 0F C6          CLR         $C6
1BD1: 4F             CLRA 			; clear MSB
1BD2: E6 80          LDB         ,X+		; LSB = floppy buffer
1BD4: D3 C5          ADDD        $C5		; sum up
1BD6: DD C5          STD         $C5		; store checksum
1BD8: 8C 4F 38       CMPX        #$4F38		; end of floppy buffer
1BDB: 25 F4          BCS         $1BD1
1BDD: 35 96          PULS        PC,X,B,A

------------------------------------------------
--- save new file to disk ----------------------
------------------------------------------------
1BDF: 34 16          PSHS        X,B,A
1BE1: CE 79 BE       LDU         #$79BE		; ACCESSING DISK ($69BE)
1BE4: BD 99 5A       JSR         $995A		; print text
1BE7: 86 00          LDA         #$00		; floppy command: save new
1BE9: BD 9E D5       JSR         $9ED5		; floppy access
1BEC: DC C5          LDD         $C5		; old floppy buffer checksum
1BEE: 34 06          PSHS        B,A		; save
1BF0: 8D D6          BSR         $1BC8		; floppy buffer checksum to $c5
1BF2: DC C5          LDD         $C5
1BF4: 10 A3 E1       CMPD        ,S++
1BF7: 27 05          BEQ         $1BFE
1BF9: 86 08          LDA         #$08
1BFB: 16 02 F2       LBRA        $1EF0
1BFE: 35 96          PULS        PC,X,B,A

------------------------------------------------
--- format disk --------------------------------
------------------------------------------------
1C00: 10 FF 0D EA    STS         $0DEA
1C04: C1 04          CMPB        #$04
1C06: 26 17          BNE         $1C1F
1C08: CE 7A 1D       LDU         #$7A1D		; FORMATTING DISK ($6a1d)
1C0B: BD 99 5A       JSR         $995A		; print text
1C0E: 86 08          LDA         #$08		; floppy command: format
1C10: BD 9E D5       JSR         $9ED5		; floppy access
1C13: 8D 12          BSR         $1C27
1C15: 86 01          LDA         #$01
1C17: BD 9E D5       JSR         $9ED5
1C1A: 86 0E          LDA         #$0E
1C1C: 16 02 D1       LBRA        $1EF0
------------------------------------------------
1C1F: C1 09          CMPB        #$09
1C21: 26 03          BNE         $1C26
1C23: 7E 7A 35       JMP         $7A35
------------------------------------------------
1C26: 39             RTS  

------------------------------------------------
--- clear floppy buffer, store #$5351 to $4F36 -
------------------------------------------------
1C27: 8E 47 38       LDX         #$4738		; clear buffer
1C2A: 6F 80          CLR         ,X+
1C2C: 8C 4F 36       CMPX        #$4F36
1C2F: 25 F9          BCS         $1C2A
1C31: CC 53 51       LDD         #$5351
1C34: ED 81          STD         ,X++
1C36: 39             RTS  

------------------------------------------------
1C37: 34 04          PSHS        B
1C39: C6 0D          LDB         #$0D
1C3B: 81 32          CMPA        #$32
1C3D: 25 02          BCS         $1C41
1C3F: C6 06          LDB         #$06
1C41: A1 E4          CMPA        ,S
1C43: 22 12          BHI         $1C57
1C45: 6D C4          TST         ,U
1C47: 26 09          BNE         $1C52
1C49: 97 C3          STA         $C3
1C4B: FF 0D E3       STU         $0DE3
1C4E: 35 84          PULS        PC,B

------------------------------------------------
1C50: 20 03          BRA         $1C55
------------------------------------------------
1C52: 33 C5          LEAU        B,U
1C54: 4C             INCA 
1C55: 20 EA          BRA         $1C41
------------------------------------------------
1C57: 86 07          LDA         #$07
1C59: 16 02 94       LBRA        $1EF0

------------------------------------------------
--- DISK menu: file type select: PROGRAM -------
------------------------------------------------
1C5C: 10 FF 0D EA    STS         $0DEA
1C60: C1 09          CMPB        #$09		; PROGRAM
1C62: 10 26 00 94    LBNE        $1CFA
1C66: 86 01          LDA         #$01
1C68: 97 C4          STA         $C4
1C6A: CC 32 B1       LDD         #$32B1
1C6D: FD 0D E8       STD         $0DE8
1C70: 0D 0D          TST         $0D
1C72: 26 0D          BNE         $1C81
1C74: CE 49 C2       LDU         #$49C2		; program file area
1C77: 8D BE          BSR         $1C37
1C79: CE 7C 5F       LDU         #$7C5F		; SAVE CURRENT AS
1C7C: 8E 9E AE       LDX         #$9EAE		; handler
1C7F: 20 2D          BRA         $1CAE
------------------------------------------------
1C81: 2A 08          BPL         $1C8B
1C83: CE 7C 8E       LDU         #$7C8E		; DELETE PROGRAM ($6c8e)
1C86: 8E 9F 96       LDX         #$9F96		; handler
1C89: 20 14          BRA         $1C9F
------------------------------------------------
1C8B: D6 0D          LDB         $0D
1C8D: C5 02          BITB        #$02
1C8F: 27 08          BEQ         $1C99
1C91: CE 7C 77       LDU         #$7C77		; LOAD EDIT PROGRAM ($6c77)
1C94: 8E 9E 99       LDX         #$9E99		; handler
1C97: 20 06          BRA         $1C9F
------------------------------------------------
1C99: CE 7C A2       LDU         #$7CA2		; UPDATE PROGRAM ($6ca2)
1C9C: 8E 9E AE       LDX         #$9EAE		; handler
1C9F: C6 07          LDB         #$07
1CA1: D7 A9          STB         $A9
1CA3: C6 7E          LDB         #$7E
1CA5: D7 C8          STB         $C8
1CA7: BD BC AE       JSR         $BCAE
1CAA: C6 32          LDB         #$32
1CAC: D7 C3          STB         $C3
1CAE: BF 0D E5       STX         $0DE5
1CB1: 8E A1 17       LDX         #$A117		; softbutton handler to $a117
1CB4: BF 0D 11       STX         $0D11
1CB7: BD 99 5A       JSR         $995A		; print text
1CBA: CE 79 0D       LDU         #$790D		; YES/NO ($590d)
1CBD: BD 99 56       JSR         $9956		; print text
1CC0: CE 7C B6       LDU         #$7CB6		; PROGRAM FILE ($6cb6)
1CC3: BD 99 5C       JSR         $995C		; print text
1CC6: 86 BA          LDA         #$BA
1CC8: BD 99 81       JSR         $9981		; print text
1CCB: D6 C3          LDB         $C3
1CCD: C0 31          SUBB        #$31
1CCF: 4F             CLRA 
1CD0: BD C3 CA       JSR         $C3CA
1CD3: 86 C0          LDA         #$C0
1CD5: BD 99 81       JSR         $9981		; cursor to pos. $40
1CD8: CC DE E8       LDD         #$DEE8		; hook to $dee8?
1CDB: BD 99 7D       JSR         $997D		; print text
1CDE: 0D 0D          TST         $0D
1CE0: 26 08          BNE         $1CEA
1CE2: BE 0D 07       LDX         $0D07
1CE5: 30 88 C6       LEAX        -$3A,X
1CE8: 20 0A          BRA         $1CF4
------------------------------------------------
1CEA: BD 9E 77       JSR         $9E77
1CED: 6D 84          TST         ,X
1CEF: 26 03          BNE         $1CF4
1CF1: 8E F8 C9       LDX         #$F8C9		; hook to $f8c9?
1CF4: 4F             CLRA 
1CF5: C6 06          LDB         #$06
1CF7: 7E B9 71       JMP         $B971
------------------------------------------------
1CFA: C1 05          CMPB        #$05		; SYS-EX
1CFC: 26 2B          BNE         $1D29
1CFE: 0D 0D          TST         $0D
1D00: 2B 08          BMI         $1D0A
1D02: CE 7B 07       LDU         #$7B07		; * WARNING... ($6b07)
1D05: C6 04          LDB         #$04
1D07: BD BC 20       JSR         $BC20
1D0A: D6 0D          LDB         $0D
1D0C: C4 82          ANDB        #$82
1D0E: 26 12          BNE         $1D22
1D10: 8E A1 3C       LDX         #$A13C		; softbutton handler to $a13c
1D13: BF 0D 11       STX         $0D11
1D16: FC 01 21       LDD         $0121
1D19: FD 0D EC       STD         $0DEC
1D1C: CE 7B 57       LDU         #$7B57		; READY TO RECEIVE ($6757)
1D1F: 7E 99 5A       JMP         $995A		; print text
------------------------------------------------
1D22: 86 05          LDA         #$05
1D24: 8E 7A DC       LDX         #$7ADC		; SYS-EX DATA ($6adc)
1D27: 20 29          BRA         $1D52
------------------------------------------------
1D29: C1 06          CMPB        #$06		; ONE SEQ
1D2B: 26 10          BNE         $1D3D
1D2D: 86 04          LDA         #$04
1D2F: 8E 7A F8       LDX         #$7AF8		; ONE SEQUENCE ($6af8)
1D32: D6 0D          LDB         $0D
1D34: C4 82          ANDB        #$82
1D36: 26 03          BNE         $1D3B
1D38: 8E 7A EB       LDX         #$7AEB		; CURRENT SEQ ($6aeb)
1D3B: 20 15          BRA         $1D52
------------------------------------------------
1D3D: C1 07          CMPB        #$07		; ALL SEQ
1D3F: 26 07          BNE         $1D48
1D41: 86 03          LDA         #$03
1D43: 8E 7A BE       LDX         #$7ABE		; ALL SEQ DATA ($6abe)
1D46: 20 0A          BRA         $1D52
------------------------------------------------
1D48: C1 08          CMPB        #$08		; BANK
1D4A: 27 01          BEQ         $1D4D
1D4C: 39             RTS  
------------------------------------------------
1D4D: 86 02          LDA         #$02
1D4F: 8E 7A CD       LDX         #$7ACD		; INT PROG BANKS ($6acd)
1D52: 97 C4          STA         $C4
1D54: 81 02          CMPA        #$02
1D56: 26 0C          BNE         $1D64
1D58: CE 47 BA       LDU         #$47BA		; pointer to DOSRAM
1D5B: 10 8E 9F 54    LDY         #$9F54		; handler
1D5F: CC 0A 31       LDD         #$0A31		; length of transfer (?)
1D62: 20 0A          BRA         $1D6E
------------------------------------------------
1D64: CE 47 38       LDU         #$4738		; pointer to DOSRAM
1D67: 10 8E 9F B0    LDY         #$9FB0		; handler
1D6B: CC 00 09       LDD         #$0009		; length of transfer (?)
1D6E: 10 BF 0D E5    STY         $0DE5
1D72: FD 0D E8       STD         $0DE8
1D75: 81 0A          CMPA        #$0A
1D77: 26 05          BNE         $1D7E
1D79: 8B 0A          ADDA        #$0A
1D7B: CE 48 3C       LDU         #$483C		; pointer to DOSRAM
1D7E: 0D 0D          TST         $0D
1D80: 26 1F          BNE         $1DA1
1D82: BD 9C 37       JSR         $9C37
1D85: CE 0D 1C       LDU         #$0D1C		; set text base for printing
1D88: FF 0D 17       STU         $0D17		;
1D8B: 86 2E          LDA         #$2E
1D8D: A7 C0          STA         ,U+
1D8F: 11 83 0D 26    CMPU        #$0D26
1D93: 25 F8          BCS         $1D8D
1D95: CE 7A 88       LDU         #$7A88		; AS FILE ($6a88)
1D98: 10 8E 7A 75    LDY         #$7A75		; SAVE ($6a75)
1D9C: CC 85 97       LDD         #$8597		; handler
1D9F: 20 29          BRA         $1DCA
------------------------------------------------
1DA1: 2A 06          BPL         $1DA9
1DA3: 10 8E 7A 7A    LDY         #$7A7A		; DELETE ($6a7a)
1DA7: 20 10          BRA         $1DB9
------------------------------------------------
1DA9: D6 0D          LDB         $0D
1DAB: C4 02          ANDB        #$02
1DAD: 27 06          BEQ         $1DB5
1DAF: 10 8E 7A 70    LDY         #$7A70		; LOAD ($6a70)
1DB3: 20 04          BRA         $1DB9
------------------------------------------------
1DB5: 10 8E 7A 81    LDY         #$7A81		; UPDATE ($6a81)
1DB9: 97 C3          STA         $C3
1DBB: 34 10          PSHS        X
1DBD: 8D 74          BSR         $1E33
1DBF: BF 0D 17       STX         $0D17
1DC2: 35 10          PULS        X
1DC4: CE 7A A7       LDU         #$7AA7		; DISK FILE ($6aa7)
1DC7: CC 87 B2       LDD         #$87B2
1DCA: 34 06          PSHS        B,A
1DCC: BD 99 5A       JSR         $995A
1DCF: 86 80          LDA         #$80		; cursor to position #$00
1DD1: BD 99 81       JSR         $9981		;
1DD4: 1F 23          TFR         Y,U
1DD6: BD 99 5C       JSR         $995C
1DD9: A6 E0          LDA         ,S+
1DDB: BD 99 81       JSR         $9981
1DDE: 1F 13          TFR         X,U
1DE0: BD 99 5C       JSR         $995C
1DE3: 8C 7A EB       CMPX        #$7AEB		; text (which!?)
1DE6: 26 06          BNE         $1DEE
1DE8: 96 F2          LDA         $F2
1DEA: 4C             INCA 
1DEB: BD BB AB       JSR         $BBAB          ; print A
1DEE: BE 0D 17       LDX         $0D17
1DF1: A6 E0          LDA         ,S+
1DF3: 8D 4C          BSR         $1E41
1DF5: CE 79 0D       LDU         #$790D		; YES/NO ($590d)
1DF8: BD 99 56       JSR         $9956
1DFB: 0D 0D          TST         $0D
1DFD: 26 10          BNE         $1E0F
1DFF: CC 0A 08       LDD         #$0A08
1E02: 97 BD          STA         $BD
1E04: BD A5 2D       JSR         $A52D
1E07: CC 7E 08       LDD         #$7E08		; handler
1E0A: 8E A5 2D       LDX         #$A52D		; handler
1E0D: 20 1A          BRA         $1E29
------------------------------------------------
1E0F: 86 B2          LDA         #$B2		; position cursor to #$32
1E11: BD 99 81       JSR         $9981		;
1E14: CC FA 0A       LDD         #$FA0A		; #$fa0a to display
1E17: BD 99 7D       JSR         $997D		;
1E1A: 86 7E          LDA         #$7E
1E1C: D6 C3          LDB         $C3
1E1E: C1 0A          CMPB        #$0A
1E20: 24 02          BCC         $1E24
1E22: 86 78          LDA         #$78
1E24: C6 09          LDB         #$09
1E26: 8E A1 17       LDX         #$A117		; softbutton handler to $a117
1E29: 97 C8          STA         $C8
1E2B: D7 A9          STB         $A9
1E2D: BF 0D 11       STX         $0D11		; set suftbutton
1E30: 7E BC AE       JMP         $BCAE
------------------------------------------------
1E33: 8D 42          BSR         $1E77
1E35: 6D 84          TST         ,X
1E37: 26 05          BNE         $1E3E
1E39: 8E 79 D7       LDX         #$79D7		; EMPTY FILEFORMAT DISK ($69d7)
1E3C: 20 02          BRA         $1E40
------------------------------------------------
1E3E: 30 01          LEAX        +$01,X
1E40: 39             RTS  
------------------------------------------------
1E41: C6 E8          LDB         #$E8		; #$e8 to display
1E43: BD 99 7D       JSR         $997D		;
1E46: C6 0A          LDB         #$0A
1E48: 4F             CLRA 
1E49: BD B9 71       JSR         $B971
1E4C: 86 AD          LDA         #$AD		; cursor to position #$2d
1E4E: BD 99 81       JSR         $9981		;
1E51: 96 C3          LDA         $C3
1E53: B0 0D E8       SUBA        $0DE8
1E56: 4C             INCA 
1E57: BD BB AB       JSR         $BBAB          ; print A
1E5A: 0D 0D          TST         $0D
1E5C: 27 12          BEQ         $1E70
1E5E: 86 C4          LDA         #$C4		; cursor to position #$34
1E60: BD 99 81       JSR         $9981		;
1E63: BE 0D E3       LDX         $0DE3		; screen address
1E66: A6 84          LDA         ,X		; get char (?)
1E68: C6 03          LDB         #$03		; text length = 3
1E6A: 8E 77 8D       LDX         #$778D		; file type XXX
1E6D: BD B9 71       JSR         $B971
1E70: 39             RTS  
------------------------------------------------
1E71: 8D C0          BSR         $1E33
1E73: 86 B2          LDA         #$B2
1E75: 20 CA          BRA         $1E41
------------------------------------------------
1E77: 96 C3          LDA         $C3
1E79: 81 32          CMPA        #$32
1E7B: 25 09          BCS         $1E86
1E7D: 8E 49 C2       LDX         #$49C2		; floppy buffer base
1E80: C6 06          LDB         #$06		; text length = 6
1E82: 80 32          SUBA        #$32
1E84: 20 05          BRA         $1E8B
------------------------------------------------
1E86: 8E 47 38       LDX         #$4738		; floppy buffer base
1E89: C6 0D          LDB         #$0D		; text length = 12
1E8B: 3D             MUL  			; get filename address
1E8C: 30 8B          LEAX        D,X		;
1E8E: BF 0D E3       STX         $0DE3		; store filename address
1E91: 39             RTS  
------------------------------------------------
1E92: 10 8E 00 66    LDY         #$0066		; PCB length
1E96: 7E 9F 8D       JMP         $9F8D
------------------------------------------------
1E99: 86 06          LDA         #$06
1E9B: 8D 34          BSR         $1ED1
1E9D: CE 0D 30       LDU         #$0D30		; active program base
1EA0: 8E 50 00       LDX         #$5000		; DOSRAM base
1EA3: 8D ED          BSR         $1E92
1EA5: 86 01          LDA         #$01
1EA7: 97 C7          STA         $C7
1EA9: 86 16          LDA         #$16
1EAB: 7E 79 76       JMP         $7976
------------------------------------------------
1EAE: BE 0D 07       LDX         $0D07		; ptr. to program edit buffer
1EB1: 30 88 C6       LEAX        -$3A,X
1EB4: CE 50 00       LDU         #$5000		; DOSRAM base
1EB7: 8D D9          BSR         $1E92
1EB9: 86 07          LDA         #$07
1EBB: 8D 14          BSR         $1ED1
1EBD: BE 0D 07       LDX         $0D07		; ptr. to program edit buffer
1EC0: 30 88 C6       LEAX        -$3A,X
1EC3: FE 0D E3       LDU         $0DE3		; floppy buffer pointer
1EC6: 10 8E 00 06    LDY         #$0006		; name length?
1ECA: BD 9F 8D       JSR         $9F8D
1ECD: 86 01          LDA         #$01
1ECF: 20 61          BRA         $1F32
------------------------------------------------
1ED1: D6 C3          LDB         $C3
1ED3: C0 32          SUBB        #$32		; -50

--- floppy access (1)
------------------------------------------------
1ED5: BD 86 02       JSR         $8602		; master init
1ED8: 34 06          PSHS        B,A
1EDA: CC 70 03       LDD         #$7003		; jump to ROMLOW $2003
1EDD: 34 06          PSHS        B,A		;
1EDF: CC 0E 04       LDD         #$0E04		; 
1EE2: BD 85 B4       JSR         $85B4		; 
1EE5: BD 86 93       JSR         $8693		; -"-, init DUART/MIDI/panel
1EE8: B6 0D E2       LDA         $0DE2		; floppy error code
1EEB: 81 00          CMPA        #$00		; no error -> return
1EED: 26 01          BNE         $1EF0
1EEF: 39             RTS  

--- floppy access: error occurred
------------------------------------------------
1EF0: D6 A8          LDB         $A8
1EF2: C1 11          CMPB        #$11
1EF4: 26 0F          BNE         $1F05
1EF6: 81 03          CMPA        #$03		; error #$03: no disk
1EF8: 27 04          BEQ         $1EFE
1EFA: 81 11          CMPA        #$11		; error #$11: not SQ80 disk
1EFC: 26 07          BNE         $1F05
1EFE: 8D 26          BSR         $1F26
1F00: C6 08          LDB         #$08
1F02: 7E BC 05       JMP         $BC05
------------------------------------------------
1F05: 10 FE 0D EA    LDS         $0DEA
1F09: 8D 1B          BSR         $1F26
1F0B: CE 70 67       LDU         #$7067		; PRESS ANY BUTTON ($5067)
1F0E: BD 99 56       JSR         $9956		; print text
1F11: BD BB 46       JSR         $BB46
1F14: 96 C4          LDA         $C4
1F16: 81 05          CMPA        #$05	
1F18: 27 06          BEQ         $1F20
1F1A: 96 A8          LDA         $A8
1F1C: 81 11          CMPA        #$11
1F1E: 26 03          BNE         $1F23
1F20: 7E A1 44       JMP         $A144
------------------------------------------------
1F23: 7E 7A 35       JMP         $7A35

------------------------------------------------
--- print disk error message -------------------
--- A indicates error --------------------------
------------------------------------------------
1F26: BD A6 57       JSR         $A657		; select ROMLOW $6000
1F29: 8E 7C C5       LDX         #$7CC5		; disk error message base
1F2C: 48             LSLA 			; a*2 = message pointer
1F2D: EE 86          LDU         A,X		; select message
1F2F: 7E 99 5A       JMP         $995A		; print error

------------------------------------------------
1F32: 8D A1          BSR         $1ED5
1F34: 7E 7A 35       JMP         $7A35
------------------------------------------------
1F37: 34 06          PSHS        B,A
1F39: BD 9E 77       JSR         $9E77
1F3C: E6 84          LDB         ,X
1F3E: 26 04          BNE         $1F44
1F40: 86 09          LDA         #$09
1F42: 20 AC          BRA         $1EF0
------------------------------------------------
1F44: 96 C4          LDA         $C4
1F46: 81 01          CMPA        #$01
1F48: 27 08          BEQ         $1F52
1F4A: D1 C4          CMPB        $C4
1F4C: 27 04          BEQ         $1F52
1F4E: 86 0A          LDA         #$0A
1F50: 20 9E          BRA         $1EF0
------------------------------------------------
1F52: 35 86          PULS        PC,B,A
------------------------------------------------
1F54: D6 C3          LDB         $C3
1F56: C0 0A          SUBB        #$0A
1F58: 96 0D          LDA         $0D
1F5A: 85 82          BITA        #$82
1F5C: 26 13          BNE         $1F71
1F5E: 8D 04          BSR         $1F64
1F60: 86 01          LDA         #$01
1F62: 20 CE          BRA         $1F32

------------------------------------------------
--- transfer internal programs to floppy buffer
------------------------------------------------
1F64: 8E 10 10       LDX         #$1010		; transfer $1010-$2000
1F67: CE 50 00       LDU         #$5000		;   to $5000-$5ff0
1F6A: 8D 1D          BSR         $1F89
1F6C: 86 05          LDA         #$05
1F6E: 7E 9E D5       JMP         $9ED5

------------------------------------------------
1F71: 85 02          BITA        #$02
1F73: 27 21          BEQ         $1F96
1F75: 8D 07          BSR         $1F7E
1F77: 0F CF          CLR         $CF
1F79: 86 26          LDA         #$26
1F7B: 7E 79 34       JMP         $7934

------------------------------------------------
--- transfer floppy buffer to internal programs
------------------------------------------------
1F7E: 86 04          LDA         #$04
1F80: BD 9E D5       JSR         $9ED5
1F83: 8E 50 00       LDX         #$5000		; transfer $5000-$5ff0
1F86: CE 10 10       LDU         #$1010		;   to $1010-$2000
1F89: 10 8E 0F F0    LDY         #$0FF0
1F8D: A6 80          LDA         ,X+
1F8F: A7 C0          STA         ,U+
1F91: 31 3F          LEAY        -$01,Y
1F93: 26 F8          BNE         $1F8D
1F95: 39             RTS  

------------------------------------------------
1F96: 8D 9F          BSR         $1F37
1F98: 6F 84          CLR         ,X
1F9A: 86 01          LDA         #$01
1F9C: 20 94          BRA         $1F32

------------------------------------------------
1F9E: CC 02 D4       LDD         #$02D4		; track table base
1FA1: 83 00 EE       SUBD        #$00EE
1FA4: 1F 02          TFR         D,Y
1FA6: 20 E5          BRA         $1F8D
------------------------------------------------

1FA8: 53 45 51 42 41 4E 4B 2D                           SEQBANK-             

------------------------------------------------
1FB0: 96 0D          LDA         $0D
1FB2: 2A 02          BPL         $1FB6
1FB4: 20 E0          BRA         $1F96
------------------------------------------------
1FB6: 85 02          BITA        #$02
1FB8: 10 26 00 90    LBNE        $204C
1FBC: 96 C4          LDA         $C4
1FBE: 81 03          CMPA        #$03
1FC0: 26 08          BNE         $1FCA
1FC2: CE 58 00       LDU         #$5800
1FC5: 8E 00 EE       LDX         #$00EE
1FC8: 8D D4          BSR         $1F9E
1FCA: 96 C4          LDA         $C4
1FCC: 81 04          CMPA        #$04
1FCE: 26 20          BNE         $1FF0
1FD0: 8E 01 27       LDX         #$0127
1FD3: 96 F2          LDA         $F2		; active sequence
1FD5: 48             LSLA 			; byte to offset
1FD6: AE 86          LDX         A,X		; get sequence pointer
1FD8: 1F 10          TFR         X,D
1FDA: C3 00 01       ADDD        #$0001
1FDD: 32 7F          LEAS        -$01,S
1FDF: BD D8 16       JSR         $D816
1FE2: 83 00 01       SUBD        #$0001
1FE5: 32 7F          LEAS        -$01,S
1FE7: BD D8 16       JSR         $D816
1FEA: EE E4          LDU         ,S
1FEC: E3 E1          ADDD        ,S++
1FEE: 20 08          BRA         $1FF8
------------------------------------------------
1FF0: 8E 00 00       LDX         #$0000
1FF3: FC 01 21       LDD         $0121
1FF6: 1F 03          TFR         D,U
1FF8: BF 0D D3       STX         $0DD3
1FFB: FD 0D D5       STD         $0DD5
1FFE: BE 0D E3       LDX         $0DE3
2001: EF 0B          STU         +$0B,X
2003: D6 C3          LDB         $C3
2005: 86 03          LDA         #$03
2007: BD 9E D5       JSR         $9ED5
200A: 96 C4          LDA         $C4
200C: 81 05          CMPA        #$05
200E: 27 2B          BEQ         $203B
2010: D6 C3          LDB         $C3
2012: BD 9F 64       JSR         $9F64
2015: 96 C3          LDA         $C3		; offset
2017: C6 0D          LDB         #$0D		; text length = 12
2019: 3D             MUL  
201A: CE 47 BA       LDU         #$47BA		; floppy buffer base
201D: 33 CB          LEAU        D,U		; get text address
201F: 86 02          LDA         #$02
2021: A7 C4          STA         ,U
2023: 33 41          LEAU        +$01,U
2025: 10 8E 00 08    LDY         #$0008
2029: 8E 9F A8       LDX         #$9FA8
202C: BD 9F 8D       JSR         $9F8D
202F: 96 C3          LDA         $C3
2031: 4C             INCA 
2032: BD BB B4       JSR         $BBB4
2035: 8B 30          ADDA        #$30
2037: CB 30          ADDB        #$30
2039: ED C4          STD         ,U
203B: 86 01          LDA         #$01
203D: BD 9E D5       JSR         $9ED5
2040: 96 C4          LDA         $C4
2042: 81 05          CMPA        #$05
2044: 26 03          BNE         $2049
2046: 7E A1 44       JMP         $A144
------------------------------------------------
2049: 7E 7A 35       JMP         $7A35

------------------------------------------------
--- load internal programs ---------------------
------------------------------------------------
204C: 96 C4          LDA         $C4
204E: 81 05          CMPA        #$05
2050: 27 2D          BEQ         $207F
2052: BE 0D E3       LDX         $0DE3
2055: 6D 89 00 82    TST         +$0082,X
2059: 27 24          BEQ         $207F
205B: CE 7F C3       LDU         #$7FC3		; LOAD INT. PROGRAMS ($6fc3)
205E: BD 99 5A       JSR         $995A		; print text
2061: BD BB 46       JSR         $BB46
2064: 81 2E          CMPA        #$2E
2066: 27 04          BEQ         $206C
2068: 81 33          CMPA        #$33
206A: 26 F5          BNE         $2061
206C: 34 02          PSHS        A
206E: CE 79 BE       LDU         #$79BE		; ACCESSING DISK ($69be)
2071: BD 99 5A       JSR         $995A		; print text
2074: A6 E0          LDA         ,S+
2076: 81 2E          CMPA        #$2E
2078: 26 05          BNE         $207F
207A: D6 C3          LDB         $C3
207C: BD 9F 7E       JSR         $9F7E		; copy floppy buf. to int.prog
207F: BD 9F 37       JSR         $9F37
2082: AE 0B          LDX         +$0B,X
2084: CE 00 00       LDU         #$0000
2087: 96 C4          LDA         $C4
2089: 81 05          CMPA        #$05
208B: 26 03          BNE         $2090
208D: B7 0D EE       STA         $0DEE
2090: 81 04          CMPA        #$04
2092: 26 11          BNE         $20A5
2094: FE 01 21       LDU         $0121
2097: 1F 10          TFR         X,D
2099: F3 01 21       ADDD        $0121
209C: 24 05          BCC         $20A3
209E: 86 0B          LDA         #$0B
20A0: 7E 9E F0       JMP         $9EF0
------------------------------------------------
20A3: 1F 01          TFR         D,X
20A5: FF 0D D3       STU         $0DD3
20A8: BF 0D D5       STX         $0DD5
20AB: D6 C3          LDB         $C3
20AD: 86 02          LDA         #$02
20AF: BD 9E D5       JSR         $9ED5
20B2: 96 C4          LDA         $C4
20B4: 81 05          CMPA        #$05
20B6: 26 0C          BNE         $20C4
20B8: 8E A2 33       LDX         #$A233		; softbutton handler to $a233
20BB: BF 0D 11       STX         $0D11
20BE: CE 7B EF       LDU         #$7BEF		; READY TO TX ($6bef)
20C1: 7E 99 5A       JMP         $995A		; print text
------------------------------------------------
20C4: 81 04          CMPA        #$04
20C6: 26 10          BNE         $20D8
20C8: BD E6 C9       JSR         $E6C9
20CB: 96 0D          LDA         $0D
20CD: 81 05          CMPA        #$05
20CF: 26 05          BNE         $20D6
20D1: 86 0C          LDA         #$0C
20D3: 7E 9E F0       JMP         $9EF0
------------------------------------------------
20D6: 20 09          BRA         $20E1
------------------------------------------------
20D8: 8E 58 00       LDX         #$5800		; DOSRAM pointer
20DB: CE 00 EE       LDU         #$00EE		; data block length
20DE: BD 9F 9E       JSR         $9F9E
20E1: BD 91 71       JSR         $9171
20E4: 7E AE 0D       JMP         $AE0D
------------------------------------------------
20E7: 10 FF 0D EA    STS         $0DEA
20EB: 0F A9          CLR         $A9
20ED: BD BC B2       JSR         $BCB2
20F0: 96 C4          LDA         $C4
20F2: 81 05          CMPA        #$05
20F4: 26 0A          BNE         $2100
20F6: 7D 0D EE       TST         $0DEE
20F9: 26 05          BNE         $2100
20FB: 86 0D          LDA         #$0D
20FD: 7E 9E F0       JMP         $9EF0
------------------------------------------------
2100: BD 9B DF       JSR         $9BDF
2103: FE 0D E3       LDU         $0DE3
2106: 96 C4          LDA         $C4
2108: A7 C4          STA         ,U
210A: 33 41          LEAU        +$01,U
210C: 10 8E 00 0A    LDY         #$000A
2110: BD 9F 8D       JSR         $9F8D
2113: 6E 9F 0D E5    JMP         [$0DE5]
------------------------------------------------
2117: 10 FF 0D EA    STS         $0DEA
211B: C1 04          CMPB        #$04
211D: 26 15          BNE         $2134
211F: 0F A9          CLR         $A9
2121: BD BC B2       JSR         $BCB2
2124: BD 9B DF       JSR         $9BDF
2127: 96 0D          LDA         $0D
2129: 81 00          CMPA        #$00
212B: 27 03          BEQ         $2130
212D: BD 9F 37       JSR         $9F37
2130: 6E 9F 0D E5    JMP         [$0DE5]
------------------------------------------------
2134: C1 09          CMPB        #$09
2136: 26 03          BNE         $213B
2138: 7E 7A 35       JMP         $7A35
------------------------------------------------
213B: 39             RTS  
------------------------------------------------
213C: 10 FF 0D EA    STS         $0DEA
2140: C1 09          CMPB        #$09
2142: 26 27          BNE         $216B
2144: BD A2 27       JSR         $A227
2147: 7D 0D EE       TST         $0DEE
214A: 27 16          BEQ         $2162
214C: CE 7B 34       LDU         #$7B34		; NOTE - SEQ. IS REINITIALIZED
214F: C6 06          LDB         #$06
2151: BD BC 20       JSR         $BC20
2154: BD C4 D5       JSR         $C4D5
2157: BD C4 03       JSR         $C403
215A: 7F 0D EE       CLR         $0DEE
215D: 7E AE 0D       JMP         $AE0D
------------------------------------------------
2160: 20 06          BRA         $2168
------------------------------------------------
2162: FC 0D EC       LDD         $0DEC
2165: FD 01 21       STD         $0121
2168: 7E 7A 35       JMP         $7A35
------------------------------------------------
216B: C1 08          CMPB        #$08
216D: 27 01          BEQ         $2170
216F: 39             RTS  
------------------------------------------------
2170: CC 00 00       LDD         #$0000
2173: FD 01 21       STD         $0121
2176: BD 84 79       JSR         $8479
2179: 8E 7A 45       LDX         #$7A45		; $2a45 (-> $98cf)
217C: AF 22          STX         +$02,Y
217E: BD 84 AE       JSR         $84AE
2181: 0B 5E          fdb	 $0B5E
2183: CE 7B 84       LDU         #$7B84		; SYS-EX MSG STATUS ($6b84) 
2186: BD 99 5A       JSR         $995A		; print text
2189: BD A2 19       JSR         $A219
218C: 0F B1          CLR         $B1
218E: BD 84 29       JSR         $8429
2191: AE 22          LDX         +$02,Y
2193: EC 24          LDD         +$04,Y
2195: BD 84 9F       JSR         $849F
2198: 8C 71 34       CMPX        #$7134
219B: 26 18          BNE         $21B5
219D: BD 71 2E       JSR         $712E
21A0: 81 33          CMPA        #$33
21A2: 26 05          BNE         $21A9
21A4: BD A2 27       JSR         $A227
21A7: 20 9B          BRA         $2144
------------------------------------------------
21A9: 81 32          CMPA        #$32
21AB: 26 06          BNE         $21B3
21AD: BD A2 27       JSR         $A227
21B0: 7E 9D 22       JMP         $9D22
------------------------------------------------
21B3: 20 61          BRA         $2216
------------------------------------------------
21B5: 8C A1 6F       CMPX        #$A16F
21B8: 26 46          BNE         $2200
21BA: 81 FF          CMPA        #$FF
21BC: 26 0D          BNE         $21CB
21BE: 8D 67          BSR         $2227
21C0: CE 7C 3E       LDU         #$7C3E		; SYSTEM ERROR ($6c3e)
21C3: C6 06          LDB         #$06
21C5: BD BC 20       JSR         $BC20
21C8: 7E A1 44       JMP         $A144
------------------------------------------------
21CB: 81 F7          CMPA        #$F7
21CD: 26 08          BNE         $21D7
21CF: 86 02          LDA         #$02
21D1: 97 B1          STA         $B1
21D3: 8D 44          BSR         $2219
21D5: 20 B7          BRA         $218E
------------------------------------------------
21D7: 81 F0          CMPA        #$F0
21D9: 26 19          BNE         $21F4
21DB: B7 0D EE       STA         $0DEE
21DE: 0D B1          TST         $B1
21E0: 26 06          BNE         $21E8
21E2: CE 7B B4       LDU         #$7BB4		; RECEIVING ($6bb4)
21E5: BD 99 5C       JSR         $995C		; print text
21E8: 86 01          LDA         #$01
21EA: 97 B1          STA         $B1
21EC: CC 00 64       LDD         #$0064
21EF: FD 0D EF       STD         $0DEF
21F2: 20 9A          BRA         $218E
------------------------------------------------
21F4: 0F CC          CLR         $CC
21F6: 8D 21          BSR         $2219
21F8: CE 7B D8       LDU         #$7BD8		; SYS-EX MEMORY IS FULL
21FB: BD 99 5C       JSR         $995C
21FE: 20 16          BRA         $2216
------------------------------------------------
2200: 8C A2 05       CMPX        #$A205
2203: 26 11          BNE         $2216
2205: 81 01          CMPA        #$01
2207: 26 05          BNE         $220E
2209: CE 7B CC       LDU         #$7BCC		: INCOMPLETE ($6bcc)
220C: 20 03          BRA         $2211
------------------------------------------------
220E: CE 7B C0       LDU         #$7BC0		; COMPLETE ($6bc0)
2211: 8D 06          BSR         $2219
2213: BD 99 5C       JSR         $995C
2216: 7E A1 8E       JMP         $A18E
------------------------------------------------
2219: 86 AD          LDA         #$AD		; position cursor
221B: BD 99 81       JSR         $9981
221E: CC FF FF       LDD         #$FFFF
2221: B3 01 21       SUBD        $0121
2224: 7E C3 90       JMP         $C390
------------------------------------------------
2227: CC 00 00       LDD         #$0000
222A: FD 0D EF       STD         $0DEF
222D: BD 86 02       JSR         $8602
2230: 7E 86 93       JMP         $8693
------------------------------------------------
2233: C1 08          CMPB        #$08
2235: 26 17          BNE         $224E
2237: CE 7C 1C       LDU         #$7C1C		; TRANSMITTING DATA ($6c1c)
223A: BD 99 5A       JSR         $995A
223D: BE 0D E3       LDX         $0DE3
2240: EC 0B          LDD         +$0B,X
2242: FD 01 21       STD         $0121
2245: BD 98 8D       JSR         $988D
2248: CE 7B EF       LDU         #$7BEF		; READY TO TX ($6bef)
224B: 7E 99 5A       JMP         $995A
------------------------------------------------
224E: C1 09          CMPB        #$09
2250: 26 03          BNE         $2255
2252: 7E A1 4C       JMP         $A14C
------------------------------------------------
2255: 39             RTS  

------------------------------------------------
--- DISK / COPY menu ---------------------------
--- check destination disk, read source --------
------------------------------------------------
2256: CE 7B 07       LDU         #$7B07		; * WARNING * ($6b07)
2259: C6 04          LDB         #$04
225B: BD BC 20       JSR         $BC20
225E: CE 7E DD       LDU         #$7EDD		; INSERT FORMATTED ($6edd)
2261: BD 99 5A       JSR         $995A		; print text
2264: BD A4 03       JSR         $A403
2267: BD 9C 27       JSR         $9C27
226A: 86 43          LDA         #$43
226C: B7 4C C2       STA         $4CC2
226F: 86 01          LDA         #$01
2271: BD A4 25       JSR         $A425
2274: CE 7F 0C       LDU         #$7F0C		; INSERT SOURCE ($6f0c)
2277: BD 99 5A       JSR         $995A		; print text
227A: BD A4 03       JSR         $A403
227D: 86 00          LDA         #$00
227F: BD A4 25       JSR         $A425
2282: BD 9B C8       JSR         $9BC8
2285: 86 11          LDA         #$11
2287: 97 A8          STA         $A8
2289: 86 03          LDA         #$03
228B: 97 C4          STA         $C4
228D: 86 01          LDA         #$01
228F: B7 0D EE       STA         $0DEE
2292: 0F C3          CLR         $C3
2294: BD 9E 77       JSR         $9E77
2297: 6D 84          TST         ,X
2299: 27 2E          BEQ         $22C9
229B: CC 00 00       LDD         #$0000
229E: FD 0D D3       STD         $0DD3
22A1: EC 0B          LDD         +$0B,X
22A3: FD 01 21       STD         $0121
22A6: FD 0D D5       STD         $0DD5
22A9: 86 02          LDA         #$02
22AB: D6 C3          LDB         $C3
22AD: BD 9E D5       JSR         $9ED5
22B0: BD A3 B4       JSR         $A3B4
22B3: CC 00 00       LDD         #$0000
22B6: FD 0D D3       STD         $0DD3
22B9: FC 01 21       LDD         $0121
22BC: FD 0D D5       STD         $0DD5
22BF: 86 03          LDA         #$03
22C1: D6 C3          LDB         $C3
22C3: BD 9E D5       JSR         $9ED5
22C6: BD A3 D7       JSR         $A3D7
22C9: 0C C3          INC         $C3
22CB: 96 C3          LDA         $C3
22CD: 81 0A          CMPA        #$0A
22CF: 25 C3          BCS         $2294
22D1: 86 0A          LDA         #$0A
22D3: B7 0D 17       STA         $0D17
22D6: CC 04 32       LDD         #$0432
22D9: 8E 10 00       LDX         #$1000
22DC: CE A4 39       LDU         #$A439
22DF: 8D 49          BSR         $232A
22E1: 0D B1          TST         $B1
22E3: 27 03          BEQ         $22E8
22E5: BD A3 78       JSR         $A378
22E8: 86 32          LDA         #$32
22EA: B7 0D 17       STA         $0D17
22ED: CC 06 B2       LDD         #$06B2
22F0: 8E 00 80       LDX         #$0080
22F3: CE A4 32       LDU         #$A432
22F6: 8D 32          BSR         $232A
22F8: 0D B1          TST         $B1
22FA: 27 0A          BEQ         $2306
22FC: 86 07          LDA         #$07
22FE: 8E 00 80       LDX         #$0080
2301: CE A4 40       LDU         #$A440
2304: 8D 7A          BSR         $2380
2306: 8E 47 38       LDX         #$4738
2309: CE 50 00       LDU         #$5000
230C: 8D 15          BSR         $2323
230E: BD A3 B4       JSR         $A3B4
2311: 8E 50 00       LDX         #$5000
2314: CE 47 38       LDU         #$4738
2317: 8D 0A          BSR         $2323
2319: 86 01          LDA         #$01
231B: BD 9E D5       JSR         $9ED5
231E: 86 10          LDA         #$10
2320: 7E 9E F0       JMP         $9EF0
------------------------------------------------
2323: 10 8E 08 00    LDY         #$0800
2327: 7E 9F 8D       JMP         $9F8D
------------------------------------------------
232A: 34 56          PSHS        U,X,B,A
232C: CC 00 00       LDD         #$0000
232F: FD 01 21       STD         $0121
2332: 0F B1          CLR         $B1
2334: BD 9E 77       JSR         $9E77
2337: 6D 84          TST         ,X
2339: 27 33          BEQ         $236E
233B: A6 E4          LDA         ,S
233D: D6 C3          LDB         $C3
233F: F0 0D 17       SUBB        $0D17
2342: BD 9E D5       JSR         $9ED5
2345: 96 C3          LDA         $C3
2347: EE 62          LDU         +$02,S
2349: A7 C9 4F FF    STA         +$4FFF,U	; copy to DOSRAM
234D: BE 01 21       LDX         $0121
2350: AD F8 04       JSR         [+$04,S]
2353: EC 62          LDD         +$02,S
2355: 30 8B          LEAX        D,X
2357: BF 01 21       STX         $0121
235A: 0C B1          INC         $B1
235C: A6 E4          LDA         ,S
235E: 81 04          CMPA        #$04
2360: 26 0C          BNE         $236E
2362: 96 B1          LDA         $B1
2364: 81 10          CMPA        #$10
2366: 26 06          BNE         $236E
2368: 8D 0E          BSR         $2378
236A: 0C C3          INC         $C3
236C: 20 BE          BRA         $232C
------------------------------------------------
236E: 0C C3          INC         $C3
2370: 96 C3          LDA         $C3
2372: A1 61          CMPA        +$01,S
2374: 25 BE          BCS         $2334
2376: 35 D6          PULS        PC,U,X,B,A
------------------------------------------------
2378: 86 05          LDA         #$05
237A: 8E 10 00       LDX         #$1000
237D: CE A4 47       LDU         #$A447
2380: 34 52          PSHS        U,X,A
2382: 8D 30          BSR         $23B4
2384: 8E 00 00       LDX         #$0000
2387: BF 01 21       STX         $0121
238A: 4F             CLRA 
238B: 4C             INCA 
238C: 34 02          PSHS        A
238E: BE 01 21       LDX         $0121
2391: AD F8 04       JSR         [+$04,S]
2394: AE 62          LDX         +$02,S
2396: E6 89 4F FF    LDB         +$4FFF,X
239A: F0 0D 17       SUBB        $0D17
239D: A6 61          LDA         +$01,S
239F: BD 9E D5       JSR         $9ED5
23A2: FC 01 21       LDD         $0121
23A5: E3 62          ADDD        +$02,S
23A7: FD 01 21       STD         $0121
23AA: 35 02          PULS        A
23AC: 91 B1          CMPA        $B1
23AE: 26 DB          BNE         $238B
23B0: 35 52          PULS        U,X,A
23B2: 20 23          BRA         $23D7

------------------------------------------------
--- DISK / COPY menu: copy to destination ------
------------------------------------------------
23B4: CE 7F 3D       LDU         #$7F3D		; INSERT DESTINATION ($6f3d)
23B7: BD 99 5A       JSR         $995A		; print text
23BA: 8D 47          BSR         $2403
23BC: 86 00          LDA         #$00
23BE: 8D 65          BSR         $2425
23C0: 7D 0D E2       TST         $0DE2
23C3: 26 10          BNE         $23D5
23C5: B6 4C C2       LDA         $4CC2
23C8: 81 43          CMPA        #$43
23CA: 26 01          BNE         $23CD
23CC: 39             RTS  

------------------------------------------------
--- DISK/COPY menu: disk is not destination ----
------------------------------------------------
23CD: CE 7F 7B       LDU         #$7F7B		; DISK IS NOT DEST. ($6f7b)
23D0: C6 04          LDB         #$04
23D2: BD BC 20       JSR         $BC20
23D5: 20 DD          BRA         $23B4

------------------------------------------------
--- DISK/COPY menu: read source disk -----------
------------------------------------------------
23D7: CE 7F 0C       LDU         #$7F0C		; INSERT SOURCE DISK ($6f0c)
23DA: BD 99 5A       JSR         $995A
23DD: 8D 24          BSR         $2403
23DF: 86 00          LDA         #$00
23E1: 8D 42          BSR         $2425
23E3: 7D 0D E2       TST         $0DE2
23E6: 26 19          BNE         $2401
23E8: DC C5          LDD         $C5
23EA: 34 06          PSHS        B,A
23EC: BD 9B C8       JSR         $9BC8
23EF: 35 06          PULS        B,A
23F1: 10 93 C5       CMPD        $C5
23F4: 26 01          BNE         $23F7
23F6: 39             RTS  

------------------------------------------------
--- DISK/COPY menu: disk is not source ---------
------------------------------------------------
23F7: DD C5          STD         $C5
23F9: CE 7F 63       LDU         #$7F63		; DISK IS NOT SOURCE ($6f63)
23FC: C6 04          LDB         #$04
23FE: BD BC 20       JSR         $BC20
2401: 20 D4          BRA         $23D7
------------------------------------------------
2403: BD 84 29       JSR         $8429
2406: AE 22          LDX         +$02,Y
2408: EC 24          LDD         +$04,Y
240A: BD 84 9F       JSR         $849F
240D: 8C 71 34       CMPX        #$7134		
2410: 26 F1          BNE         $2403
2412: BD 71 2E       JSR         $712E
2415: 81 2E          CMPA        #$2E
2417: 26 01          BNE         $241A
2419: 39             RTS  
------------------------------------------------
241A: 81 33          CMPA        #$33
241C: 26 05          BNE         $2423
241E: 86 0F          LDA         #$0F
2420: 7E 9E F0       JMP         $9EF0
------------------------------------------------
2423: 20 DE          BRA         $2403
------------------------------------------------
2425: 34 06          PSHS        B,A
2427: CE 79 BE       LDU         #$79BE		; ACCESSING DISK ($69be)
242A: BD 99 5A       JSR         $995A
242D: 35 06          PULS        B,A
242F: 7E 9E D5       JMP         $9ED5
------------------------------------------------
2432: 86 00          LDA         #$00
2434: CE 00 80       LDU         #$0080
2437: 20 13          BRA         $244C
------------------------------------------------
2439: 86 00          LDA         #$00
243B: CE 10 00       LDU         #$1000
243E: 20 0C          BRA         $244C
------------------------------------------------
2440: 86 02          LDA         #$02
2442: CE 00 80       LDU         #$0080
2445: 20 05          BRA         $244C
------------------------------------------------
2447: 86 02          LDA         #$02
2449: CE 10 00       LDU         #$1000
244C: 34 06          PSHS        B,A
244E: CC 73 F7       LDD         #$73F7		; jump to ROMLOW $23f7
2451: 34 06          PSHS        B,A		;
2453: CC 0E 04       LDD         #$0E04		;
2456: BD 85 B4       JSR         $85B4		;
2459: 39             RTS  

------------------------------------------------
--- prepare SONG menu --------------------------
------------------------------------------------
245A: 4F             CLRA 			; for a=0 to 19
245B: BD AD CE       JSR         $ADCE		;   copy "XXXX" to $0217
245E: 4C             INCA 
245F: 81 13          CMPA        #$13
2461: 23 F8          BLS         $245B
2463: 5F             CLRB 
2464: 7E AD F5       JMP         $ADF5		; copy "SONG" to $0217

------------------------------------------------
--- "normalize" SOFTKEY, jump to handler -------
------------------------------------------------
2467: 80 2A          SUBA        #$2A		; keycode# to softkey#
2469: 1F 89          TFR         A,B
246B: FE 0D 11       LDU         $0D11		; jump to softkey handler
246E: 6E C4          JMP         ,U

------------------------------------------------
2470: BE 0D 0D       LDX         $0D0D
2473: BD B7 5B       JSR         $B75B
2476: 4D             TSTA 
2477: 27 39          BEQ         $24B2
2479: D7 B9          STB         $B9
247B: CE 0D 96       LDU         #$0D96
247E: D6 B8          LDB         $B8
2480: 5A             DECB 
2481: A7 C5          STA         B,U
2483: BD BB CB       JSR         $BBCB
2486: BD B8 06       JSR         $B806
2489: 96 A8          LDA         $A8
248B: 81 09          CMPA        #$09
248D: 27 03          BEQ         $2492
248F: BD 7A D5       JSR         $7AD5
2492: 0D AE          TST         $AE
2494: 26 1C          BNE         $24B2
2496: D6 B4          LDB         $B4
2498: 2A 06          BPL         $24A0
249A: C4 7F          ANDB        #$7F
249C: 86 01          LDA         #$01
249E: 20 01          BRA         $24A1
------------------------------------------------
24A0: 4F             CLRA 
24A1: 34 02          PSHS        A
24A3: 8E 02 D4       LDX         #$02D4		; track table base
24A6: 86 0A          LDA         #$0A
24A8: BD 8B B5       JSR         $8BB5
24AB: 86 0B          LDA         #$0B
24AD: 35 04          PULS        B
24AF: BD 8B B5       JSR         $8BB5
24B2: 0F AE          CLR         $AE
24B4: 39             RTS  

--- button 4 (YES)
------------------------------------------------
24B5: C1 04          CMPB        #$04
24B7: 26 05          BNE         $24BE
24B9: BD BA 56       JSR         $BA56
24BC: 20 04          BRA         $24C2

--- button 9 (NO)
------------------------------------------------
24BE: C1 09          CMPB        #$09
24C0: 26 03          BNE         $24C5
24C2: 7E 79 E4       JMP         $79E4
------------------------------------------------
24C5: 39             RTS  

--- button 5
------------------------------------------------
24C6: C1 05          CMPB        #$05
24C8: 26 1E          BNE         $24E8
24CA: 86 01          LDA         #$01
24CC: 97 C7          STA         $C7
24CE: 86 00          LDA         #$00
24D0: 97 A9          STA         $A9
24D2: BD BC B2       JSR         $BCB2
24D5: BD BC B6       JSR         $BCB6
24D8: 86 01          LDA         #$01
24DA: 97 AB          STA         $AB
24DC: BD 7A E4       JSR         $7AE4
24DF: 8E A6 07       LDX         #$A607		; softbutton handler to $a607
24E2: BF 0D 11       STX         $0D11
24E5: 7E 7A D5       JMP         $7AD5
------------------------------------------------
24E8: 96 BD          LDA         $BD
24EA: BE 0D 07       LDX         $0D07
24ED: 30 88 C6       LEAX        -$3A,X
24F0: C1 08          CMPB        #$08
24F2: 26 0E          BNE         $2502
24F4: 4D             TSTA 
24F5: 26 06          BNE         $24FD
24F7: 86 05          LDA         #$05
24F9: C6 A2          LDB         #$A2
24FB: 20 03          BRA         $2500
------------------------------------------------
24FD: 4A             DECA 
24FE: C6 D5          LDB         #$D5
2500: 20 10          BRA         $2512

--- button 9 / 0-4
------------------------------------------------
2502: C1 09          CMPB        #$09
2504: 26 18          BNE         $251E
2506: 81 05          CMPA        #$05
2508: 25 05          BCS         $250F
250A: 4F             CLRA 
250B: C6 9D          LDB         #$9D
250D: 20 03          BRA         $2512
------------------------------------------------
250F: 4C             INCA 
2510: C6 D4          LDB         #$D4
2512: 8D 11          BSR         $2525
2514: 86 DB          LDA         #$DB
2516: BD 99 7D       JSR         $997D
2519: 86 D9          LDA         #$D9
251B: 7E 99 81       JMP         $9981
------------------------------------------------
251E: 39             RTS  
------------------------------------------------
251F: BE 0D 07       LDX         $0D07
2522: 30 88 C6       LEAX        -$3A,X
2525: 97 BD          STA         $BD
2527: 30 86          LEAX        A,X
2529: BF 0D 09       STX         $0D09
252C: 39             RTS  
------------------------------------------------
252D: 96 BD          LDA         $BD
252F: 8E 0D 1C       LDX         #$0D1C
2532: C1 04          CMPB        #$04
2534: 26 03          BNE         $2539
2536: 7E A0 E7       JMP         $A0E7

--- button 9
------------------------------------------------
2539: C1 09          CMPB        #$09
253B: 26 03          BNE         $2540
253D: 7E 7A 35       JMP         $7A35

--- button 7
------------------------------------------------
2540: C1 07          CMPB        #$07
2542: 26 0E          BNE         $2552
2544: 4D             TSTA 
2545: 26 06          BNE         $254D
2547: 86 09          LDA         #$09
2549: C6 A0          LDB         #$A0
254B: 20 03          BRA         $2550
------------------------------------------------
254D: 4A             DECA 
254E: C6 D5          LDB         #$D5
2550: 20 C0          BRA         $2512

--- button 8 / 1-5
------------------------------------------------
2552: C1 08          CMPB        #$08
2554: 26 0E          BNE         $2564
2556: 81 09          CMPA        #$09
2558: 25 05          BCS         $255F
255A: 4F             CLRA 
255B: C6 97          LDB         #$97
255D: 20 03          BRA         $2562
------------------------------------------------
255F: 4C             INCA 
2560: C6 D4          LDB         #$D4
2562: 20 AE          BRA         $2512
------------------------------------------------
2564: 39             RTS  
------------------------------------------------
2565: 0D B6          TST         $B6
2567: 27 08          BEQ         $2571
2569: 34 02          PSHS        A
256B: 5F             CLRB 
256C: BD AB 0B       JSR         $AB0B
256F: 35 02          PULS        A
2571: 8D 4F          BSR         $25C2
2573: D7 D1          STB         $D1
2575: CE 70 BE       LDU         #$70BE		; WRITING NEW PROGRAM
2578: BD A7 1E       JSR         $A71E
257B: BD BA D6       JSR         $BAD6
257E: 8D 55          BSR         $25D5
2580: 7E A4 CE       JMP         $A4CE
------------------------------------------------
2583: 34 02          PSHS        A
2585: CE 0D 6A       LDU         #$0D6A
2588: BE 0D 0B       LDX         $0D0B
258B: 11 A3 84       CMPU        ,X
258E: 27 0D          BEQ         $259D
2590: FF 0D 07       STU         $0D07
2593: EF 84          STU         ,X
2595: BD BB 5F       JSR         $BB5F
2598: D6 B9          LDB         $B9
259A: BD B7 C5       JSR         $B7C5
259D: 35 02          PULS        A
259F: 8D 21          BSR         $25C2
25A1: BE 0D 09       LDX         $0D09
25A4: 6D 84          TST         ,X
25A6: 2A 02          BPL         $25AA
25A8: CB 80          ADDB        #$80
25AA: E7 84          STB         ,X
25AC: C4 7F          ANDB        #$7F
25AE: 8E 02 D4       LDX         #$02D4		; track table base
25B1: 86 07          LDA         #$07
25B3: BD 8B B5       JSR         $8BB5
25B6: BD BB E5       JSR         $BBE5
25B9: 86 01          LDA         #$01
25BB: 97 AB          STA         $AB
25BD: 86 11          LDA         #$11
25BF: 7E 78 30       JMP         $7830
------------------------------------------------
25C2: 34 02          PSHS        A
25C4: 96 CB          LDA         $CB
25C6: C6 28          LDB         #$28
25C8: 3D             MUL  
25C9: 34 04          PSHS        B
25CB: 96 CF          LDA         $CF
25CD: C6 0A          LDB         #$0A
25CF: 3D             MUL  
25D0: EB E0          ADDB        ,S+
25D2: EB E0          ADDB        ,S+
25D4: 39             RTS  
------------------------------------------------
25D5: 0D B6          TST         $B6
25D7: 27 03          BEQ         $25DC
25D9: BD BF 53       JSR         $BF53
25DC: BE 0D 0B       LDX         $0D0B
25DF: 96 D1          LDA         $D1
25E1: 91 D2          CMPA        $D2
25E3: 26 04          BNE         $25E9
25E5: C6 01          LDB         #$01
25E7: D7 AF          STB         $AF
25E9: A7 02          STA         +$02,X
25EB: BD BA 7B       JSR         $BA7B
25EE: FD 0D 07       STD         $0D07
25F1: ED 84          STD         ,X
25F3: 0F C7          CLR         $C7
25F5: 6F 88 13       CLR         +$13,X
25F8: 6F 88 19       CLR         +$19,X
25FB: D6 D1          LDB         $D1
25FD: 0D AE          TST         $AE
25FF: 26 03          BNE         $2604
2601: BD 8A BB       JSR         $8ABB
2604: 0F AE          CLR         $AE
2606: 39             RTS  
------------------------------------------------
2607: 0D B6          TST         $B6
2609: 27 08          BEQ         $2613
260B: 34 02          PSHS        A
260D: 5F             CLRB 
260E: BD AB 0B       JSR         $AB0B
2611: 35 02          PULS        A

--- softbutton handler set by ROMLOW $0928
2613: 8D AD          BSR         $25C2
2615: D7 D1          STB         $D1
2617: 8D BC          BSR         $25D5
2619: 7E 7A E4       JMP         $7AE4
------------------------------------------------
261C: 10 83 00 94    CMPD        #$0094		; 148
2620: 23 01          BLS         $2623
2622: 39             RTS  
------------------------------------------------
2623: 8E 72 8F       LDX         #$728F
2626: 4F             CLRA 			; D*2
2627: 58             LSLB 
2628: 49             ROLA 
2629: 1A 10          ORCC        #$10		; disable IRQ
262B: 8D 2A          BSR         $2657		; select ROMLOW $6000
262D: EC 8B          LDD         D,X
262F: 8D 38          BSR         $2669		; select ROMLOW $0000
2631: 1C EF          ANDCC       #$EF		; enable IRQ
2633: 34 04          PSHS        B
2635: C6 01          LDB         #$01
2637: BD 74 71       JSR         $7471		
263A: 35 02          PULS        A
263C: C6 01          LDB         #$01
263E: 7E 74 71       JMP         $7471
------------------------------------------------
2641: C1 09          CMPB        #$09
2643: 26 03          BNE         $2648
2645: 7E BC 3C       JMP         $BC3C
------------------------------------------------
2648: 39             RTS  
------------------------------------------------
2649: 6E 84          JMP         ,X

------------------------------------------------
--- select ROMLOW $2000-$2fff ------------------
------------------------------------------------
264B: 34 07          PSHS        B,A,CC
264D: C6 04          LDB         #$04
264F: 20 1C          BRA         $266D

------------------------------------------------
--- select ROMLOW $1000-$1fff ------------------
------------------------------------------------
2651: 34 07          PSHS        B,A,CC
2653: C6 02          LDB         #$02
2655: 20 16          BRA         $266D

------------------------------------------------
--- select ROMLOW $6000-$6fff ------------------
------------------------------------------------
2657: 34 07          PSHS        B,A,CC
2659: C6 0C          LDB         #$0C
265B: 20 10          BRA         $266D

------------------------------------------------
--- select ROMLOW $5000-$5fff ------------------
------------------------------------------------
265D: 34 07          PSHS        B,A,CC
265F: C6 0A          LDB         #$0A
2661: 20 0A          BRA         $266D

------------------------------------------------
--- select ROMLOW $3000-$3fff ------------------
------------------------------------------------
2663: 34 07          PSHS        B,A,CC
2665: C6 06          LDB         #$06
2667: 20 04          BRA         $266D

------------------------------------------------
--- select ROMLOW $0000-$0fff ------------------
------------------------------------------------
2669: 34 07          PSHS        B,A,CC
266B: C6 00          LDB         #$00
266D: 86 0E          LDA         #$0E
266F: FD 64 0E       STD         $640E
2672: 35 87          PULS        PC,B,A,CC

------------------------------------------------
--- STORAGE menu: DISK -------------------------
------------------------------------------------
2674: C1 07          CMPB        #$07		; softbutton 7: disk
2676: 26 08          BNE         $2680
2678: 8E 9B 35       LDX         #$9B35		; DISK menu handler
267B: CE 79 48       LDU         #$7948		; DISK menu
267E: 20 26          BRA         $26A6

------------------------------------------------
--- STORAGE menu: MIDI -------------------------
------------------------------------------------
2680: C1 08          CMPB        #$08		; softbutton 8: midi
2682: 26 08          BNE         $268C
2684: 8E A6 AD       LDX         #$A6AD		; MIDI menu handler
2687: CE 79 25       LDU         #$7925		; MIDI menu
268A: 20 1A          BRA         $26A6

------------------------------------------------
--- STORAGE menu: CARTRIDGE --------------------
------------------------------------------------
268C: C1 05          CMPB        #$05		; softbutton 5: cartridge
268E: 27 04          BEQ         $2694
2690: C1 06          CMPB        #$06		; softbutton 6: cartridge
2692: 26 08          BNE         $269C
2694: 8E A7 27       LDX         #$A727		; CARTRIDGE menu handler
2697: CE F7 CA       LDU         #$F7CA		; CARTRIDGE menu
269A: 20 0A          BRA         $26A6

------------------------------------------------
--- STORAGE menu: TAPE -------------------------
------------------------------------------------
269C: C1 09          CMPB        #$09		; softbutton 9: tape
269E: 26 0C          BNE         $26AC
26A0: 8E A6 D7       LDX         #$A6D7		; softbutton handler to $a6d7
26A3: CE 78 FB       LDU         #$78FB		; TAPE menu
26A6: BF 0D 11       STX         $0D11
26A9: 7E 99 5A       JMP         $995A
------------------------------------------------
26AC: 39             RTS  

------------------------------------------------
--- STORAGE menu: MIDI -------------------------
------------------------------------------------
26AD: 34 06          PSHS        B,A
26AF: CC 78 EC       LDD         #$78EC		; MIDI menu handler
26B2: 34 06          PSHS        B,A		;   at $18EC
26B4: CC 0E 02       LDD         #$0E02		; select ROMLOW $1000
26B7: BD 85 B4       JSR         $85B4		; jump to ROMLOW $18EC
26BA: 39             RTS  

------------------------------------------------
--- MIDI/SEND menu -----------------------------
------------------------------------------------
26BB: 34 06          PSHS        B,A
26BD: CC 79 3E       LDD         #$793E		; jump to ROMLOW $193e
26C0: 34 06          PSHS        B,A		;
26C2: CC 0E 02       LDD         #$0E02		;
26C5: BD 85 B4       JSR         $85B4		;
26C8: 39             RTS  

------------------------------------------------
--- MIDI SEND TO SQ-80: ALL SEQ. DATA ----------
------------------------------------------------
26C9: 34 06          PSHS        B,A
26CB: CC 79 B0       LDD         #$79B0		; jump to ROMLOW $19b0
26CE: 34 06          PSHS        B,A		;
26D0: CC 0E 02       LDD         #$0E02		;
26D3: BD 85 B4       JSR         $85B4		;
26D6: 39             RTS  

------------------------------------------------
--- TAPE menu ----------------------------------
------------------------------------------------
26D7: 34 06          PSHS        B,A
26D9: CC 79 08       LDD         #$7908		; tape menu handler
26DC: 34 06          PSHS        B,A		;   at ROMLOW $1908
26DE: CC 0E 02       LDD         #$0E02
26E1: BD 85 B4       JSR         $85B4		; jump to ROMLOW $1908
26E4: 39             RTS  

------------------------------------------------
--- STORAGE/TAPE VERIFY menu -------------------
------------------------------------------------
26E5: 34 06          PSHS        B,A
26E7: CC 79 F7       LDD         #$79F7		; jump to ROMLOW $19f7
26EA: 34 06          PSHS        B,A		;
26EC: CC 0E 02       LDD         #$0E02		;
26EF: BD 85 B4       JSR         $85B4		;
26F2: 39             RTS  

------------------------------------------------
--- set actual sequence to first occupied seq. -
------------------------------------------------
26F3: 96 F2          LDA         $F2		; get actual sequence
26F5: 8E 01 C7       LDX         #$01C7		; sequence status table
26F8: 6D 86          TST         A,X		; check status
26FA: 2A 0D          BPL         $2709		; sequence exists -> rts
26FC: 4F             CLRA 			; reset to sequence 0
26FD: 6D 86          TST         A,X		; check sequence status
26FF: 2A 06          BPL         $2707		; get first existing sequence
2701: 4C             INCA 
2702: 81 3B          CMPA        #$3B		; all sequences?
2704: 23 F7          BLS         $26FD
2706: 4F             CLRA 			; all sequences free
2707: 97 F2          STA         $F2		; set actual sequence
2709: 39             RTS  

------------------------------------------------
--- search for free sequence -------------------
--- A holds pointer, CY free/occupied (0/1) ----
------------------------------------------------
270A: 8E 01 C7       LDX         #$01C7		; sequence status table
270D: 86 3B          LDA         #$3B		; max. sequences
270F: 6D 86          TST         A,X		; check status
2711: 2B 05          BMI         $2718		; sequence free -> rts
2713: 4A             DECA 			
2714: 2A F9          BPL         $270F		; all sequences?
2716: 20 03          BRA         $271B		; all sequences occupied
------------------------------------------------
2718: 1C FE          ANDCC       #$FE		; clear carry (seq free)
271A: 39             RTS  
------------------------------------------------
271B: 1A 01          ORCC        #$01		; set carry (all seq. occ.)
271D: 39             RTS  

------------------------------------------------
--- send sequence to SQ80 ----------------------
------------------------------------------------
271E: BD 99 56       JSR         $9956		; MIDI seq. send to SQ80
2721: CE 7B B9       LDU         #$7BB9		; PLEASE WAIT ($5bb9)
2724: 7E 99 56       JMP         $9956		; MIDI seq. send to SQ80

------------------------------------------------
--- CARTRIDGE menu: CART A TO INT --------------
------------------------------------------------
2727: C1 01          CMPB        #$01		; cart a to int
2729: 27 04          BEQ         $272F
272B: C1 02          CMPB        #$02		; cart a to int
272D: 26 0A          BNE         $2739
272F: CE 3F FE       LDU         #$3FFE		; cartridge address
2732: 8E F7 D5       LDX         #$F7D5		; CART A TO INT
2735: C6 01          LDB         #$01		; bank A
2737: 20 10          BRA         $2749

------------------------------------------------
--- CARTRIDGE menu: CART B TO INT --------------
------------------------------------------------
2739: C1 06          CMPB        #$06		; cart b to int
273B: 27 04          BEQ         $2741
273D: C1 07          CMPB        #$07		; cart b to int
273F: 26 19          BNE         $275A
2741: CE 3F FD       LDU         #$3FFD		; handler 
2744: 8E F7 F1       LDX         #$F7F1		; CART B TO INT
2747: C6 02          LDB         #$02		; bank B
2749: 96 D5          LDA         $D5
274B: 27 46          BEQ         $2793
274D: 6D C4          TST         ,U		; card formatted?
274F: 27 04          BEQ         $2755
2751: 1F 98          TFR         B,A
2753: 20 3E          BRA         $2793
------------------------------------------------
2755: CE BA 82       LDU         #$BA82		; handler
2758: 20 1F          BRA         $2779

------------------------------------------------
--- CARTRIDGE menu: INT TO CART A --------------
------------------------------------------------
275A: C1 03          CMPB        #$03		; int to cart a
275C: 27 04          BEQ         $2762
275E: C1 04          CMPB        #$04		; int to cart a
2760: 26 07          BNE         $2769
2762: 8E F7 E3       LDX         #$F7E3		; INT TO CART A
2765: C6 01          LDB         #$01		; bank a
2767: 20 0D          BRA         $2776

------------------------------------------------
--- CARTRIDGE menu: INT TO CART B --------------
------------------------------------------------
2769: C1 08          CMPB        #$08		; int to cart b
276B: 27 04          BEQ         $2771
276D: C1 09          CMPB        #$09		; int to cart b
276F: 26 21          BNE         $2792
2771: 8E F7 FF       LDX         #$F7FF		; INT TO CART B
2774: C6 02          LDB         #$02		; bank B
2776: CE BA A1       LDU         #$BAA1		; handler
2779: D7 CB          STB         $CB
277B: FF 0D 15       STU         $0D15		; set vector
277E: 20 19          BRA         $2799
------------------------------------------------
2780: CE 74 AB       LDU         #$74AB		; PROGRAMS BEING... ($54ab)
2783: 8D 99          BSR         $271E
2785: AD 9F 0D 15    JSR         [$0D15]	; jump to handler
2789: 8E A6 07       LDX         #$A607		; softbutton handler to $a607
278C: BF 0D 11       STX         $0D11
278F: 7E 7A E4       JMP         $7AE4
------------------------------------------------
2792: 39             RTS  
------------------------------------------------
2793: BD BB 91       JSR         $BB91
2796: 7E 7A 35       JMP         $7A35

------------------------------------------------
2799: CE 74 C7       LDU         #$74C7		; COPY PROGRAMS FROM ($54c7)
279C: BD 99 56       JSR         $9956
279F: C6 0D          LDB         #$0D
27A1: 4F             CLRA 
27A2: BD B9 71       JSR         $B971
27A5: 86 04          LDA         #$04
27A7: 97 A9          STA         $A9
27A9: BE 0D 11       LDX         $0D11		; store softbutton handler
27AC: BF 0D 13       STX         $0D13
27AF: 8E A7 B6       LDX         #$A7B6		; softbutton handler to $a7b6
27B2: BF 0D 11       STX         $0D11
27B5: 39             RTS  

------------------------------------------------
--- CARTRIDGE menu: COPY yes ------------------- 
------------------------------------------------
27B6: C1 04          CMPB        #$04		; yes
27B8: 26 05          BNE         $27BF
27BA: CE A7 80       LDU         #$A780		; prepare jump to $a780
27BD: 20 09          BRA         $27C8

------------------------------------------------
--- CARTRIDGE menu: COPY no --------------------
------------------------------------------------
27BF: C1 09          CMPB        #$09		; no
27C1: 26 11          BNE         $27D4
27C3: CE A7 89       LDU         #$A789		; prepare jump to $a789
27C6: 0F CB          CLR         $CB
27C8: BE 0D 13       LDX         $0D13		; restore softbutton handler
27CB: BF 0D 11       STX         $0D11
27CE: 86 00          LDA         #$00
27D0: 97 A9          STA         $A9
27D2: 6E C4          JMP         ,U
------------------------------------------------
27D4: 39             RTS  

------------------------------------------------
--- sequencer: CREATE/ERASE --------------------
------------------------------------------------
27D5: 81 1A          CMPA        #$1A		; CREATE
27D7: 26 10          BNE         $27E9
27D9: 96 AA          LDA         $AA		; get seq/song mod. status
27DB: 81 00          CMPA        #$00		; status = 0
27DD: 27 04          BEQ         $27E3		; CREATE menu
27DF: 81 05          CMPA        #$05		; status = 5
27E1: 26 03          BNE         $27E6		;   -> $a7e6
27E3: 7E C3 42       JMP         $C342		; CREATE menu
------------------------------------------------
27E6: 7E A9 F6       JMP         $A9F6		; SEQ. MUST BE STOPPED

------------------------------------------------
--- sequencer: LOCATE --------------------------
------------------------------------------------
27E9: 81 1D          CMPA        #$1D		; LOCATE
27EB: 26 03          BNE         $27F0
27ED: 7E C1 8F       JMP         $C18F

------------------------------------------------
--- sequencer: TRACKS SELECT -------------------
------------------------------------------------
27F0: 81 1C          CMPA        #$1C		; TRACKS SELECT
27F2: 26 06          BNE         $27FA
27F4: BD BF 65       JSR         $BF65
27F7: 7E C2 8A       JMP         $C28A

------------------------------------------------
--- sequencer: TRACKS MIX MIDI -----------------
------------------------------------------------
27FA: 81 1E          CMPA        #$1E		; TRACKS MIX MIDI
27FC: 26 12          BNE         $2810
27FE: 96 A8          LDA         $A8
2800: 81 04          CMPA        #$04
2802: 25 09          BCS         $280D
2804: 81 07          CMPA        #$07
2806: 22 05          BHI         $280D
2808: 86 2F          LDA         #$2F
280A: 7E A4 67       JMP         $A467
------------------------------------------------
280D: 7E 80 97       JMP         $8097

------------------------------------------------
--- sequencer: EDIT ----------------------------
------------------------------------------------
2810: 81 1B          CMPA        #$1B		; EDIT
2812: 26 10          BNE         $2824
2814: 96 AA          LDA         $AA		; get seq/song mod status
2816: 81 00          CMPA        #$00		; status = 0
2818: 27 04          BEQ         $281E		;   -> $a81e
281A: 81 05          CMPA        #$05		; status = 5
281C: 26 03          BNE         $2821		;   -> $a821
281E: 7E B0 28       JMP         $B028		; else -> $b028
------------------------------------------------
2821: 7E A9 F6       JMP         $A9F6

------------------------------------------------
--- sequencer: RECORD --------------------------
------------------------------------------------
2824: 81 1F          CMPA        #$1F		; RECORD
2826: 26 3B          BNE         $2863
2828: 8A 80          ORA         #$80
282A: 97 A2          STA         $A2
282C: 96 A8          LDA         $A8
282E: 81 01          CMPA        #$01
2830: 26 0A          BNE         $283C
2832: 96 B4          LDA         $B4
2834: 81 83          CMPA        #$83
2836: 26 04          BNE         $283C
2838: 86 06          LDA         #$06
283A: 97 A9          STA         $A9
283C: 96 AA          LDA         $AA		; get seq/song status
283E: 81 01          CMPA        #$01		; status != 1
2840: 26 1E          BNE         $2860		;   -> $a860
2842: 0D B6          TST         $B6		; track empty
2844: 27 09          BEQ         $284F		;   -> return
2846: D6 F2          LDB         $F2		; get sequence
2848: 8E 01 C7       LDX         #$01C7		; sequence status base
284B: A6 85          LDA         B,X		; get sequence status byte
284D: 27 01          BEQ         $2850		; if existing -> $a850
284F: 39             RTS  

------------------------------------------------
2850: 86 02          LDA         #$02
2852: 97 AA          STA         $AA
2854: 97 CA          STA         $CA
2856: 8E 00 06       LDX         #$0006
2859: 4F             CLRA 
285A: BD AA 34       JSR         $AA34
285D: BD C2 8A       JSR         $C28A
2860: 16 01 71       LBRA        $29D4

------------------------------------------------
--- sequencer: STOP ----------------------------
------------------------------------------------
2863: 81 20          CMPA        #$20		; STOP
2865: 10 26 00 D3    LBNE        $293C
2869: 0F A7          CLR         $A7
286B: 96 AA          LDA         $AA		; get seq/song status
286D: 81 07          CMPA        #$07		; status != 7
286F: 26 13          BNE         $2884		;  -> $a884
2871: 96 A8          LDA         $A8
2873: 81 02          CMPA        #$02
2875: 25 0C          BCS         $2883
2877: 81 09          CMPA        #$09
2879: 22 08          BHI         $2883
287B: 0C A7          INC         $A7
287D: BD AF D7       JSR         $AFD7
2880: 7E C3 63       JMP         $C363
------------------------------------------------
2883: 39             RTS  

--- seq/song status 0
------------------------------------------------
2884: 81 00          CMPA        #$00
2886: 26 04          BNE         $288C
2888: 86 01          LDA         #$01
288A: 20 17          BRA         $28A3

--- seq/song status 5
------------------------------------------------
288C: 81 05          CMPA        #$05
288E: 26 30          BNE         $28C0
2890: 96 CD          LDA         $CD
2892: 27 0D          BEQ         $28A1
2894: 86 10          LDA         #$10
2896: 97 A8          STA         $A8
2898: 8E A8 A1       LDX         #$A8A1		; indir. jump vector to $a8a1
289B: BF 0D 15       STX         $0D15
289E: 7E AE 38       JMP         $AE38
------------------------------------------------
28A1: 86 06          LDA         #$06
28A3: 97 AA          STA         $AA
28A5: 97 CA          STA         $CA
28A7: 4F             CLRA 
28A8: 8E 00 0A       LDX         #$000A
28AB: BD AA 34       JSR         $AA34
28AE: 96 A8          LDA         $A8
28B0: 81 02          CMPA        #$02
28B2: 25 04          BCS         $28B8
28B4: 81 09          CMPA        #$09
28B6: 23 05          BLS         $28BD
28B8: 7E C1 8F       JMP         $C18F
------------------------------------------------
28BB: 20 03          BRA         $28C0
------------------------------------------------
28BD: 7E C3 63       JMP         $C363


--- seq/song status 8
------------------------------------------------
28C0: 81 08          CMPA        #$08
28C2: 26 0C          BNE         $28D0
28C4: 86 07          LDA         #$07
28C6: 97 AA          STA         $AA
28C8: 97 CA          STA         $CA
28CA: 8E 00 0C       LDX         #$000C
28CD: 7E AA 34       JMP         $AA34

--- seq/song status 6
------------------------------------------------
28D0: 81 06          CMPA        #$06
28D2: 26 04          BNE         $28D8
28D4: C6 05          LDB         #$05
28D6: 20 12          BRA         $28EA

--- seq/song status 2/3
------------------------------------------------
28D8: 81 02          CMPA        #$02
28DA: 27 04          BEQ         $28E0
28DC: 81 03          CMPA        #$03
28DE: 26 02          BNE         $28E2
28E0: 20 06          BRA         $28E8

--- seq/song status 1
------------------------------------------------
28E2: 81 01          CMPA        #$01
28E4: 26 0E          BNE         $28F4
28E6: 0F B0          CLR         $B0
28E8: C6 00          LDB         #$00
28EA: D7 AA          STB         $AA
28EC: D7 CA          STB         $CA
28EE: 8E 00 0C       LDX         #$000C
28F1: 7E AA 34       JMP         $AA34

--- seq/song status 4
------------------------------------------------
28F4: 81 04          CMPA        #$04
28F6: 26 41          BNE         $2939
28F8: C6 00          LDB         #$00
28FA: 96 F2          LDA         $F2
28FC: 8E 01 C7       LDX         #$01C7
28FF: A6 86          LDA         A,X
2901: 27 2A          BEQ         $292D
2903: 2B E5          BMI         $28EA
2905: D7 CA          STB         $CA
2907: 5F             CLRB 
2908: 7E C7 19       JMP         $C719
------------------------------------------------
290B: CE 76 63       LDU         #$7663		; KEEP FIRST TRACK ($5663)
290E: BD 99 56       JSR         $9956
2911: 86 10          LDA         #$10
2913: 97 A8          STA         $A8
2915: 86 93          LDA         #$93
2917: BD 99 81       JSR         $9981
291A: FC 01 11       LDD         $0111
291D: BD C3 CA       JSR         $C3CA
2920: 8E AE 87       LDX         #$AE87		; softbutton handler to $ae87
2923: BF 0D 11       STX         $0D11
2926: 86 09          LDA         #$09
2928: 97 AA          STA         $AA
292A: 7E BC B2       JMP         $BCB2
------------------------------------------------
292D: 86 07          LDA         #$07
292F: 97 AA          STA         $AA
2931: 97 CA          STA         $CA
2933: 8E 00 0C       LDX         #$000C
2936: 7E AA 34       JMP         $AA34

------------------------------------------------
2939: 16 00 98       LBRA        $29D4		; RTS

------------------------------------------------
--- sequencer: PLAY ----------------------------
------------------------------------------------
293C: 81 21          CMPA        #$21		; PLAY
293E: 10 26 00 92    LBNE        $29D4		; -> RTS
2942: 96 AA          LDA         $AA		
2944: 81 04          CMPA        #$04	
2946: 26 1C          BNE         $2964
2948: D6 F2          LDB         $F2		; get sequence
294A: 8E 01 C7       LDX         #$01C7		; sequence status base
294D: A6 85          LDA         B,X		; get sequence status byte
294F: 27 01          BEQ         $2952		; if existing -> $a952
2951: 39             RTS  			; else return

------------------------------------------------
2952: 86 08          LDA         #$08
2954: 97 AA          STA         $AA
2956: 97 CA          STA         $CA
2958: 0F A7          CLR         $A7
295A: 4F             CLRA 
295B: 8E 00 0A       LDX         #$000A
295E: BD AA 34       JSR         $AA34
2961: 7E C3 63       JMP         $C363


------------------------------------------------
2964: 81 05          CMPA        #$05
2966: 26 1B          BNE         $2983
2968: 96 CD          LDA         $CD
296A: 27 13          BEQ         $297F
296C: 86 10          LDA         #$10
296E: 97 A8          STA         $A8
2970: 8E A9 79       LDX         #$A979		; handler to $a979
2973: BF 0D 15       STX         $0D15
2976: 7E AE 38       JMP         $AE38
------------------------------------------------
2979: 96 CD          LDA         $CD
297B: 27 02          BEQ         $297F
297D: 0C A7          INC         $A7
297F: 86 06          LDA         #$06
2981: 20 28          BRA         $29AB
------------------------------------------------
2983: 81 07          CMPA        #$07
2985: 26 11          BNE         $2998
2987: BD AF D7       JSR         $AFD7
298A: 96 A8          LDA         $A8
298C: 81 02          CMPA        #$02
298E: 25 07          BCS         $2997
2990: 81 09          CMPA        #$09
2992: 22 03          BHI         $2997
2994: 7E C3 63       JMP         $C363
------------------------------------------------
2997: 39             RTS  
------------------------------------------------
2998: 81 01          CMPA        #$01
299A: 26 05          BNE         $29A1
299C: BD 8B 35       JSR         $8B35
299F: 20 08          BRA         $29A9
------------------------------------------------
29A1: 81 00          CMPA        #$00
29A3: 27 04          BEQ         $29A9
29A5: 81 02          CMPA        #$02
29A7: 26 2B          BNE         $29D4
29A9: 86 01          LDA         #$01
29AB: 97 AA          STA         $AA
29AD: 97 CA          STA         $CA
29AF: 96 A8          LDA         $A8
29B1: 81 02          CMPA        #$02
29B3: 25 04          BCS         $29B9
29B5: 81 09          CMPA        #$09
29B7: 23 05          BLS         $29BE
29B9: BD C1 8F       JSR         $C18F
29BC: 20 03          BRA         $29C1
------------------------------------------------
29BE: BD C3 63       JSR         $C363
29C1: 96 A7          LDA         $A7
29C3: 27 05          BEQ         $29CA
29C5: 8E 00 0A       LDX         #$000A
29C8: 20 03          BRA         $29CD
------------------------------------------------
29CA: 8E 00 08       LDX         #$0008
29CD: 0F A7          CLR         $A7
29CF: 86 01          LDA         #$01
29D1: 7E AA 34       JMP         $AA34
------------------------------------------------
29D4: 39             RTS  

------------------------------------------------
--- text: ** SEQUENCER MUST BE STOPPED *** -----
------------------------------------------------
29D5: 84 2A 2A 20 53 45 51 55 45 4E 43 45 52 20 4D 55   .** SEQUENCER MU
29E5: 53 54 20 42 45 20 53 54 4F 50 50 45 44 20 2A 2A   ST BE STOPPED **
29F5: 00                                                .

------------------------------------------------
--- print "SEQUENCER MUST BE STOPPED" (1) ------
------------------------------------------------
29F6: 8D 03          BSR         $29FB
29F8: 7E C1 8F       JMP         $C18F

------------------------------------------------
--- print "SEQUENCER MUST BE STOPPED" (2) ------
------------------------------------------------
29FB: CE A9 D5       LDU         #$A9D5		; text base
29FE: C6 05          LDB         #$05
2A00: 7E BC 17       JMP         $BC17

------------------------------------------------
--- record & play handler ----------------------
------------------------------------------------
2A03: 96 AA          LDA         $AA
2A05: 81 00          CMPA        #$00
2A07: 27 04          BEQ         $2A0D
2A09: 81 02          CMPA        #$02
2A0B: 26 26          BNE         $2A33
2A0D: 96 F2          LDA         $F2		; sequence
2A0F: 8E 01 C7       LDX         #$01C7		; sequence status base
2A12: A6 86          LDA         A,X		; get sequence status byte
2A14: 27 04          BEQ         $2A1A		; if existing -> $aa1a
2A16: 86 03          LDA         #$03
2A18: 20 02          BRA         $2A1C
------------------------------------------------
2A1A: 86 04          LDA         #$04
2A1C: 97 AA          STA         $AA
2A1E: 97 CA          STA         $CA
2A20: D6 F6          LDB         $F6
2A22: 5C             INCB 
2A23: D7 B6          STB         $B6
2A25: BD AB 0D       JSR         $AB0D
2A28: 8E 00 06       LDX         #$0006
2A2B: 86 01          LDA         #$01
2A2D: BD AA 34       JSR         $AA34
2A30: BD C2 8A       JSR         $C28A
2A33: 39             RTS  

------------------------------------------------
2A34: BD 84 79       JSR         $8479
2A37: AF 22          STX         +$02,Y
2A39: ED 24          STD         +$04,Y
2A3B: CC 00 00       LDD         #$0000
2A3E: ED 26          STD         +$06,Y
2A40: BD 84 AE       JSR         $84AE
2A43: 0B 6D	     fdb	 $0B6D
2A45: 39             RTS

------------------------------------------------
2A46: BD 84 79       JSR         $8479
2A49: AF 22          STX         +$02,Y
2A4B: A7 24          STA         +$04,Y
2A4D: E7 26          STB         +$06,Y
2A4F: 26 04          BNE         $2A55
2A51: 96 BE          LDA         $BE
2A53: A7 25          STA         +$05,Y
2A55: BD 84 AE       JSR         $84AE
2A58: 0B 6D	     fdb	 $0B6D
2A5A: 39      	     RTS

------------------------------------------------
2A5B: 8E AF 94       LDX         #$AF94		; softbutton handler to $af94
2A5E: BF 0D 11       STX         $0D11
2A61: 86 0B          LDA         #$0B
2A63: 97 A8          STA         $A8
2A65: CE 76 CF       LDU         #$76CF		; $56CF: PLAY ORIGINAL TRACK
2A68: 7E 99 56       JMP         $9956

------------------------------------------------
2A6B: D6 B6          LDB         $B6		; track
2A6D: 27 03          BEQ         $2A72
2A6F: 5A             DECB 
2A70: D7 F6          STB         $F6
2A72: 96 CA          LDA         $CA
2A74: 97 AA          STA         $AA
2A76: 81 07          CMPA        #$07
2A78: 26 03          BNE         $2A7D
2A7A: 7E AA 5B       JMP         $AA5B
------------------------------------------------
2A7D: BD C1 8F       JSR         $C18F
2A80: 7E C1 ED       JMP         $C1ED
------------------------------------------------
2A83: 86 04          LDA         #$04
2A85: 97 AA          STA         $AA
2A87: 97 CA          STA         $CA
2A89: BD BC B2       JSR         $BCB2
2A8C: 7E C3 63       JMP         $C363
------------------------------------------------
2A8F: 4D             TSTA 
2A90: 26 0B          BNE         $2A9D
2A92: 5D             TSTB 
2A93: 27 04          BEQ         $2A99
2A95: 86 08          LDA         #$08
2A97: 20 06          BRA         $2A9F
------------------------------------------------
2A99: 86 01          LDA         #$01
2A9B: 20 02          BRA         $2A9F
------------------------------------------------
2A9D: 86 06          LDA         #$06
2A9F: 97 AA          STA         $AA
2AA1: 97 CA          STA         $CA
2AA3: BD BC AE       JSR         $BCAE
2AA6: 96 A8          LDA         $A8
2AA8: 81 0B          CMPA        #$0B
2AAA: 26 01          BNE         $2AAD
2AAC: 39             RTS  
------------------------------------------------
2AAD: 7E C3 63       JMP         $C363
------------------------------------------------
2AB0: 4D             TSTA 
2AB1: 26 0B          BNE         $2ABE
2AB3: 5D             TSTB 
2AB4: 2F 04          BLE         $2ABA
2AB6: 86 07          LDA         #$07
2AB8: 20 06          BRA         $2AC0
------------------------------------------------
2ABA: 86 00          LDA         #$00
2ABC: 20 02          BRA         $2AC0
------------------------------------------------
2ABE: 86 05          LDA         #$05
2AC0: 97 AA          STA         $AA
2AC2: 97 CA          STA         $CA
2AC4: 5D             TSTB 
2AC5: 10 2B FE 42    LBMI        $290B
2AC9: 27 03          BEQ         $2ACE
2ACB: 7E AA 5B       JMP         $AA5B
------------------------------------------------
2ACE: BD BC AE       JSR         $BCAE
2AD1: 96 A8          LDA         $A8
2AD3: 81 08          CMPA        #$08
2AD5: 26 05          BNE         $2ADC
2AD7: 0F B0          CLR         $B0
2AD9: 7E BF AD       JMP         $BFAD
------------------------------------------------
2ADC: 7E C3 63       JMP         $C363

------------------------------------------------
--- error handler: sequencer memory is full ----
------------------------------------------------
2ADF: CE 76 88       LDU         #$7688		; SEQ MEMORY IS FULL ($5688)
2AE2: C6 0A          LDB         #$0A
2AE4: BD BC 17       JSR         $BC17
2AE7: 4F             CLRA 
2AE8: BD B0 AD       JSR         $B0AD
2AEB: 7E BF AD       JMP         $BFAD

------------------------------------------------
2AEE: 96 AA          LDA         $AA
2AF0: 81 08          CMPA        #$08
2AF2: 27 08          BEQ         $2AFC
2AF4: C1 00          CMPB        #$00
2AF6: 27 04          BEQ         $2AFC
2AF8: C1 05          CMPB        #$05
2AFA: 26 01          BNE         $2AFD
2AFC: 39             RTS  
------------------------------------------------
2AFD: C1 06          CMPB        #$06
2AFF: 25 05          BCS         $2B06

------------------------------------------------
--- $FFEE --------------------------------------
------------------------------------------------
2B01: C1 09          CMPB        #$09
2B03: 22 01          BHI         $2B06
2B05: 5A             DECB 
2B06: D1 B6          CMPB        $B6		; track
2B08: 26 01          BNE         $2B0B
2B0A: 5F             CLRB 

------------------------------------------------
2B0B: D7 B6          STB         $B6		; set current track no.
2B0D: 34 04          PSHS        B		; track no. to stack
2B0F: 96 B6          LDA         $B6		; get track no.
2B11: BD BB 58       JSR         $BB58		; calc. TDB pointer
2B14: 1F 03          TFR         D,U
2B16: BE 0D 0B       LDX         $0D0B		; get pointer		
2B19: EC 84          LDD         ,X		; get value pointed to
2B1B: 10 83 0D 6A    CMPD        #$0D6A
2B1F: 26 09          BNE         $2B2A
2B21: 0F C7          CLR         $C7
2B23: 96 D1          LDA         $D1
2B25: BD BA 7B       JSR         $BA7B		; get address of sound prog.
2B28: ED 84          STD         ,X		; set address
2B2A: 6D 42          TST         +$02,U
2B2C: 2A 06          BPL         $2B34
2B2E: BD BF 53       JSR         $BF53		; set $cd to 1
2B31: BD AB 6C       JSR         $AB6C
2B34: FF 0D 0B       STU         $0D0B		; store TDB pointer
2B37: A6 42          LDA         +$02,U
2B39: 97 D1          STA         $D1
2B3B: BD BA 73       JSR         $BA73		; store program address
2B3E: FD 0D 07       STD         $0D07		;   to $0d07
2B41: 11 93 C1       CMPU        $C1
2B44: 27 0B          BEQ         $2B51
2B46: BD BB E5       JSR         $BBE5		; clear stored keycodes
2B49: 1F 31          TFR         U,X
2B4B: BD 89 43       JSR         $8943
2B4E: BD 89 E7       JSR         $89E7
2B51: E6 E0          LDB         ,S+
2B53: 27 0D          BEQ         $2B62
2B55: 96 AA          LDA         $AA
2B57: 81 07          CMPA        #$07
2B59: 27 07          BEQ         $2B62
2B5B: 81 08          CMPA        #$08
2B5D: 27 03          BEQ         $2B62
2B5F: 5A             DECB 
2B60: D7 F6          STB         $F6
2B62: 96 A8          LDA         $A8
2B64: 81 03          CMPA        #$03
2B66: 26 03          BNE         $2B6B
2B68: 7E C2 A9       JMP         $C2A9		; TRACK TYPE menu
------------------------------------------------
2B6B: 39             RTS  
------------------------------------------------
2B6C: C6 0E          LDB         #$0E
2B6E: A6 85          LDA         B,X
2B70: A7 C5          STA         B,U
2B72: 5A             DECB 
2B73: 2A F9          BPL         $2B6E
2B75: E6 43          LDB         +$03,U
2B77: C4 CF          ANDB        #$CF
2B79: E7 43          STB         +$03,U
2B7B: 6F 45          CLR         +$05,U
2B7D: 39             RTS  
------------------------------------------------
2B7E: 96 AA          LDA         $AA
2B80: 81 0F          CMPA        #$0F
2B82: 27 04          BEQ         $2B88
2B84: 81 0E          CMPA        #$0E
2B86: 26 75          BNE         $2BFD
2B88: C1 02          CMPB        #$02
2B8A: 26 12          BNE         $2B9E
2B8C: 86 0F          LDA         #$0F
2B8E: 97 AA          STA         $AA
2B90: 86 7E          LDA         #$7E
2B92: 97 C8          STA         $C8
2B94: BD BB CB       JSR         $BBCB
2B97: 86 95          LDA         #$95
2B99: C6 02          LDB         #$02
2B9B: 7E BB DA       JMP         $BBDA


------------------------------------------------
--- button 8
------------------------------------------------
2B9E: C1 08          CMPB        #$08
2BA0: 26 12          BNE         $2BB4
2BA2: 86 0E          LDA         #$0E
2BA4: 97 AA          STA         $AA
2BA6: 86 7C          LDA         #$7C
2BA8: 97 C8          STA         $C8
2BAA: BD BB CB       JSR         $BBCB
2BAD: 86 C1          LDA         #$C1
2BAF: C6 04          LDB         #$04
2BB1: 7E BB DA       JMP         $BBDA

------------------------------------------------
--- button 4
------------------------------------------------
2BB4: C1 04          CMPB        #$04
2BB6: 26 3E          BNE         $2BF6
2BB8: 0D CD          TST         $CD
2BBA: 27 09          BEQ         $2BC5
2BBC: 8E AB C5       LDX         #$ABC5
2BBF: BF 0D 15       STX         $0D15
2BC2: 7E AE 38       JMP         $AE38
------------------------------------------------
2BC5: 8E 00 16       LDX         #$0016
2BC8: 96 BF          LDA         $BF
2BCA: BD BB B4       JSR         $BBB4
2BCD: 97 D0          STA         $D0
2BCF: 96 BF          LDA         $BF
2BD1: 5F             CLRB 
2BD2: BD AA 46       JSR         $AA46
2BD5: 86 00          LDA         #$00
2BD7: 97 CA          STA         $CA
2BD9: 96 F5          LDA         $F5
2BDB: 8A 80          ORA         #$80
2BDD: 97 F5          STA         $F5
2BDF: CC 00 00       LDD         #$0000
2BE2: FD 0D 19       STD         $0D19
2BE5: 86 10          LDA         #$10
2BE7: 97 AA          STA         $AA
2BE9: 4F             CLRA 
2BEA: 97 B6          STA         $B6
2BEC: 34 02          PSHS        A
2BEE: BD BB 58       JSR         $BB58
2BF1: 1F 03          TFR         D,U
2BF3: 7E AB 34       JMP         $AB34


------------------------------------------------
--- button 9
------------------------------------------------
2BF6: C1 09          CMPB        #$09
2BF8: 26 02          BNE         $2BFC
2BFA: 20 3F          BRA         $2C3B
------------------------------------------------
2BFC: 39             RTS  


------------------------------------------------
2BFD: 81 11          CMPA        #$11		; function 11
2BFF: 26 4B          BNE         $2C4C
2C01: C1 04          CMPB        #$04		; button 4
2C03: 27 05          BEQ         $2C0A
2C05: C1 09          CMPB        #$09		; button 9
2C07: 27 32          BEQ         $2C3B
2C09: 39             RTS  

-- function 11, button 4
------------------------------------------------
2C0A: 96 D0          LDA         $D0
2C0C: 2A 06          BPL         $2C14
2C0E: 0F D0          CLR         $D0
2C10: C6 FF          LDB         #$FF
2C12: 20 13          BRA         $2C27

--- function 6
------------------------------------------------
2C14: 81 06          CMPA        #$06
2C16: 24 04          BCC         $2C1C
2C18: 96 F2          LDA         $F2
2C1A: 20 09          BRA         $2C25

--- function >=6
------------------------------------------------
2C1C: 96 F5          LDA         $F5
2C1E: 84 7F          ANDA        #$7F
2C20: BD AD CE       JSR         $ADCE
2C23: 8B 3C          ADDA        #$3C

--- function <6
------------------------------------------------
2C25: C6 01          LDB         #$01
2C27: 34 06          PSHS        B,A
2C29: CE 7B 9F       LDU         #$7B9F		; EDITING SEQUENCE DATA
2C2C: C6 02          LDB         #$02
2C2E: BD BC 17       JSR         $BC17
2C31: 35 06          PULS        B,A
2C33: 8E 00 16       LDX         #$0016
2C36: BD AA 46       JSR         $AA46
2C39: 20 9A          BRA         $2BD5

--- function 11, button 9 (exit)
------------------------------------------------
2C3B: 86 00          LDA         #$00
2C3D: 97 AA          STA         $AA
2C3F: 0D D0          TST         $D0
2C41: 2A 06          BPL         $2C49
2C43: 86 7F          LDA         #$7F
2C45: 94 D0          ANDA        $D0
2C47: 97 D0          STA         $D0
2C49: 7E BF AD       JMP         $BFAD		; MAIN menu


------------------------------------------------
2C4C: 81 05          CMPA        #$05		; function 5:  erase seq
2C4E: 27 06          BEQ         $2C56
2C50: 81 00          CMPA        #$00		; function != 0
2C52: 10 26 00 F0    LBNE        $2D46

------------------------------------------------
--- CREATE menu: NEW SEQ -----------------------
------------------------------------------------
2C56: C1 00          CMPB        #$00		; new sequence (button 0)
2C58: 26 37          BNE         $2C91
2C5A: 5F             CLRB 			; check for free seq. space
2C5B: 8E 01 C7       LDX         #$01C7
2C5E: A6 85          LDA         B,X
2C60: 81 FF          CMPA        #$FF
2C62: 27 08          BEQ         $2C6C		; found -> create sequence
2C64: 5C             INCB 
2C65: C1 3B          CMPB        #$3B
2C67: 23 01          BLS         $2C6A
2C69: 39             RTS  			; no sequence space left
------------------------------------------------
2C6A: 20 F2          BRA         $2C5E

------------------------------------------------
--- create new sequence ------------------------
------------------------------------------------
2C6C: D7 BF          STB         $BF		; store sequence number
2C6E: CE 7B FE       LDU         #$7BFE		; CREATE NEW SEQ ($5bfe)
2C71: BD 99 56       JSR         $9956
2C74: 86 95          LDA         #$95		; cursor to #$05
2C76: BD 99 81       JSR         $9981	
2C79: 96 BF          LDA         $BF
2C7B: 4C             INCA 
2C7C: BD BB AB       JSR         $BBAB          ; print A
2C7F: 86 E8          LDA         #$E8		; print #$e8
2C81: BD 99 81       JSR         $9981
2C84: BD BC AE       JSR         $BCAE
2C87: 86 0A          LDA         #$0A
2C89: 97 BE          STA         $BE
2C8B: BD BE 61       JSR         $BE61
2C8E: 16 FE FB       LBRA        $2B8C

------------------------------------------------
--- CREATE menu: NEW SONG ----------------------
------------------------------------------------
2C91: C1 02          CMPB        #$02		; new song (button 2)
2C93: 26 42          BNE         $2CD7
2C95: 5F             CLRB 			; check for free song space
2C96: 8E 02 03       LDX         #$0203	
2C99: A6 85          LDA         B,X
2C9B: 81 FF          CMPA        #$FF
2C9D: 27 08          BEQ         $2CA7		; found -> create song
2C9F: 5C             INCB 
2CA0: C1 13          CMPB        #$13
2CA2: 23 01          BLS         $2CA5
2CA4: 39             RTS  			; no song space left
------------------------------------------------
2CA5: 20 F2          BRA         $2C99

------------------------------------------------
--- create new song ----------------------------
------------------------------------------------
2CA7: D7 F5          STB         $F5		; song number
2CA9: BD AD F5       JSR         $ADF5
2CAC: CE 7C 31       LDU         #$7C31		; CREATE NEW SONG ($5731)
2CAF: BD 99 56       JSR         $9956
2CB2: 86 12          LDA         #$12
2CB4: 97 AA          STA         $AA
2CB6: 86 91          LDA         #$91
2CB8: BD AD BB       JSR         $ADBB
2CBB: 4F             CLRA 
2CBC: BD AD AD       JSR         $ADAD		; calc. screen buffer addr.
2CBF: 0F BD          CLR         $BD
2CC1: BD A5 25       JSR         $A525
2CC4: 86 91          LDA         #$91		; cursor to #$11, send $d9
2CC6: C6 D9          LDB         #$D9
2CC8: BD 99 7D       JSR         $997D
2CCB: 86 E8          LDA         #$E8		; print #$e8
2CCD: BD 99 81       JSR         $9981
2CD0: 86 7E          LDA         #$7E
2CD2: 97 C8          STA         $C8
2CD4: 7E BC AE       JMP         $BCAE

------------------------------------------------
--- CREATE menu: ERASE SEQ ---------------------
------------------------------------------------
2CD7: C1 05          CMPB        #$05		; erase seq (button 5)
2CD9: 26 1E          BNE         $2CF9
2CDB: 86 11          LDA         #$11
2CDD: 97 AA          STA         $AA
2CDF: CE 7C 67       LDU         #$7C67		; ERASE EXISTING ($5b67)
2CE2: BD 99 56       JSR         $9956
2CE5: 86 8F          LDA         #$8F		; cursor to #$0f
2CE7: BD 99 81       JSR         $9981
2CEA: CE 7C 85       LDU         #$7C85		; SEQ ($5c85)
2CED: BD 99 56       JSR         $9956
2CF0: BD AE 71       JSR         $AE71
2CF3: 96 F2          LDA         $F2		; active sequence
2CF5: 4C             INCA 			; perform sequence erasion
2CF6: 7E BB AB       JMP         $BBAB          ; print A

------------------------------------------------
--- CREATE menu: ERASE SONG --------------------
------------------------------------------------
2CF9: C1 07          CMPB        #$07		; erase song (button 7)
2CFB: 26 29          BNE         $2D26
2CFD: 8D 1D          BSR         $2D1C		; get song pointer
2CFF: 2B 24          BMI         $2D25		; song is unused -> skip
2D01: 86 11          LDA         #$11
2D03: 97 AA          STA         $AA
2D05: BD AE 68       JSR         $AE68	
2D08: CE 7C 67       LDU         #$7C67		; ERASE EXISTING ($5b67)
2D0B: BD 99 56       JSR         $9956
2D0E: 86 8F          LDA         #$8F		; cursor to #$0f
2D10: BD 99 81       JSR         $9981
2D13: CE 7C 8B       LDU         #$7C8B		; SONG ($5c8b)
2D16: BD 99 56       JSR         $9956
2D19: 7E AD BB       JMP         $ADBB		; CREATE/ERASE SONG menu

------------------------------------------------
--- get song pointer from #$0203 ---------------
------------------------------------------------
2D1C: 8E 02 03       LDX         #$0203
2D1F: D6 F5          LDB         $F5		; get song to delete
2D21: C4 7F          ANDB        #$7F		; skip bit 7
2D23: A6 85          LDA         B,X		; get song pointer
2D25: 39             RTS  

------------------------------------------------
--- CREATE menu: ERASE ALL ---------------------
------------------------------------------------
2D26: C1 09          CMPB        #$09		; erase all (button 9)
2D28: 26 1B          BNE         $2D45
2D2A: 86 11          LDA         #$11
2D2C: 97 AA          STA         $AA
2D2E: 86 80          LDA         #$80
2D30: 9A D0          ORA         $D0
2D32: 97 D0          STA         $D0
2D34: CE 7C 67       LDU         #$7C67		; ERASE EXISTING ($6c67)
2D37: BD 99 56       JSR         $9956
2D3A: 86 86          LDA         #$86		; cursor to position $06
2D3C: BD 99 81       JSR         $9981		;
2D3F: CE 7C 91       LDU         #$7C91		; ALL ($5c91)
2D42: 7E 99 56       JMP         $9956
------------------------------------------------
2D45: 39             RTS  

--- function 12
------------------------------------------------
2D46: 81 12          CMPA        #$12
2D48: 26 55          BNE         $2D9F


--- button 4
2D4A: C1 04          CMPB        #$04		; button 4
2D4C: 26 13          BNE         $2D61
2D4E: 86 01          LDA         #$01
2D50: B7 0D 1B       STA         $0D1B
2D53: BD D4 EF       JSR         $D4EF
2D56: 4D             TSTA 
2D57: 27 03          BEQ         $2D5C
2D59: 7E AA DF       JMP         $AADF
------------------------------------------------
2D5C: 0F E8          CLR         $E8
2D5E: 7E B0 FA       JMP         $B0FA

--- button 9
------------------------------------------------
2D61: C1 09          CMPB        #$09		; button 9 
2D63: 26 10          BNE         $2D75
2D65: 96 F5          LDA         $F5
2D67: BD AD CE       JSR         $ADCE
2D6A: BD BC B2       JSR         $BCB2
2D6D: 86 01          LDA         #$01
2D6F: BD B0 AD       JSR         $B0AD
2D72: 7E BF AD       JMP         $BFAD

--- button 6
------------------------------------------------
2D75: 96 BD          LDA         $BD
2D77: C1 06          CMPB        #$06
2D79: 26 0E          BNE         $2D89
2D7B: 4D             TSTA 
2D7C: 26 06          BNE         $2D84
2D7E: 86 05          LDA         #$05
2D80: C6 96          LDB         #$96
2D82: 20 03          BRA         $2D87
------------------------------------------------
2D84: 4A             DECA 
2D85: C6 D5          LDB         #$D5
2D87: 20 10          BRA         $2D99

--- button 7
------------------------------------------------
2D89: C1 07          CMPB        #$07
2D8B: 26 11          BNE         $2D9E
2D8D: 81 05          CMPA        #$05
2D8F: 25 05          BCS         $2D96
2D91: 4F             CLRA 
2D92: C6 91          LDB         #$91
2D94: 20 03          BRA         $2D99
------------------------------------------------
2D96: 4C             INCA 
2D97: C6 D4          LDB         #$D4
2D99: 8D 12          BSR         $2DAD		; calc. screen buffer addr.
2D9B: 7E A5 12       JMP         $A512
------------------------------------------------
2D9E: 39             RTS  

--- function 20
------------------------------------------------
2D9F: 81 20          CMPA        #$20
2DA1: 26 09          BNE         $2DAC
2DA3: C1 09          CMPB        #$09		; button 9
2DA5: 26 03          BNE         $2DAA
2DA7: 7E B1 1C       JMP         $B11C
------------------------------------------------
2DAA: 20 C9          BRA         $2D75
------------------------------------------------
2DAC: 39             RTS  


------------------------------------------------
--- calc screen buffer address for seq/song ----
------------------------------------------------
2DAD: 34 06          PSHS        B,A
2DAF: 8E 02 17       LDX         #$0217		; buffer (6*18)
2DB2: 96 F5          LDA         $F5		; seq / song
2DB4: C6 06          LDB         #$06		; length of name
2DB6: 3D             MUL  
2DB7: 30 8B          LEAX        D,X		; screen buffer address to X
2DB9: 35 86          PULS        PC,B,A

------------------------------------------------
--- create song menu ---------------------------
------------------------------------------------
2DBB: BD 99 81       JSR         $9981
2DBE: 96 F5          LDA         $F5		; get song status byte
2DC0: 84 7F          ANDA        #$7F		; skip bit 7
2DC2: C6 06          LDB         #$06		; length of name
2DC4: 8E 02 17       LDX         #$0217		; start of display buffer
2DC7: 7E B9 71       JMP         $B971		; create display buffer
------------------------------------------------

2DCA: 58 58 58 58                                       XXXX

------------------------------------------------
2DCE: 34 56          PSHS        U,X,B,A
2DD0: C6 06          LDB         #$06		; get display position
2DD2: 3D             MUL  
2DD3: 8E 02 17       LDX         #$0217		; get pos. address in buffer
2DD6: 30 8B          LEAX        D,X
2DD8: CE AD CA       LDU         #$ADCA		; copy "XXXX" to position
2DDB: C6 04          LDB         #$04
2DDD: A6 C0          LDA         ,U+
2DDF: A7 80          STA         ,X+
2DE1: 5A             DECB 
2DE2: 26 F9          BNE         $2DDD
2DE4: A6 E4          LDA         ,S		; a=[s]
2DE6: BD BB B4       JSR         $BBB4		; -> b=[s]-$0a, a=$01 		
2DE9: 8B 30          ADDA        #$30		; $01
2DEB: CB 30          ADDB        #$30		; $3a
2DED: ED 84          STD         ,X		; write a,b to $021b+d
2DEF: 35 D6          PULS        PC,U,X,B,A
------------------------------------------------

2DF1: 53 4F 4E 47                                       SONG

------------------------------------------------
--- create SONG menu (B contains song no. ) ----
------------------------------------------------
2DF5: 34 56          PSHS        U,X,B,A
2DF7: 86 06          LDA         #$06		; get offset position
2DF9: 3D             MUL  
2DFA: 8E 02 17       LDX         #$0217		; copy "SONG" to screenbuffer
2DFD: 30 8B          LEAX        D,X		;   at correct position
2DFF: CE AD F1       LDU         #$ADF1		
2E02: C6 04          LDB         #$04
2E04: A6 C0          LDA         ,U+
2E06: A7 80          STA         ,X+
2E08: 5A             DECB 
2E09: 26 F9          BNE         $2E04
2E0B: 35 D6          PULS        PC,U,X,B,A

------------------------------------------------
2E0D: 4F             CLRA 
2E0E: BD B0 AD       JSR         $B0AD
2E11: 86 08          LDA         #$08
2E13: 97 A8          STA         $A8
2E15: 20 04          BRA         $2E1B
------------------------------------------------
2E17: 96 CA          LDA         $CA
2E19: 97 AA          STA         $AA
2E1B: 96 B6          LDA         $B6
2E1D: 27 0B          BEQ         $2E2A
2E1F: BE 0D 0B       LDX         $0D0B
2E22: 6D 02          TST         +$02,X
2E24: 2A 04          BPL         $2E2A
2E26: 5F             CLRB 
2E27: BD AB 0B       JSR         $AB0B
2E2A: 96 A8          LDA         $A8
2E2C: 81 08          CMPA        #$08
2E2E: 27 04          BEQ         $2E34
2E30: 81 0A          CMPA        #$0A
2E32: 26 03          BNE         $2E37
2E34: 7E BF AD       JMP         $BFAD
------------------------------------------------
2E37: 39             RTS  
------------------------------------------------
2E38: BD BC B2       JSR         $BCB2
2E3B: BE 0D 11       LDX         $0D11		; save softbutton handler
2E3E: BF 0D 13       STX         $0D13
2E41: 8E AE 51       LDX         #$AE51		; softbutton handler to $0d11
2E44: BF 0D 11       STX         $0D11
2E47: 86 0A          LDA         #$0A
2E49: 97 AA          STA         $AA
2E4B: CE 7C A9       LDU         #$7CA9		; SAVE CHANGES... ($5ca9)
2E4E: 7E 99 56       JMP         $9956

------------------------------------------------
--- SAVE CHANGES TO OLD SEQUENCE: YES ----------
------------------------------------------------
2E51: C1 04          CMPB        #$04
2E53: 26 02          BNE         $2E57
2E55: 20 06          BRA         $2E5D

------------------------------------------------
--- SAVE CHANGES TO OLD SEQUENCE: NO -----------
------------------------------------------------
2E57: C1 09          CMPB        #$09
2E59: 26 0C          BNE         $2E67
2E5B: 0F CD          CLR         $CD
2E5D: BE 0D 13       LDX         $0D13		; restore previous
2E60: BF 0D 11       STX         $0D11		;   softbutton handler
2E63: 6E 9F 0D 15    JMP         [$0D15]
------------------------------------------------
2E67: 39             RTS  

------------------------------------------------
--- set active song ----------------------------
------------------------------------------------
2E68: 86 06          LDA         #$06
2E6A: 9B A5          ADDA        $A5
2E6C: 84 7F          ANDA        #$7F		; skip bit 7
2E6E: 97 D0          STA         $D0		; set active song
2E70: 39             RTS  

------------------------------------------------
2E71: 96 F2          LDA         $F2		; get actual sequence
2E73: BD BB B4       JSR         $BBB4		; a=int(b/10)
2E76: 97 D0          STA         $D0		; set active song
2E78: D6 A5          LDB         $A5
2E7A: 81 03          CMPA        #$03
2E7C: 25 04          BCS         $2E82
2E7E: CA 01          ORB         #$01
2E80: 20 02          BRA         $2E84
------------------------------------------------
2E82: C4 80          ANDB        #$80
2E84: D7 A5          STB         $A5
2E86: 39             RTS  

------------------------------------------------
2E87: C1 04          CMPB        #$04		; yes
2E89: 26 07          BNE         $2E92
2E8B: BD C3 F4       JSR         $C3F4
2E8E: 86 01          LDA         #$01
2E90: 20 12          BRA         $2EA4
------------------------------------------------
2E92: C1 09          CMPB        #$09		; no
2E94: 26 14          BNE         $2EAA
2E96: 86 00          LDA         #$00
2E98: 97 AA          STA         $AA
2E9A: CC 00 00       LDD         #$0000
2E9D: FD 0D 19       STD         $0D19
2EA0: BD C1 8F       JSR         $C18F
2EA3: 4F             CLRA 
2EA4: 8E 00 18       LDX         #$0018
2EA7: BD AA 34       JSR         $AA34
2EAA: 39             RTS  

------------------------------------------------
2EAB: 96 AA          LDA         $AA
2EAD: 81 0C          CMPA        #$0C
2EAF: 26 15          BNE         $2EC6
2EB1: C1 09          CMPB        #$09		; button 9
2EB3: 26 05          BNE         $2EBA
2EB5: 86 1D          LDA         #$1D
2EB7: 7E 71 3A       JMP         $713A
------------------------------------------------
2EBA: C1 07          CMPB        #$07		; button 7
2EBC: 26 07          BNE         $2EC5
2EBE: 0C A7          INC         $A7
2EC0: FC 0D 19       LDD         $0D19
2EC3: 20 4C          BRA         $2F11
------------------------------------------------
2EC5: 39             RTS  
------------------------------------------------
2EC6: 81 00          CMPA        #$00
2EC8: 27 05          BEQ         $2ECF
2ECA: 81 07          CMPA        #$07
2ECC: 27 01          BEQ         $2ECF
2ECE: 39             RTS  

------------------------------------------------
--- LOCATE menu: GOTO --------------------------
------------------------------------------------
2ECF: C1 07          CMPB        #$07		; GOTO pressed?
2ED1: 26 22          BNE         $2EF5
2ED3: CE 7B E1       LDU         #$7BE1		; GOTO  *EXIT* ($5be1)
2ED6: BD 99 56       JSR         $9956
2ED9: CE 7B F1       LDU         #$7BF1		; BAR= ($5bf1)
2EDC: BD 99 56       JSR         $9956
2EDF: FC 0D 19       LDD         $0D19
2EE2: C3 00 01       ADDD        #$0001
2EE5: BD C3 CA       JSR         $C3CA
2EE8: 86 7F          LDA         #$7F
2EEA: 97 C8          STA         $C8
2EEC: BD BC AE       JSR         $BCAE
2EEF: 86 0C          LDA         #$0C
2EF1: 97 AA          STA         $AA
2EF3: 20 2C          BRA         $2F21

------------------------------------------------
--- LOCATE menu: BACKUP ------------------------
------------------------------------------------
2EF5: C1 08          CMPB        #$08		; BACKUP pressed?
2EF7: 26 0F          BNE         $2F08
2EF9: FE 01 11       LDU         $0111
2EFC: 27 04          BEQ         $2F02
2EFE: 0C A7          INC         $A7
2F00: 33 5F          LEAU        -$01,U
2F02: 1F 30          TFR         U,D
2F04: 20 0B          BRA         $2F11
------------------------------------------------
2F06: 20 19          BRA         $2F21

------------------------------------------------
--- LOCATE menu: BEGIN -------------------------
------------------------------------------------
2F08: C1 09          CMPB        #$09		; BEGIN pressed?
2F0A: 26 15          BNE         $2F21
2F0C: 0F A7          CLR         $A7
2F0E: CC 00 00       LDD         #$0000
2F11: 8E 00 00       LDX         #$0000
2F14: BD AA 34       JSR         $AA34
2F17: BD C3 EC       JSR         $C3EC
2F1A: BD BC B2       JSR         $BCB2
2F1D: 86 0D          LDA         #$0D
2F1F: 97 AA          STA         $AA
2F21: 39             RTS  
------------------------------------------------
2F22: 96 AA          LDA         $AA
2F24: 81 15          CMPA        #$15
2F26: 26 16          BNE         $2F3E

------------------------------------------------
--- LOCATE menu: EXIT (button 9) ---------------
------------------------------------------------
2F28: C1 09          CMPB        #$09		; EXIT pressed?
2F2A: 26 05          BNE         $2F31
2F2C: 86 1D          LDA         #$1D
2F2E: 7E 71 3A       JMP         $713A

------------------------------------------------
--- LOCATE menu: GOTO (button 7) ---------------
------------------------------------------------
2F31: C1 07          CMPB        #$07		; GOTO pressed?
2F33: 26 08          BNE         $2F3D
2F35: 0C A7          INC         $A7
2F37: 4F             CLRA 
2F38: F6 0D 1B       LDB         $0D1B
2F3B: 20 46          BRA         $2F83
------------------------------------------------
2F3D: 39             RTS  

------------------------------------------------
2F3E: 81 05          CMPA        #$05
2F40: 10 26 00 4F    LBNE        $2F93

------------------------------------------------
--- button 7
------------------------------------------------
2F44: C1 07          CMPB        #$07
2F46: 26 1F          BNE         $2F67
2F48: CE 7B E1       LDU         #$7BE1		; GOTO *EXIT*
2F4B: BD 99 56       JSR         $9956
2F4E: CE 7B F7       LDU         #$7BF7		; STEP=
2F51: BD 99 56       JSR         $9956
2F54: B6 0D 1B       LDA         $0D1B
2F57: BD BB AB       JSR         $BBAB          ; print A
2F5A: 86 7F          LDA         #$7F
2F5C: 97 C8          STA         $C8
2F5E: BD BC AE       JSR         $BCAE
2F61: 86 15          LDA         #$15
2F63: 97 AA          STA         $AA
2F65: 20 2C          BRA         $2F93

------------------------------------------------
--- button 8
------------------------------------------------
2F67: C1 08          CMPB        #$08
2F69: 26 0F          BNE         $2F7A
2F6B: F6 02 A9       LDB         $02A9
2F6E: C1 01          CMPB        #$01
2F70: 23 06          BLS         $2F78
2F72: 0C A7          INC         $A7
2F74: 5A             DECB 
2F75: 4F             CLRA 
2F76: 20 0B          BRA         $2F83
------------------------------------------------
2F78: 20 19          BRA         $2F93

------------------------------------------------
--- button 9
------------------------------------------------
2F7A: C1 09          CMPB        #$09
2F7C: 26 15          BNE         $2F93
2F7E: 0F A7          CLR         $A7
2F80: 4F             CLRA 
2F81: C6 01          LDB         #$01
2F83: 8E 00 00       LDX         #$0000
2F86: BD AA 34       JSR         $AA34
2F89: BD C3 EC       JSR         $C3EC
2F8C: 86 0D          LDA         #$0D
2F8E: 97 AA          STA         $AA
2F90: BD BC B2       JSR         $BCB2
2F93: 39             RTS  

------------------------------------------------
--- button 0
------------------------------------------------
2F94: C1 00          CMPB        #$00
2F96: 27 04          BEQ         $2F9C
2F98: C1 01          CMPB        #$01
2F9A: 26 25          BNE         $2FC1
2F9C: 96 AA          LDA         $AA
2F9E: 81 08          CMPA        #$08
2FA0: 26 02          BNE         $2FA4
2FA2: 20 0A          BRA         $2FAE

------------------------------------------------
--- button 7
------------------------------------------------
2FA4: 81 07          CMPA        #$07
2FA6: 26 18          BNE         $2FC0
2FA8: 86 08          LDA         #$08
2FAA: 97 AA          STA         $AA
2FAC: 97 CA          STA         $CA
2FAE: 4F             CLRA 
2FAF: 0D A7          TST         $A7
2FB1: 27 05          BEQ         $2FB8
2FB3: 8E 00 0A       LDX         #$000A
2FB6: 20 03          BRA         $2FBB
------------------------------------------------
2FB8: 8E 00 08       LDX         #$0008
2FBB: 0F A7          CLR         $A7
2FBD: 7E AA 34       JMP         $AA34
------------------------------------------------
2FC0: 39             RTS  

------------------------------------------------
--- button 3
------------------------------------------------
2FC1: C1 03          CMPB        #$03
2FC3: 27 04          BEQ         $2FC9

------------------------------------------------
--- button 4
------------------------------------------------
2FC5: C1 04          CMPB        #$04
2FC7: 26 18          BNE         $2FE1
2FC9: 96 AA          LDA         $AA
2FCB: 81 08          CMPA        #$08
2FCD: 26 02          BNE         $2FD1
2FCF: 20 0C          BRA         $2FDD
------------------------------------------------
2FD1: 96 AA          LDA         $AA
2FD3: 81 07          CMPA        #$07
2FD5: 26 09          BNE         $2FE0
2FD7: 86 08          LDA         #$08
2FD9: 97 AA          STA         $AA
2FDB: 97 CA          STA         $CA
2FDD: 4C             INCA 
2FDE: 20 CF          BRA         $2FAF
------------------------------------------------
2FE0: 39             RTS  

------------------------------------------------
--- button 5
------------------------------------------------
2FE1: C1 05          CMPB        #$05
2FE3: 27 04          BEQ         $2FE9

------------------------------------------------
--- button 6
------------------------------------------------
2FE5: C1 06          CMPB        #$06
2FE7: 26 1E          BNE         $3007
2FE9: 96 AA          LDA         $AA
2FEB: 81 08          CMPA        #$08
2FED: 27 04          BEQ         $2FF3
2FEF: 81 07          CMPA        #$07
2FF1: 26 13          BNE         $3006
2FF3: 86 00          LDA         #$00
2FF5: 97 AA          STA         $AA
2FF7: 97 CA          STA         $CA
2FF9: D6 B6          LDB         $B6
2FFB: 27 03          BEQ         $3000
2FFD: 5A             DECB 
2FFE: D7 F6          STB         $F6
3000: BD C1 8F       JSR         $C18F
3003: 4F             CLRA 
3004: 20 1B          BRA         $3021
------------------------------------------------
3006: 39             RTS  

------------------------------------------------
--- button 8
------------------------------------------------
3007: C1 08          CMPB        #$08
3009: 27 04          BEQ         $300F

------------------------------------------------
--- button 9
------------------------------------------------
300B: C1 09          CMPB        #$09
300D: 26 18          BNE         $3027
300F: 96 AA          LDA         $AA
3011: 81 07          CMPA        #$07
3013: 27 04          BEQ         $3019
3015: 81 08          CMPA        #$08
3017: 26 0E          BNE         $3027
3019: BD C3 F4       JSR         $C3F4
301C: 86 00          LDA         #$00
301E: 97 CA          STA         $CA
3020: 4C             INCA 
3021: 8E 00 18       LDX         #$0018
3024: 7E AA 34       JMP         $AA34
------------------------------------------------
3027: 39             RTS  

------------------------------------------------
--- EDIT menu ----------------------------------
------------------------------------------------
3028: BD BC B2       JSR         $BCB2
302B: CC 7F 0C       LDD         #$7F0C		
302E: 97 C8          STA         $C8
3030: D7 A8          STB         $A8
3032: 8E B0 3E       LDX         #$B03E		; softbutton handler to $b03e
3035: BF 0D 11       STX         $0D11
3038: CE 77 BC       LDU         #$77BC		; EDIT SELECT... ($57bc)
303B: 7E 99 54       JMP         $9954

------------------------------------------------
--- EDIT menu: SONG ----------------------------
------------------------------------------------
303E: C1 05          CMPB        #$05
3040: 26 11          BNE         $3053
3042: BD AD 1C       JSR         $AD1C
3045: 10 2A 00 93    LBPL        $30DC		; song selected?
3049: CE 77 F3       LDU         #$77F3		; NO SONG IS SEL. ($57f3)
304C: C6 08          LDB         #$08
304E: BD BC 17       JSR         $BC17
3051: 20 D5          BRA         $3028

------------------------------------------------
--- EDIT menu: SEQ -----------------------------
------------------------------------------------
3053: C1 06          CMPB        #$06
3055: 26 05          BNE         $305C
3057: 8D 52          BSR         $30AB		; seq. selected?
3059: 7E B2 5A       JMP         $B25A		; EDIT SEQUENCE menu

------------------------------------------------
--- EDIT menu: TRACK ---------------------------
------------------------------------------------
305C: C1 07          CMPB        #$07
305E: 26 07          BNE         $3067
3060: 8D 1A          BSR         $307C		; track selected?
3062: 8D 47          BSR         $30AB		; seq. selected?
3064: 7E B4 9B       JMP         $B49B		; EDIT TRACK menu

------------------------------------------------
--- EDIT menu: STEP ----------------------------
------------------------------------------------
3067: C1 08          CMPB        #$08
3069: 26 09          BNE         $3074
306B: 8D 0F          BSR         $307C		; track selected?
306D: 8D 1E          BSR         $308D		; data in track?
306F: 8D 37          BSR         $30A8		; check seq.
3071: 7E B6 1E       JMP         $B61E		; EDIT STEP menu

------------------------------------------------
--- EDIT menu: EXIT ----------------------------
------------------------------------------------
3074: C1 09          CMPB        #$09
3076: 26 03          BNE         $307B
3078: 7E BF AD       JMP         $BFAD		; MAIN menu (seq/song/prog)
------------------------------------------------
307B: 39             RTS  

------------------------------------------------
--- check, if track has been selected ----------
------------------------------------------------
307C: 0D B6          TST         $B6
307E: 26 0C          BNE         $308C
3080: CE 7B CA       LDU         #$7BCA		; NO TRACK SEL. ($5bca)
3083: C6 05          LDB         #$05
3085: BD BC 17       JSR         $BC17
3088: 32 62          LEAS        +$02,S
308A: 20 9C          BRA         $3028		; EDIT menu
------------------------------------------------
308C: 39             RTS  

------------------------------------------------
--- check if track contains data ---------------
------------------------------------------------
308D: 96 F2          LDA         $F2		; get sequence number
308F: 8E 01 C7       LDX         #$01C7		; sequence table base
3092: A6 86          LDA         A,X		; get sequence status byte
3094: 27 11          BEQ         $30A7
3096: CE 78 0C       LDU         #$780C		; NO DATA IN SEQ ($580c)
3099: C6 08          LDB         #$08
309B: BD BC 17       JSR         $BC17
309E: 35 06          PULS        B,A
30A0: 86 00          LDA         #$00
30A2: 97 AA          STA         $AA
30A4: 7E B0 28       JMP         $B028		; EDIT menu
------------------------------------------------
30A7: 39             RTS  

------------------------------------------------
--- check sequence (A=0) -----------------------
------------------------------------------------
30A8: 4F             CLRA 
30A9: 20 02          BRA         $30AD

------------------------------------------------
--- check sequence (A=1) -----------------------
------------------------------------------------
30AB: 86 01          LDA         #$01
30AD: 34 02          PSHS        A
30AF: 96 F5          LDA         $F5		; active song
30B1: 2B 0A          BMI         $30BD
30B3: 8A 80          ORA         #$80
30B5: 97 F5          STA         $F5
30B7: CC 00 00       LDD         #$0000
30BA: FD 0D 19       STD         $0D19
30BD: 86 00          LDA         #$00
30BF: 97 AA          STA         $AA
30C1: 97 CA          STA         $CA
30C3: BD A6 F3       JSR         $A6F3
30C6: 8E 00 04       LDX         #$0004
30C9: E6 E0          LDB         ,S+
30CB: 27 0C          BEQ         $30D9
30CD: 2B 05          BMI         $30D4
30CF: BD AA 34       JSR         $AA34
30D2: 20 05          BRA         $30D9
------------------------------------------------
30D4: 8B 14          ADDA        #$14
30D6: BD AA 46       JSR         $AA46
30D9: 7E AE 71       JMP         $AE71

------------------------------------------------
--- check if song has been selected ------------
------------------------------------------------
30DC: 0D F5          TST         $F5
30DE: 2A 1A          BPL         $30FA
30E0: 8E B0 EC       LDX         #$B0EC		; softbutton handler (YES/NO)
30E3: BF 0D 11       STX         $0D11		;   to $b0ec
30E6: CE 78 2E       LDU         #$782E		; SEL. SEQ. IN SONG ($582e)
30E9: 7E 99 54       JMP         $9954

------------------------------------------------
--- SELECT SEQ. IN SONG: yes
------------------------------------------------
30EC: C1 04          CMPB        #$04
30EE: 26 02          BNE         $30F2
30F0: 20 08          BRA         $30FA

------------------------------------------------
--- SELECT SEQ. IN SONG: no
------------------------------------------------
30F2: C1 09          CMPB        #$09
30F4: 26 03          BNE         $30F9
30F6: 7E B0 28       JMP         $B028		; EDIT menu
------------------------------------------------
30F9: 39             RTS  

------------------------------------------------
--- song related -------------------------------
------------------------------------------------
30FA: 0F FD          CLR         $FD
30FC: D6 F5          LDB         $F5
30FE: 2A 1C          BPL         $311C
3100: C4 7F          ANDB        #$7F
3102: D7 F5          STB         $F5
3104: 0D CD          TST         $CD
3106: 27 09          BEQ         $3111
3108: 8E B1 11       LDX         #$B111
310B: BF 0D 15       STX         $0D15
310E: 7E AE 38       JMP         $AE38

------------------------------------------------
--- edit step menu?
------------------------------------------------
3111: 86 05          LDA         #$05
3113: 97 AA          STA         $AA
3115: D6 F5          LDB         $F5
3117: CB 1E          ADDB        #$1E
3119: BD D0 03       JSR         $D003
311C: 86 0D          LDA         #$0D
311E: 97 A8          STA         $A8
3120: CE 78 5C       LDU         #$785C		; EDIT STEP ($585c)
3123: BD 99 54       JSR         $9954
3126: 86 85          LDA         #$85
3128: BD AD BB       JSR         $ADBB
312B: 86 91          LDA         #$91
312D: BD 99 81       JSR         $9981
3130: B6 02 A9       LDA         $02A9
3133: 0D FD          TST         $FD
3135: 27 01          BEQ         $3138
3137: 4C             INCA 
3138: BD BB AB       JSR         $BBAB          ; print A
313B: 86 97          LDA         #$97
313D: BD 99 81       JSR         $9981
3140: B6 01 01       LDA         $0101
3143: BD B8 71       JSR         $B871
3146: 86 9F          LDA         #$9F
3148: BD 99 81       JSR         $9981
314B: 96 F2          LDA         $F2
314D: 97 BF          STA         $BF
314F: 0D FD          TST         $FD
3151: 26 13          BNE         $3166
3153: 4C             INCA 
3154: BD BB AB       JSR         $BBAB          ; print A
3157: 86 A6          LDA         #$A6
3159: BD 99 81       JSR         $9981
315C: B6 02 AA       LDA         $02AA
315F: 97 C0          STA         $C0
3161: BD BB AB       JSR         $BBAB          ; print A
3164: 20 11          BRA         $3177
------------------------------------------------
3166: CC 58 58       LDD         #$5858
3169: BD 99 7D       JSR         $997D
316C: 86 A6          LDA         #$A6
316E: BD 99 81       JSR         $9981
3171: CC 58 58       LDD         #$5858
3174: BD 99 7D       JSR         $997D
3177: 8E B1 87       LDX         #$B187		; softbutton handler (EDIT SONG)
317A: BF 0D 11       STX         $0D11		;   to $b187
317D: BD BC AE       JSR         $BCAE
3180: 86 E8          LDA         #$E8
3182: BD 99 81       JSR         $9981
3185: 20 30          BRA         $31B7

------------------------------------------------
--- EDIT SONG menu: SONG NAME ------------------
------------------------------------------------
3187: C1 00          CMPB        #$00
3189: 26 16          BNE         $31A1
318B: CE 78 7B       LDU         #$787B		; RENAME SONG ($687b)
318E: BD 99 5A       JSR         $995A
3191: 8E AB 7E       LDX         #$AB7E		; softbutton handler to $ab7e
3194: BF 0D 11       STX         $0D11
3197: 86 20          LDA         #$20
3199: 97 AA          STA         $AA
319B: BD B2 32       JSR         $B232
319E: 7E AC B6       JMP         $ACB6

------------------------------------------------
--- EDIT SONG menu: TRANSPOSE VALUE ------------
------------------------------------------------
31A1: C1 02          CMPB        #$02
31A3: 26 0B          BNE         $31B0
31A5: BD BB CB       JSR         $BBCB
31A8: CC 7C 1F       LDD         #$7C1F
31AB: 8E 94 06       LDX         #$9406
31AE: 20 1C          BRA         $31CC

------------------------------------------------
--- EDIT SONG menu: SEQUENCE NUMBER ------------
------------------------------------------------
31B0: C1 03          CMPB        #$03
31B2: 26 0B          BNE         $31BF
31B4: BD BB CB       JSR         $BBCB
31B7: CC 7E 13       LDD         #$7E13
31BA: 8E 9B 06       LDX         #$9B06
31BD: 20 0D          BRA         $31CC

------------------------------------------------
--- EDIT SONG menu: NUMBER OF REPEATS ----------
------------------------------------------------
31BF: C1 04          CMPB        #$04
31C1: 26 12          BNE         $31D5
31C3: BD BB CB       JSR         $BBCB
31C6: CC 7F 14       LDD         #$7F14
31C9: 8E A2 06       LDX         #$A206
31CC: 97 C8          STA         $C8
31CE: D7 AA          STB         $AA
31D0: 1F 10          TFR         X,D
31D2: 7E BB DA       JMP         $BBDA

------------------------------------------------
--- EDIT SONG menu: INSERT STEP ----------------
------------------------------------------------
31D5: C1 05          CMPB        #$05
31D7: 26 0E          BNE         $31E7
31D9: BD B6 D6       JSR         $B6D6
31DC: 8D 54          BSR         $3232
31DE: BD D6 57       JSR         $D657
31E1: 4D             TSTA 
31E2: 27 38          BEQ         $321C
31E4: 7E AA DF       JMP         $AADF

------------------------------------------------
--- EDIT SONG menu: DELETE STEP ----------------
------------------------------------------------
31E7: C1 06          CMPB        #$06
31E9: 26 10          BNE         $31FB
31EB: BD B6 D6       JSR         $B6D6
31EE: 0D FD          TST         $FD
31F0: 27 04          BEQ         $31F6
31F2: 0F A6          CLR         $A6
31F4: 20 09          BRA         $31FF
------------------------------------------------
31F6: BD D6 E8       JSR         $D6E8
31F9: 20 21          BRA         $321C

------------------------------------------------
--- EDIT SONG menu: PREVIOUS STEP --------------
------------------------------------------------
31FB: C1 07          CMPB        #$07
31FD: 26 0C          BNE         $320B
31FF: 8D 31          BSR         $3232
3201: B6 02 A9       LDA         $02A9
3204: 27 2B          BEQ         $3231
3206: BD D7 40       JSR         $D740
3209: 20 11          BRA         $321C

------------------------------------------------
--- EDIT SONG menu: NEXT STEP ------------------
------------------------------------------------
320B: C1 08          CMPB        #$08
320D: 26 10          BNE         $321F
320F: 0D FD          TST         $FD
3211: 27 04          BEQ         $3217
3213: 0D A6          TST         $A6
3215: 27 1A          BEQ         $3231
3217: 8D 19          BSR         $3232
3219: BD D7 3D       JSR         $D73D
321C: 7E B1 1C       JMP         $B11C

------------------------------------------------
--- EDIT SONG menu: EXIT -----------------------
------------------------------------------------
321F: C1 09          CMPB        #$09
3221: 26 0E          BNE         $3231
3223: 8D 0D          BSR         $3232
3225: 86 05          LDA         #$05
3227: 97 AA          STA         $AA
3229: 97 CA          STA         $CA
322B: BD AE 68       JSR         $AE68
322E: 7E B0 28       JMP         $B028		; EDIT menu
------------------------------------------------
3231: 39             RTS  

------------------------------------------------
3232: 0D FD          TST         $FD
3234: 27 04          BEQ         $323A
3236: 0D A6          TST         $A6
3238: 2A 1F          BPL         $3259
323A: 0D A6          TST         $A6
323C: 27 1B          BEQ         $3259
323E: 0F A6          CLR         $A6
3240: 96 BF          LDA         $BF
3242: D6 C0          LDB         $C0
3244: 1F 03          TFR         D,U
3246: 0D FD          TST         $FD
3248: 27 0C          BEQ         $3256
324A: BD B6 D6       JSR         $B6D6
324D: BD D6 5D       JSR         $D65D
3250: 4D             TSTA 
3251: 27 06          BEQ         $3259
3253: 7E AA DF       JMP         $AADF
------------------------------------------------
3256: BD D7 5B       JSR         $D75B
3259: 39             RTS  

------------------------------------------------
--- EDIT SEQUENCE menu -------------------------
------------------------------------------------
325A: BD BC B2       JSR         $BCB2
325D: CE 78 C9       LDU         #$78C9		; EDIT SEQUENCE ($68c9)
3260: BD 99 5A       JSR         $995A
3263: 8E B2 85       LDX         #$B285		; softbutton handler to $b285
3266: BF 0D 11       STX         $0D11
3269: 86 00          LDA         #$00
326B: 97 AA          STA         $AA
326D: 86 8E          LDA         #$8E
326F: 8D 6D          BSR         $32DE
3271: 86 92          LDA         #$92
3273: BD B3 58       JSR         $B358
3276: 86 9C          LDA         #$9C
3278: BD 99 81       JSR         $9981
327B: 96 F7          LDA         $F7
327D: 8E 76 E7       LDX         #$76E7
3280: C6 04          LDB         #$04
3282: 7E B9 71       JMP         $B971

------------------------------------------------
--- EDIT SEQUENCE: COPY ------------------------
------------------------------------------------
3285: C1 08          CMPB        #$08
3287: 26 37          BNE         $32C0
3289: CC 93 02       LDD         #$9302
328C: 34 06          PSHS        B,A
328E: CE 78 99       LDU         #$7899		; COPY SEQ TO SEQ ($5899)
3291: 8E B3 72       LDX         #$B372		; YES/NO
3294: CC 16 7E       LDD         #$167E
3297: BD B4 78       JSR         $B478
329A: 86 89          LDA         #$89
329C: 8D 40          BSR         $32DE
329E: 35 06          PULS        B,A
32A0: BD 99 81       JSR         $9981
32A3: 8D 0A          BSR         $32AF
32A5: 2B 06          BMI         $32AD
32A7: CE 72 A0       LDU         #$72A0		; NO SEQ LOC AVAIL ($52a0)
32AA: 7E B3 8A       JMP         $B38A
------------------------------------------------
32AD: 20 34          BRA         $32E3
------------------------------------------------
32AF: 8E 01 C7       LDX         #$01C7
32B2: 4F             CLRA 
32B3: 81 3B          CMPA        #$3B
32B5: 22 08          BHI         $32BF
32B7: 6D 86          TST         A,X
32B9: 2A 01          BPL         $32BC
32BB: 39             RTS  
------------------------------------------------
32BC: 4C             INCA 
32BD: 20 F4          BRA         $32B3
------------------------------------------------
32BF: 39             RTS  

------------------------------------------------
--- EDIT SEQUENCE menu: APPEND -----------------
------------------------------------------------
32C0: C1 05          CMPB        #$05
32C2: 26 25          BNE         $32E9
32C4: BD B0 8D       JSR         $B08D
32C7: CC 8B 02       LDD         #$8B02
32CA: 34 06          PSHS        B,A
32CC: CE 78 AB       LDU         #$78AB		; APPEND SEQ ($58ab)
32CF: 8E B3 9A       LDX         #$B39A		; YES/NO
32D2: CC 17 7E       LDD         #$177E
32D5: BD B4 78       JSR         $B478
32D8: 86 9C          LDA         #$9C
32DA: 8D 02          BSR         $32DE
32DC: 35 06          PULS        B,A
32DE: BD 99 81       JSR         $9981
32E1: 96 F2          LDA         $F2
32E3: 97 BF          STA         $BF
32E5: 4C             INCA 
32E6: 7E BB AB       JMP         $BBAB          ; print A

------------------------------------------------
--- EDIT SEQUENCE menu: ADD --------------------
------------------------------------------------
32E9: C1 06          CMPB        #$06
32EB: 26 08          BNE         $32F5
32ED: 8E 78 A7       LDX         #$78A7		; ADD ($68a7)
32F0: CE E8 2D       LDU         #$E82D
32F3: 20 0A          BRA         $32FF

------------------------------------------------
--- EDIT SEQUENCE menu: DELETE -----------------
------------------------------------------------
32F5: C1 07          CMPB        #$07
32F7: 26 6D          BNE         $3366
32F9: 8E 78 B4       LDX         #$78B4		; DELETE ($68b4)
32FC: CE E8 26       LDU         #$E826
32FF: FF 0D 15       STU         $0D15
3302: BF 0D 1C       STX         $0D1C
3305: BD B0 8D       JSR         $B08D
3308: FC 02 A7       LDD         $02A7
330B: 11 83 E8 2D    CMPU        #$E82D
330F: 26 10          BNE         $3321
3311: 10 83 03 E6    CMPD        #$03E6
3315: 25 02          BCS         $3319
3317: 20 0E          BRA         $3327
------------------------------------------------
3319: C3 00 01       ADDD        #$0001
331C: CE 78 AC       LDU         #$78AC		; ADD TO ($68ac)
331F: 20 0E          BRA         $332F
------------------------------------------------
3321: 10 83 00 00    CMPD        #$0000
3325: 26 05          BNE         $332C
3327: CE 79 1A       LDU         #$791A		; SEQ. LENGTH CAN'T BE CHANGED
332A: 20 5E          BRA         $338A
------------------------------------------------
332C: CE 78 BC       LDU         #$78BC		; DELETE FROM ($68bc)
332F: FD 0D 17       STD         $0D17
3332: CC 9F 03       LDD         #$9F03
3335: 34 46          PSHS        U,B,A
3337: CE 78 C6       LDU         #$78C6		; BARS SEQ ($58c6)
333A: 8E B3 E8       LDX         #$B3E8		; EXIT
333D: CC 21 7F       LDD         #$217F
3340: BD B4 78       JSR         $B478
3343: EE 62          LDU         +$02,S
3345: BD 99 5C       JSR         $995C
3348: 86 95          LDA         #$95
334A: BD B2 DE       JSR         $B2DE
334D: 86 B7          LDA         #$B7
334F: 8D 07          BSR         $3358
3351: 35 46          PULS        U,B,A
3353: BE 0D 17       LDX         $0D17
3356: 20 03          BRA         $335B
------------------------------------------------
3358: BE 02 A7       LDX         $02A7
335B: BD 99 81       JSR         $9981
335E: 1F 10          TFR         X,D
3360: C3 00 01       ADDD        #$0001
3363: 7E C3 CA       JMP         $C3CA

------------------------------------------------
--- EDIT SEQUENCE menu: EXIT -------------------
------------------------------------------------
3366: C1 09          CMPB        #$09
3368: 26 07          BNE         $3371
336A: 86 00          LDA         #$00
336C: 97 AA          STA         $AA
336E: 7E B0 28       JMP         $B028		; EDIT menu
------------------------------------------------
3371: 39             RTS  

------------------------------------------------
--- COPY SEQUENCE: yes -------------------------
------------------------------------------------
3372: C1 04          CMPB        #$04
3374: 26 1C          BNE         $3392
3376: BD B6 D6       JSR         $B6D6
3379: 96 BF          LDA         $BF
337B: BD E7 57       JSR         $E757
337E: 4D             TSTA 
337F: 27 03          BEQ         $3384
3381: 7E AA DF       JMP         $AADF
------------------------------------------------
3384: 5D             TSTB 
3385: 27 08          BEQ         $338F
3387: CE 79 42       LDU         #$7942		; TARGET SEQ. ALREADY EXISTS
338A: C6 08          LDB         #$08
338C: BD BC 17       JSR         $BC17
338F: 7E B2 5A       JMP         $B25A

------------------------------------------------
--- COPY SEQUENCE: no --------------------------
------------------------------------------------
3392: C1 09          CMPB        #$09
3394: 26 03          BNE         $3399
3396: 7E B2 5A       JMP         $B25A
------------------------------------------------
3399: 39             RTS  

------------------------------------------------
--- APPEND SEQUENCE: yes -----------------------
------------------------------------------------
339A: C1 04          CMPB        #$04
339C: 26 42          BNE         $33E0
339E: BD B6 D6       JSR         $B6D6
33A1: 96 BF          LDA         $BF
33A3: BD E7 E9       JSR         $E7E9
33A6: 4D             TSTA 
33A7: 27 03          BEQ         $33AC
33A9: 7E AA DF       JMP         $AADF
------------------------------------------------
33AC: 5D             TSTB 
33AD: 26 12          BNE         $33C1
33AF: BE 0D 0B       LDX         $0D0B
33B2: 6D 89 00 02    TST         +$0002,X
33B6: 2A 04          BPL         $33BC
33B8: 5F             CLRB 
33B9: BD AB 0B       JSR         $AB0B
33BC: 0F CD          CLR         $CD
33BE: 7E B2 5A       JMP         $B25A
------------------------------------------------
33C1: 2A 05          BPL         $33C8
33C3: CE 79 81       LDU         #$7981		; SEQ. TO APPEND DOES NOT EXIST
33C6: 20 C2          BRA         $338A
------------------------------------------------
33C8: 34 04          PSHS        B
33CA: CE 79 C5       LDU         #$79C5		; SEQ. CAN'T BE APPENDED
33CD: BD 99 54       JSR         $9954
33D0: 35 04          PULS        B
33D2: C1 02          CMPB        #$02
33D4: 26 05          BNE         $33DB
33D6: CE 7A 08       LDU         #$7A08		; RESULT IS MORE THAN 999 BARS
33D9: 20 03          BRA         $33DE
------------------------------------------------
33DB: CE 79 E6       LDU         #$79E6		; TIME SIGS ARE INCOMPATIBLE
33DE: 20 AA          BRA         $338A

------------------------------------------------
--- APPEND SEQUENCE: no ------------------------
------------------------------------------------
33E0: C1 09          CMPB        #$09
33E2: 26 03          BNE         $33E7
33E4: 7E B2 5A       JMP         $B25A
------------------------------------------------
33E7: 39             RTS  

------------------------------------------------
--- : no --------------------------
------------------------------------------------
33E8: C1 09          CMPB        #$09
33EA: 26 5F          BNE         $344B
33EC: CC AF 02       LDD         #$AF02
33EF: 34 06          PSHS        B,A
33F1: CE 78 EF       LDU         #$78EF		; COPY ($68ef)
33F4: 8E B4 4C       LDX         #$B44C
33F7: CC 1B 7F       LDD         #$1B7F
33FA: 8D 7C          BSR         $3478
33FC: FE 0D 1C       LDU         $0D1C
33FF: BD 99 5C       JSR         $995C
3402: 86 84          LDA         #$84
3404: BD B2 DE       JSR         $B2DE
3407: 86 8A          LDA         #$8A
3409: BD B3 58       JSR         $B358
340C: 86 BF          LDA         #$BF
340E: BE 0D 17       LDX         $0D17
3411: BD B3 5B       JSR         $B35B
3414: FC 0D 15       LDD         $0D15
3417: 10 83 E8 2D    CMPD        #$E82D
341B: 26 08          BNE         $3425
341D: CC 03 E6       LDD         #$03E6
3420: B3 02 A7       SUBD        $02A7
3423: 20 12          BRA         $3437
------------------------------------------------
3425: FC 02 A7       LDD         $02A7
3428: B3 0D 17       SUBD        $0D17
342B: C3 00 01       ADDD        #$0001
342E: 10 B3 02 A7    CMPD        $02A7
3432: 25 03          BCS         $3437
3434: 83 00 01       SUBD        #$0001
3437: C1 63          CMPB        #$63
3439: 23 02          BLS         $343D
343B: C6 63          LDB         #$63
343D: D7 BF          STB         $BF
343F: 35 06          PULS        B,A
3441: BD 99 81       JSR         $9981
3444: 86 01          LDA         #$01
3446: 97 C0          STA         $C0
3448: 7E BB AB       JMP         $BBAB          ; print A
------------------------------------------------
344B: 39             RTS  

------------------------------------------------
--- : yes
------------------------------------------------
344C: C1 04          CMPB        #$04
344E: 26 20          BNE         $3470
3450: BD B6 D6       JSR         $B6D6
3453: 96 C0          LDA         $C0
3455: FE 0D 17       LDU         $0D17
3458: BE 0D 15       LDX         $0D15
345B: AD 84          JSR         ,X
345D: 4D             TSTA 
345E: 10 26 F6 7D    LBNE        $2ADF
3462: FC 02 A7       LDD         $02A7
3465: 10 B3 0D 19    CMPD        $0D19
3469: 24 03          BCC         $346E
346B: FD 0D 19       STD         $0D19
346E: 20 04          BRA         $3474

------------------------------------------------
--- : no
------------------------------------------------
3470: C1 09          CMPB        #$09
3472: 26 03          BNE         $3477
3474: 7E B2 5A       JMP         $B25A
------------------------------------------------
3477: 39             RTS  

------------------------------------------------
3478: 97 AA          STA         $AA
347A: D7 C8          STB         $C8
347C: BF 0D 11       STX         $0D11		; set softbutton handler
347F: BD 99 54       JSR         $9954
3482: 96 AA          LDA         $AA
3484: 81 21          CMPA        #$21
3486: 27 06          BEQ         $348E
3488: CE 79 0D       LDU         #$790D		; *YES*
348B: BD 99 56       JSR         $9956
348E: EC 62          LDD         +$02,S
3490: BD BB DA       JSR         $BBDA
3493: BD BC AE       JSR         $BCAE
3496: 86 E8          LDA         #$E8
3498: 7E 99 81       JMP         $9981

------------------------------------------------
--- EDIT TRACK menu ----------------------------
------------------------------------------------
349B: BD BC B2       JSR         $BCB2
349E: CE 7A 26       LDU         #$7A26		; EDIT TRACK
34A1: BD 99 54       JSR         $9954
34A4: 86 00          LDA         #$00
34A6: 97 AA          STA         $AA
34A8: 8E B4 B2       LDX         #$B4B2		; softbutton handler to $b4b2
34AB: BF 0D 11       STX         $0D11
34AE: 86 8B          LDA         #$8B
34B0: 20 5E          BRA         $3510

------------------------------------------------
--- TRACK menu: QUANTIZE -----------------------
------------------------------------------------
34B2: C1 05          CMPB        #$05
34B4: 26 29          BNE         $34DF
34B6: BD B0 8D       JSR         $B08D
34B9: CC 94 05       LDD         #$9405
34BC: 34 06          PSHS        B,A
34BE: CC 1D 70       LDD         #$1D70
34C1: CE 7A E2       LDU         #$7AE2		; QUANTIZE TRACK
34C4: 8E B5 F0       LDX         #$B5F0		; prepare YES/NO
34C7: 8D AF          BSR         $3478
34C9: 86 8F          LDA         #$8F
34CB: 8D 43          BSR         $3510
34CD: 35 06          PULS        B,A
34CF: 86 94          LDA         #$94
34D1: BD 99 81       JSR         $9981
34D4: B6 00 ED       LDA         $00ED
34D7: C6 05          LDB         #$05
34D9: 8E 76 0F       LDX         #$760F		
34DC: 7E B9 71       JMP         $B971

------------------------------------------------
--- TRACK menu: REM-CTRLS ----------------------
------------------------------------------------
34DF: C1 03          CMPB        #$03
34E1: 26 0F          BNE         $34F2
34E3: BD B0 8D       JSR         $B08D
34E6: CE 7A C4       LDU         #$7AC4		; REMOTE CONTROLLERS ($6ac4)
34E9: 8E B5 9C       LDX         #$B59C		; prepare handler
34EC: 8D 3E          BSR         $352C
34EE: 86 9E          LDA         #$9E
34F0: 20 1E          BRA         $3510

------------------------------------------------
--- TRACK menu: COPY ---------------------------
------------------------------------------------
34F2: C1 08          CMPB        #$08
34F4: 26 24          BNE         $351A
34F6: BD B0 8D       JSR         $B08D
34F9: CC 96 01       LDD         #$9601
34FC: 34 06          PSHS        B,A
34FE: CE 7A 67       LDU         #$7A67		; COPY TRACK ($6a67)
3501: 8E B5 92       LDX         #$B592		; prepare handler
3504: CC 18 60       LDD         #$1860
3507: BD B4 78       JSR         $B478
350A: 86 8B          LDA         #$8B
350C: 8D 02          BSR         $3510
350E: 35 06          PULS        B,A
3510: D6 F6          LDB         $F6
3512: F7 0D 17       STB         $0D17
3515: CB 31          ADDB        #$31
3517: 7E 99 7D       JMP         $997D

------------------------------------------------
--- TRACK menu: ERASE --------------------------
------------------------------------------------
351A: C1 06          CMPB        #$06
351C: 26 1C          BNE         $353A
351E: CE 7A AB       LDU         #$7AAB		; ERASE & UNDEFINE ($6aab)
3521: 8E B5 D0       LDX         #$B5D0		; prepare handler
3524: 86 1C          LDA         #$1C
3526: 8D 04          BSR         $352C
3528: 86 9A          LDA         #$9A
352A: 20 E4          BRA         $3510
------------------------------------------------
352C: 97 AA          STA         $AA
352E: BF 0D 11       STX         $0D11		; set softbutton handler
3531: BD 99 54       JSR         $9954
3534: CE 79 0D       LDU         #$790D		; YES/NO ($590d)
3537: 7E 99 56       JMP         $9956

------------------------------------------------
--- TRACK menu: MERGE --------------------------
------------------------------------------------
353A: C1 07          CMPB        #$07
353C: 26 1C          BNE         $355A
353E: BD B0 8D       JSR         $B08D
3541: CC 99 01       LDD         #$9901
3544: 34 06          PSHS        B,A
3546: CE 7A 7B       LDU         #$7A7B		; MERGE TRACK ($6a7b)
3549: 8E B5 97       LDX         #$B597		; prepare handler
354C: CC 19 60       LDD         #$1960
354F: BD B4 78       JSR         $B478
3552: 86 8C          LDA         #$8C
3554: 8D BA          BSR         $3510
3556: 35 06          PULS        B,A
3558: 20 B6          BRA         $3510

------------------------------------------------
--- TRACK menu: TRANSPOSE ----------------------
------------------------------------------------
355A: C1 01          CMPB        #$01
355C: 27 04          BEQ         $3562
355E: C1 02          CMPB        #$02
3560: 26 24          BNE         $3586
3562: BD B0 8D       JSR         $B08D
3565: CC 97 03       LDD         #$9703		; handler
3568: 34 06          PSHS        B,A
356A: CE 7A 92       LDU         #$7A92		; TRANSPOSE TRACK ($7a92)
356D: 8E B5 A1       LDX         #$B5A1		; prepare transpose handler
3570: CC 1A 7C       LDD         #$1A7C
3573: BD B4 78       JSR         $B478
3576: 86 90          LDA         #$90
3578: 8D 96          BSR         $3510		
357A: 35 06          PULS        B,A
357C: BD 99 81       JSR         $9981		; print text
357F: 4F             CLRA 
3580: 7F 0D 17       CLR         $0D17
3583: 7E B8 71       JMP         $B871

------------------------------------------------
--- TRACK menu: EXIT ---------------------------
------------------------------------------------
3586: C1 09          CMPB        #$09
3588: 26 07          BNE         $3591
358A: 86 00          LDA         #$00
358C: 97 AA          STA         $AA
358E: 7E B0 28       JMP         $B028
------------------------------------------------
3591: 39             RTS  

------------------------------------------------
---COPY handler --------------------------------
------------------------------------------------
3592: 8E E8 80       LDX         #$E880
3595: 20 0F          BRA         $35A6

------------------------------------------------
--- REM-CTRLS handler --------------------------
------------------------------------------------
3597: 8E E8 C5       LDX         #$E8C5
359A: 20 0A          BRA         $35A6

------------------------------------------------
--- MERGE handler ------------------------------
------------------------------------------------
359C: 8E E9 32       LDX         #$E932
359F: 20 05          BRA         $35A6

------------------------------------------------
--- TRANSPOSE handler --------------------------
------------------------------------------------
35A1: 8E E9 0E       LDX         #$E90E
35A4: 20 00          BRA         $35A6

------------------------------------------------
--- EDIT TRACK <fct>: yes ----------------------
--- X: <fct> -----------------------------------
------------------------------------------------
35A6: C1 04          CMPB        #$04
35A8: 26 13          BNE         $35BD
35AA: BD B6 D6       JSR         $B6D6
35AD: B6 0D 17       LDA         $0D17
35B0: AD 84          JSR         ,X
35B2: 4D             TSTA 
35B3: 27 03          BEQ         $35B8
35B5: 7E AA DF       JMP         $AADF
------------------------------------------------
35B8: 5D             TSTB 
35B9: 27 06          BEQ         $35C1
35BB: 20 08          BRA         $35C5

------------------------------------------------
--- EDIT TRACK <fct>: no  ----------------------
------------------------------------------------
35BD: C1 09          CMPB        #$09
35BF: 26 03          BNE         $35C4
35C1: 7E B4 9B       JMP         $B49B
------------------------------------------------
35C4: 39             RTS  
------------------------------------------------
35C5: CE 7A FA       LDU         #$7AFA		; TARGET TRK NOT EMPTY ($5afa)
35C8: C6 08          LDB         #$08
35CA: BD BC 17       JSR         $BC17
35CD: 7E B4 9B       JMP         $B49B

------------------------------------------------
--- ERASE: yes 
------------------------------------------------
35D0: C1 04          CMPB        #$04
35D2: 26 14          BNE         $35E8
35D4: BD B6 D6       JSR         $B6D6
35D7: B6 0D 17       LDA         $0D17
35DA: BD E8 95       JSR         $E895
35DD: 5F             CLRB 
35DE: BD AB 0B       JSR         $AB0B
35E1: 86 00          LDA         #$00
35E3: 97 AA          STA         $AA
35E5: 7E C2 8A       JMP         $C28A

------------------------------------------------
--- ERASE: no
------------------------------------------------
35E8: C1 09          CMPB        #$09
35EA: 26 03          BNE         $35EF
35EC: 7E B4 9B       JMP         $B49B
------------------------------------------------
35EF: 39             RTS  

------------------------------------------------
--- QUANTIZE: yes ------------------------------
------------------------------------------------
35F0: C1 04          CMPB        #$04
35F2: 26 22          BNE         $3616
35F4: BD B6 D6       JSR         $B6D6
35F7: BD D9 4E       JSR         $D94E
35FA: 4D             TSTA 
35FB: 2A 03          BPL         $3600
35FD: 7E AA DF       JMP         $AADF
------------------------------------------------
3600: 27 0B          BEQ         $360D
3602: CE 7B 37       LDU         #$7B37		; QUANTIZE NOT POSS. ($5b37)
3605: C6 08          LDB         #$08
3607: BD BC 17       JSR         $BC17
360A: 7E B4 B9       JMP         $B4B9
------------------------------------------------
360D: 86 07          LDA         #$07
360F: 97 AA          STA         $AA
3611: 97 CA          STA         $CA
3613: 7E AA 5B       JMP         $AA5B

------------------------------------------------
--- QUANTIZE: no -------------------------------
------------------------------------------------
3616: C1 09          CMPB        #$09
3618: 26 03          BNE         $361D
361A: 7E B4 9B       JMP         $B49B
------------------------------------------------
361D: 39             RTS  

------------------------------------------------
--- EDIT STEP menu -----------------------------
------------------------------------------------
361E: BD E1 66       JSR         $E166
3621: 86 1E          LDA         #$1E
3623: 97 AA          STA         $AA
3625: 86 70          LDA         #$70
3627: 97 C8          STA         $C8
3629: BD BC AE       JSR         $BCAE
362C: CE 7B 64       LDU         #$7B64		; EDIT TRACK: STEP/TIME
362F: BD 99 54       JSR         $9954
3632: CC B7 03       LDD         #$B703
3635: BD BB DA       JSR         $BBDA
3638: 86 8B          LDA         #$8B
363A: D6 F6          LDB         $F6
363C: CB 31          ADDB        #$31
363E: BD 99 7D       JSR         $997D
3641: BD B4 CF       JSR         $B4CF
3644: 8E B6 71       LDX         #$B671		; softbutton handler to $b671
3647: BF 0D 11       STX         $0D11
364A: 86 9F          LDA         #$9F
364C: BD 99 81       JSR         $9981
364F: BD E1 F2       JSR         $E1F2
3652: 34 06          PSHS        B,A
3654: 1F 30          TFR         U,D
3656: C3 00 01       ADDD        #$0001
3659: BD C3 CA       JSR         $C3CA
365C: 86 A3          LDA         #$A3
365E: BD 99 81       JSR         $9981
3661: A6 61          LDA         +$01,S
3663: 4C             INCA 
3664: BD BB AB       JSR         $BBAB          ; print A
3667: 86 A6          LDA         #$A6
3669: BD 99 81       JSR         $9981
366C: A6 E1          LDA         ,S++
366E: 7E BB AB       JMP         $BBAB          ; print A

------------------------------------------------
--- EDIT STEP menu: PUNCH IN -------------------
------------------------------------------------
3671: C1 05          CMPB        #$05
3673: 26 18          BNE         $368D
3675: 96 CA          LDA         $CA
3677: 81 00          CMPA        #$00
3679: 26 5A          BNE         $36D5
367B: 86 07          LDA         #$07
367D: 97 CA          STA         $CA
367F: BD BB CB       JSR         $BBCB
3682: CC B2 02       LDD         #$B202
3685: BD BB DA       JSR         $BBDA
3688: 8E 00 06       LDX         #$0006
368B: 20 24          BRA         $36B1

------------------------------------------------
--- EDIT STEP menu: OUT ------------------------
------------------------------------------------
368D: C1 06          CMPB        #$06
368F: 26 0E          BNE         $369F
3691: BD BB CB       JSR         $BBCB
3694: CC B7 03       LDD         #$B703
3697: BD BB DA       JSR         $BBDA
369A: 8E 00 0A       LDX         #$000A
369D: 20 12          BRA         $36B1

------------------------------------------------
--- EDIT STEP menu: STEP -----------------------
------------------------------------------------
369F: C1 07          CMPB        #$07
36A1: 26 05          BNE         $36A8
36A3: B6 00 FC       LDA         $00FC
36A6: 20 06          BRA         $36AE

------------------------------------------------
--- EDIT STEP menu: CLOCK ----------------------
------------------------------------------------
36A8: C1 08          CMPB        #$08
36AA: 26 12          BNE         $36BE
36AC: 86 01          LDA         #$01
36AE: 8E 00 0E       LDX         #$000E
36B1: BD 84 79       JSR         $8479
36B4: AF 22          STX         +$02,Y
36B6: A7 26          STA         +$06,Y
36B8: BD 84 AE       JSR         $84AE
36BB: 0B 6D	     fdb	 $0B6D
36BD: 39	     RTS

------------------------------------------------
--- EDIT STEP menu: EXIT -----------------------
------------------------------------------------
36BE: C1 09          CMPB        #$09
36C0: 26 13          BNE         $36D5
36C2: BD E1 9C       JSR         $E19C
36C5: 96 CA          LDA         $CA
36C7: 97 AA          STA         $AA
36C9: 81 07          CMPA        #$07
36CB: 10 26 F9 59    LBNE        $3028
36CF: BD BC B2       JSR         $BCB2
36D2: 7E AA 5B       JMP         $AA5B
------------------------------------------------
36D5: 39             RTS  

------------------------------------------------
-- print "EDITING SEQUENCE DATA, PLEASE WAIT" --
------------------------------------------------
36D6: 34 56          PSHS        U,X,B,A
36D8: CE 7B 9F       LDU         #$7B9F		; EDITING SEQ. DATA ($5b9f)
36DB: C6 02          LDB         #$02
36DD: BD BC 17       JSR         $BC17
36E0: 35 D6          PULS        PC,U,X,B,A

------------------------------------------------
--- OSC/DCA/LFO/ENV ----------------------------
--- A: number of OSC/DCA/LFO/ENV ---------------
------------------------------------------------
36E2: 97 B8          STA         $B8
36E4: 8E 77 A0       LDX         #$77A0		; $17a0
36E7: BD A6 51       JSR         $A651		; select ROMLOW $1000
36EA: E6 86          LDB         A,X		; 21 values from 0 to 10
36EC: BD A6 69       JSR         $A669		; select ROMLOW $0000
36EF: D7 B5          STB         $B5		; calculate MENU base
36F1: 1F 98          TFR         B,A		; get menu address		
36F3: 58             LSLB 			
36F4: CE F7 8C       LDU         #$F78C		; menu vectors		
36F7: 33 D5          LEAU        [B,U]		; get menu vector		
36F9: 8E 71 59       LDX         #$7159		
36FC: C6 0A          LDB         #$0A		; multiply ($b5) by 10
36FE: 3D             MUL  
36FF: 30 8B          LEAX        D,X		
3701: BF 0D 0D       STX         $0D0D
3704: 86 01          LDA         #$01
3706: 97 A8          STA         $A8
3708: 86 80          LDA         #$80
370A: 0D A4          TST         $A4
370C: 26 02          BNE         $3710
370E: 86 D6          LDA         #$D6		; clear screen
3710: BD 99 81       JSR         $9981
3713: BD 99 56       JSR         $9956
3716: D6 B7          LDB         $B7
3718: 27 09          BEQ         $3723
371A: CB 30          ADDB        #$30
371C: 86 83          LDA         #$83
371E: BD 99 7D       JSR         $997D
3721: 0F B7          CLR         $B7
3723: C6 00          LDB         #$00
3725: BD B7 5B       JSR         $B75B
3728: 4D             TSTA 
3729: 27 09          BEQ         $3734
372B: BD B8 17       JSR         $B817
372E: 91 B3          CMPA        $B3
3730: 26 02          BNE         $3734
3732: D7 B9          STB         $B9
3734: 5C             INCB 
3735: C1 09          CMPB        #$09
3737: 23 EC          BLS         $3725
3739: 0D A4          TST         $A4
373B: 27 03          BEQ         $3740
373D: BD BB CB       JSR         $BBCB
3740: 0F A4          CLR         $A4
3742: D6 B9          LDB         $B9
3744: BD B7 5B       JSR         $B75B
3747: BD A4 92       JSR         $A492
374A: 0D AB          TST         $AB
374C: 27 03          BEQ         $3751
374E: BD B8 06       JSR         $B806
3751: 7E 7A D5       JMP         $7AD5
------------------------------------------------
3754: 0C A4          INC         $A4
3756: 96 B8          LDA         $B8
3758: 7E B6 E2       JMP         $B6E2
------------------------------------------------
375B: BD A6 57       JSR         $A657		; select ROMLOW $6000
375E: A6 85          LDA         B,X
3760: 2A 03          BPL         $3765
3762: 5C             INCB 
3763: 20 F9          BRA         $375E
------------------------------------------------
3765: BD A6 69       JSR         $A669		; select ROMLOW $0000
3768: 34 14          PSHS        X,B
376A: 27 4B          BEQ         $37B7
376C: 97 B3          STA         $B3
376E: 34 04          PSHS        B
3770: D6 A9          LDB         $A9
3772: C1 06          CMPB        #$06
3774: 27 12          BEQ         $3788
3776: C6 00          LDB         #$00
3778: 81 39          CMPA        #$39
377A: 27 08          BEQ         $3784
377C: 81 37          CMPA        #$37
377E: 27 04          BEQ         $3784
3780: 81 35          CMPA        #$35
3782: 26 02          BNE         $3786
3784: C6 05          LDB         #$05
3786: D7 A9          STB         $A9
3788: 35 04          PULS        B
378A: 8D 2D          BSR         $37B9
378C: 8D 37          BSR         $37C5
378E: BD A6 57       JSR         $A657		; select ROMLOW $6000
3791: A6 84          LDA         ,X
3793: E6 03          LDB         +$03,X		; print vector offset
3795: BD A6 69       JSR         $A669		; select ROMLOW $0000
3798: D7 B2          STB         $B2
379A: BD 99 81       JSR         $9981
379D: 8E 70 00       LDX         #$7000
37A0: BD A6 57       JSR         $A657		; select ROMLOW $6000
37A3: A6 85          LDA         B,X
37A5: BD A6 69       JSR         $A669		; select ROMLOW $0000
37A8: 97 C8          STA         $C8
37AA: A6 C4          LDA         ,U
37AC: CE 0D 1C       LDU         #$0D1C
37AF: 8E BA 04       LDX         #$BA04		; print vector base
37B2: 58             LSLB 
37B3: AD 95          JSR         [B,X]
37B5: 96 B3          LDA         $B3
37B7: 35 94          PULS        PC,X,B

------------------------------------------------
--- get waveform name --------------------------
------------------------------------------------
37B9: 34 06          PSHS        B,A
37BB: 8E 70 29       LDX         #$7029		; wave name table
37BE: C6 04          LDB         #$04		; length of wave name
37C0: 3D             MUL  
37C1: 30 8B          LEAX        D,X		; get waveform entry
37C3: 35 86          PULS        PC,B,A

------------------------------------------------
37C5: 34 04          PSHS        B
37C7: FE 0D 0F       LDU         $0D0F
37CA: BD A6 57       JSR         $A657		; ROMLOW $6000
37CD: A6 C5          LDA         B,U
37CF: BD A6 69       JSR         $A669		; ROMLOW $0000
37D2: 81 FF          CMPA        #$FF
37D4: 26 02          BNE         $37D8
37D6: 11 3F          SWI3 

------------------------------------------------
37D8: 34 02          PSHS        A
37DA: 97 B4          STA         $B4
37DC: CE 77 0C       LDU         #$770C		; $170c
37DF: 1F 89          TFR         A,B
37E1: 4F             CLRA 
37E2: BD A6 51       JSR         $A651		; select ROMLOW $1000
37E5: A6 CB          LDA         D,U
37E7: BD A6 69       JSR         $A669		; select ROMLOW $0000
37EA: E6 E0          LDB         ,S+
37EC: C1 94          CMPB        #$94
37EE: 26 05          BNE         $37F5
37F0: CE 02 D7       LDU         #$02D7		; screen buffer
37F3: 20 0C          BRA         $3801
------------------------------------------------
37F5: FE 0D 07       LDU         $0D07
37F8: C1 84          CMPB        #$84
37FA: 25 03          BCS         $37FF
37FC: CE 00 D8       LDU         #$00D8
37FF: 33 C6          LEAU        A,U
3801: FF 0D 09       STU         $0D09
3804: 35 84          PULS        PC,B
------------------------------------------------
3806: 8D 0F          BSR         $3817
3808: 8D AF          BSR         $37B9
380A: BD A6 57       JSR         $A657		; select ROMLOW $6000
380D: A6 01          LDA         +$01,X
380F: E6 02          LDB         +$02,X
3811: BD A6 69       JSR         $A669		; select ROMLOW $0000
3814: 7E BB DA       JMP         $BBDA
------------------------------------------------
3817: 34 44          PSHS        U,B
3819: CE 0D 96       LDU         #$0D96
381C: D6 B8          LDB         $B8
381E: 5A             DECB 
381F: A6 C5          LDA         B,U
3821: 35 C4          PULS        PC,U,B

------------------------------------------------
--- print Q value ------------------------------
------------------------------------------------
3823: 84 1F          ANDA        #$1F		; limit to 0-31
3825: 20 02          BRA         $3829

------------------------------------------------
--- normalize & print LV value -----------------
------------------------------------------------
3827: 44             LSRA 

------------------------------------------------
--- normalize & print Lx & other "shift1" values
------------------------------------------------
3828: 44             LSRA 

------------------------------------------------
--- get & print value part of value + flags ----
------------------------------------------------
3829: 84 3F          ANDA        #$3F		; limit to 0-63

------------------------------------------------
--- print byte number (hex to ASCII) -----------
------------------------------------------------
382B: 7E BB AB       JMP         $BBAB          ; print A

------------------------------------------------
--- print lin/exp appendix to ENVx LV ----------
------------------------------------------------
382E: 34 02          PSHS        A
3830: 8D F5          BSR         $3827
3832: A6 E0          LDA         ,S+		; get LV (PCB-style)
3834: 84 01          ANDA        #$01		; check L/E bit
3836: 26 04          BNE         $383C
3838: 86 4C          LDA         #$4C		; print "L"
383A: 20 02          BRA         $383E		;
------------------------------------------------
383C: 86 58          LDA         #$58		; print "X"
383E: 7E 99 81       JMP         $9981		;

------------------------------------------------
--- print second release appendix to ENVx T4 ---
------------------------------------------------
3841: 34 02          PSHS        A
3843: 8D E4          BSR         $3829
3845: A6 E0          LDA         ,S+		; get T4 (PCB-style)
3847: 84 80          ANDA        #$80		; check 2R bit
3849: 26 04          BNE         $384F
384B: 86 20          LDA         #$20		; print " "
384D: 20 02          BRA         $3851		;
------------------------------------------------
384F: 86 52          LDA         #$52		; print "R"
3851: 7E 99 81       JMP         $9981		;

------------------------------------------------
--- print "upper nibble" parameters ------------
------------------------------------------------
3854: 44             LSRA 
3855: 44             LSRA 
3856: 44             LSRA 
3857: 44             LSRA 
3858: 20 CF          BRA         $3829

------------------------------------------------
--- print flag+value parameters ----------------
------------------------------------------------
385A: 84 7F          ANDA        #$7F		; limit to 0-127
385C: BD BB B4       JSR         $BBB4
385F: CB 30          ADDB        #$30
3861: E7 42          STB         +$02,U
3863: BD BB B4       JSR         $BBB4
3866: 8B 30          ADDA        #$30
3868: CB 30          ADDB        #$30
386A: ED C4          STD         ,U
386C: 6F 43          CLR         +$03,U
386E: 7E 99 56       JMP         $9956

------------------------------------------------
--- print sign extended 7bit values ------------
------------------------------------------------
3871: 48             LSLA 			; kill flag (e.g. Fc modamt)		
3872: 47             ASRA 			; kill "step 2" (e.g. Lx)
3873: 1F 89          TFR         A,B
3875: C4 3F          ANDB        #$3F		; limit to 0-63
3877: 4D             TSTA 			
3878: 2B 04          BMI         $387E		
387A: 86 2B          LDA         #$2B		; print "+"
387C: 20 08          BRA         $3886		;
------------------------------------------------
387E: 86 2D          LDA         #$2D		; print "-"
3880: 34 04          PSHS        B		; get complement
3882: C6 40          LDB         #$40		;
3884: E0 E0          SUBB        ,S+		;
3886: BD 99 81       JSR         $9981		
3889: 1F 98          TFR         B,A		; print value
388B: 7E BB AB       JMP         $BBAB          ;

------------------------------------------------
--- print octave value -------------------------
------------------------------------------------
388E: 84 7F          ANDA        #$7F		; limit to 0-127
3890: 1F 89          TFR         A,B
3892: 81 24          CMPA        #$24		
3894: 24 0A          BCC         $38A0
------------------------------------------------;-3<=octave<=0
3896: 86 2D          LDA         #$2D		; print "-"
3898: 34 04          PSHS        B
389A: C6 2F          LDB         #$2F		; get negative octave number
389C: E0 E0          SUBB        ,S+		;
389E: 20 04          BRA         $38A4
------------------------------------------------;0<=octave<=5
38A0: 86 2B          LDA         #$2B		; print "+"
38A2: C0 24          SUBB        #$24		; get positive octave number
38A4: BD 99 81       JSR         $9981		; print sign
38A7: 1F 98          TFR         B,A
38A9: BD BB C7       JSR         $BBC7
38AC: 8B 30          ADDA        #$30		; number to ASCII
38AE: 7E 99 81       JMP         $9981		; print octave

------------------------------------------------
--- print split point (?) ----------------------
------------------------------------------------
38B1: 84 7F          ANDA        #$7F		; limit to 0-127
38B3: BD BB C7       JSR         $BBC7		; print A/12
38B6: 1F 98          TFR         B,A		; print A/10
38B8: 7E BB AB       JMP         $BBAB		; 

------------------------------------------------
--- print fine tune value ----------------------
------------------------------------------------
38BB: 44             LSRA 
38BC: 44             LSRA 
38BD: 44             LSRA 
38BE: 16 FF 62       LBRA        $3823

------------------------------------------------
--- print master tune --------------------------
------------------------------------------------
38C1: EC 9F 0D 09    LDD         [$0D09]
38C5: 54             LSRB 
38C6: 54             LSRB 
38C7: 54             LSRB 
38C8: C4 1F          ANDB        #$1F		; 0-31
38CA: 4D             TSTA 
38CB: 2B 04          BMI         $38D1
38CD: 86 2B          LDA         #$2B		; print "+"
38CF: 20 08          BRA         $38D9
------------------------------------------------
38D1: 86 2D          LDA         #$2D		; print "-"
38D3: 34 04          PSHS        B
38D5: C6 20          LDB         #$20
38D7: E0 E0          SUBB        ,S+
38D9: BD 99 81       JSR         $9981
38DC: 1F 98          TFR         B,A		; print A
38DE: 7E BB AB       JMP         $BBAB       

------------------------------------------------
--- print "value +1" ---------------------------
------------------------------------------------
38E1: 4C             INCA 
38E2: 7E BB AB       JMP         $BBAB          ; print A

------------------------------------------------
--- map A to printable character & print A -----
------------------------------------------------
38E5: 81 20          CMPA        #$20
38E7: 24 06          BCC         $38EF
38E9: 81 5F          CMPA        #$5F
38EB: 23 02          BLS         $38EF
38ED: 86 2A          LDA         #$2A
38EF: 7E 99 81       JMP         $9981

------------------------------------------------
--- print ALL / HELD ---------------------------
------------------------------------------------
38F2: 8E 76 CB       LDX         #$76CB		; ALL / HELD
38F5: C6 04          LDB         #$04		; text length = 4
38F7: 20 78          BRA         $3971

------------------------------------------------
--- print keyboard hardness --------------------
------------------------------------------------
38F9: 8E 76 BB       LDX         #$76BB		; SOFT / MED / FIRM / HARD
38FC: C6 04          LDB         #$04
38FE: 44             LSRA 
38FF: 44             LSRA 
3900: 8D 6F          BSR         $3971
3902: 96 DA          LDA         $DA
3904: 84 03          ANDA        #$03		; get hardness weighting
3906: 8B 31          ADDA        #$31		; number to ascii
3908: 7E 99 81       JMP         $9981

------------------------------------------------
--- print aftertouch mode ----------------------
------------------------------------------------
390B: 8E 76 A0       LDX         #$76A0		; OFF / CHAN / KEY
390E: C6 04          LDB         #$04
3910: 20 5F          BRA         $3971

------------------------------------------------
--- print countoff mode ------------------------
------------------------------------------------
3912: 8E 76 AC       LDX         #$76AC		; NONE / QUIET / CLICK
3915: C6 05          LDB         #$05
3917: 20 58          BRA         $3971

------------------------------------------------
--- print cartridge program name ---------------
--- (1) cartridge not present -> *CART* --------
------------------------------------------------
3919: 84 7F          ANDA        #$7F		; discard bit 7
391B: 91 BC          CMPA        $BC		
391D: 23 05          BLS         $3924
391F: 8E F8 CF       LDX         #$F8CF		; *CART*
3922: 20 08          BRA         $392C

------------------------------------------------
--- print cartridge program name ---------------
--- (2) cartridge present -> print name --------
------------------------------------------------
3924: BD BA 7B       JSR         $BA7B
3927: 1F 01          TFR         D,X
3929: 30 88 C6       LEAX        -$3A,X
392C: 4F             CLRA 
392D: C6 06          LDB         #$06		; text length 6
392F: 20 40          BRA         $3971

------------------------------------------------
--- print OF -----------------------------------
------------------------------------------------
3931: 49             ROLA 			; shift bit7 to bit0
3932: 49             ROLA 
3933: 84 01          ANDA        #$01		; mask bit 1
3935: 26 05          BNE         $393C
3937: CC 4F 46       LDD         #$4F46		; print "OF"
393A: 20 03          BRA         $393F

------------------------------------------------
--- print ON -----------------------------------
------------------------------------------------
393C: CC 4F 4E       LDD         #$4F4E		; print "ON"
393F: 7E 99 7D       JMP         $997D

------------------------------------------------
--- print OFF / ON -----------------------------
------------------------------------------------
3942: 49             ROLA 			; shift bit7/6 to bit1/0
3943: 49             ROLA 
3944: 49             ROLA 
3945: 84 01          ANDA        #$01		; mask bit 1
3947: 8E 76 09       LDX         #$7609		; OFF / ON
394A: C6 03          LDB         #$03		; text length
394C: 20 23          BRA         $3971

------------------------------------------------
--- print WAV (LFO menu) -----------------------
------------------------------------------------
394E: 81 4A          CMPA        #$4A
3950: 23 0E          BLS         $3960
3952: 34 02          PSHS        A
3954: CE 7F B6       LDU         #$7FB6		; WAV 
3957: BD 99 56       JSR         $9956
395A: 35 04          PULS        B
395C: 4F             CLRA 
395D: 7E C3 CA       JMP         $C3CA

------------------------------------------------
--- print active OSC wave ----------------------
------------------------------------------------
3960: 8E 73 B9       LDX         #$73B9		; OSC waves
3963: C6 06          LDB         #$06		; length of wave names
3965: 20 0A          BRA         $3971

------------------------------------------------
--- print LFO wave -----------------------------
------------------------------------------------
3967: 49             ROLA 			; shift W1W0 from bit7/6
3968: 49             ROLA 			;   to bit 0/1
3969: 49             ROLA 
396A: 84 03          ANDA        #$03		; mask W1W0
396C: 8E 75 7B       LDX         #$757B		; LFO waves
396F: C6 03          LDB         #$03		; length of wave names

------------------------------------------------
--- create screen buffer according to A/B/X ----
------------------------------------------------
3971: 34 54          PSHS        U,X,B
3973: CE 0D 1C       LDU         #$0D1C		; screen buffer base
3976: 3D             MUL			; item * text length  
3977: 30 8B          LEAX        D,X		; x = base + (item * tlength)
3979: 5F             CLRB 
397A: 1A 10          ORCC        #$10		; disable IRQ
397C: BD A6 57       JSR         $A657		; select ROMLOW $6000
397F: A6 80          LDA         ,X+		; copy menu items to $0d1c
3981: A7 C5          STA         B,U
3983: 5C             INCB 
3984: E1 E4          CMPB        ,S
3986: 25 F7          BCS         $397F
3988: BD A6 69       JSR         $A669		; select ROMLOW $0000
398B: 1C EF          ANDCC       #$EF		; enable interrupts
398D: 86 00          LDA         #$00		; end of text
398F: A7 C5          STA         B,U
3991: BD 99 56       JSR         $9956		; print area
3994: 35 D4          PULS        PC,U,X,B

------------------------------------------------
--- print modulator source 1 -------------------
------------------------------------------------
3996: 44             LSRA 
3997: 44             LSRA 
3998: 44             LSRA 
3999: 44             LSRA 
399A: 20 02          BRA         $399E

------------------------------------------------
--- print modulator source 2 -------------------
------------------------------------------------
399C: 84 0F          ANDA        #$0F
399E: 8E 75 87       LDX         #$7587		; modulator source
39A1: C6 05          LDB         #$05		; length 5
39A3: 20 CC          BRA         $3971

------------------------------------------------
--- print MIDI mode ----------------------------
------------------------------------------------
39A5: 8E 75 D7       LDX         #$75D7		; MIDI mode
39A8: C6 05          LDB         #$05		; length 5
39AA: 20 C5          BRA         $3971

------------------------------------------------
--- print MOD/VOL/XXX/PRG/BNK/ALL/ONE/SYS ------
------------------------------------------------
39AC: 8E 77 87       LDX         #$7787		; 3char item base
39AF: C6 03          LDB         #$03		; length 3
39B1: 20 BE          BRA         $3971

------------------------------------------------
--- print enabled MIDI messages ----------------
------------------------------------------------
39B3: 8E 76 5F       LDX         #$765F		; enabled messages
39B6: C6 0D          LDB         #$0D		; length 12
39B8: 20 B7          BRA         $3971

------------------------------------------------
--- print sequencer clock sync -----------------
------------------------------------------------
39BA: 84 7F          ANDA        #$7F
39BC: 8E 75 EB       LDX         #$75EB		; internal / MIDI / tape
39BF: C6 0A          LDB         #$0A		; length 10
39C1: 20 AE          BRA         $3971

------------------------------------------------
--- print quantization value -------------------
------------------------------------------------
39C3: 8E 76 0F       LDX         #$760F		; quantization value
39C6: C6 05          LDB         #$05		; length 5
39C8: 20 A7          BRA         $3971

------------------------------------------------
--- print split/layer mode ---------------------
------------------------------------------------
39CA: 34 40          PSHS        U
39CC: 84 80          ANDA        #$80		; strip off on/off bit
39CE: 34 02          PSHS        A
39D0: FE 0D 09       LDU         $0D09		; split/layer base
39D3: A6 5E          LDA         -$02,U		; get program / mode
39D5: 84 80          ANDA        #$80		; strip off upper/lower bit
39D7: 44             LSRA 			; prepare for comparison
39D8: AA E0          ORA         ,S+
39DA: 49             ROLA 
39DB: 49             ROLA 
39DC: 49             ROLA 
39DD: 84 03          ANDA        #$03		;  0  /  1  /   2   /   3
39DF: 35 40          PULS        U
39E1: 8E 76 4B       LDX         #$764B		; OFF / OFF / LOWER / UPPER
39E4: C6 05          LDB         #$05
39E6: 20 89          BRA         $3971

------------------------------------------------
--- print edit page name -----------------------
------------------------------------------------
39E8: 46             RORA 			; mask out page number
39E9: 46             RORA 			; (0,4,8,12)
39EA: 46             RORA 
39EB: 46             RORA 
39EC: 84 0C          ANDA        #$0C		
39EE: 34 02          PSHS        A
39F0: BE 0D 09       LDX         $0D09		; page base
39F3: A6 01          LDA         +$01,X		; page item
39F5: 49             ROLA 			; mask out item number
39F6: 49             ROLA 
39F7: 49             ROLA 
39F8: 84 03          ANDA        #$03
39FA: AA E0          ORA         ,S+		; melt with page
39FC: 8E 75 87       LDX         #$7587		; item text
39FF: C6 05          LDB         #$05		; length = 5
3A01: 16 FF 6D       LBRA        $3971

------------------------------------------------
--- print routines vector table ----------------
------------------------------------------------
3A04: 	FDB $B829	; get & print value part of flag+value type parameters
3A06:	FDB $B85A	;
3A08:	FDB $B823	; print Q value
3A0A:	FDB $B854	;
3A0C:	FDB $B827	; normalize & print LV value
3A0E:	FDB $B828	; normalize & print "shift1" values (Lx, osc mod...)
3A10:	FDB $B82E	; print lin/exp appendix to ENVx LV
3A12:	FDB $B85A	;
3A14:	FDB $B872	;
3A16:	FDB $B871	;
3A18:	FDB $B88E	;
3A1A:	FDB $B8B1	;
3A1C:	FDB $B8BB	;
3A1E:	FDB $B8C1	;
3A20:	FDB $B8E1	;
3A22:	FDB $B933	; print "OF"
3A24:	FDB $B931	; print "OF"
3A26:	FDB $B945	; print "ON"
3A28:	FDB $B943	; print "ON"
3A2A:	FDB $B942	; print "ON"
3A2C:	FDB $B967	; print LFO wave
3A2E:	FDB $B99C	; print modulator source 2
3A30:	FDB $B996	; print modulator source 1
3A32:	FDB $B9E8	; print edit page name
3A34:	FDB $B9A5	; print MIDI mode
3A36:	FDB $B9BA	; print sequencer clock sync
3A38:	FDB $B9C3	; print quantization value
3A3A:	FDB $B9C3	; print quantization value
3A3C:	FDB $B919	; print cartridge program name
3A3E:	FDB $B8E5	; map A to printable character & print A
3A40:	FDB $B9CA	; print split/layer mode
3A42:	FDB $B9B3	; print enabled MIDI messages
3A44:	FDB $B90B	; print aftertouch mode
3A46:	FDB $B912	; print countoff mode
3A48:	FDB $B8F9	; print keyboard hardness
3A4A:	FDB $B94E	; print WAV in LFO menu
3A4C:	FDB $B8F2	; print ALL/HELD
3A4E:	FDB $B82B	;
3A50:	FDB $B9AC	; print MOD/VOL/XXX/PRG/BNK/ALL/ONE/SYS
3A52:	FDB $8238	;
3A54:	FDB $B841	; print second release appendix to ENVx T4

------------------------------------------------
3A56: 34 56          PSHS        U,X,B,A
3A58: 0F AF          CLR         $AF		; $af = 0
3A5A: 96 D1          LDA         $D1		; ($d1) -> $d2
3A5C: 97 D2          STA         $D2
3A5E: 8D 13          BSR         $3A73		; get program address
3A60: 1F 01          TFR         D,X		; address to X
3A62: 30 88 C6       LEAX        -$3A,X		; x=x-58
3A65: CE 0D 30       LDU         #$0D30
3A68: C6 66          LDB         #$66		; PCB length (102)
3A6A: A6 80          LDA         ,X+		; transfer program from [x]
3A6C: A7 C0          STA         ,U+		;   to $0d30
3A6E: 5A             DECB 
3A6F: 26 F9          BNE         $3A6A
3A71: 35 D6          PULS        PC,U,X,B,A

------------------------------------------------
--- get address of any sound program -----------
------------------------------------------------
3A73: 91 BC          CMPA        $BC		; repeat 
3A75: 23 04          BLS         $3A7B		;   a=a-40
3A77: 80 28          SUBA        #$28		; until a < cartridge code
3A79: 20 F8          BRA         $3A73

------------------------------------------------
--- get address of sound program ---------------
------------------------------------------------
3A7B: C6 66          LDB         #$66		; PCB length (102)
3A7D: 3D             MUL  			; a*b
3A7E: C3 10 4A       ADDD        #$104A		; base + program * pcb length
3A81: 39             RTS  

------------------------------------------------
--- transfer cartdridge programs to internal mem
------------------------------------------------
3A82: C6 08          LDB         #$08
3A84: BD BC 05       JSR         $BC05
3A87: CE 10 10       LDU         #$1010		; program bank base
3A8A: 10 8E 0F F0    LDY         #$0FF0		; program bank length
3A8E: 96 CB          LDA         $CB		; program number
3A90: C6 28          LDB         #$28		; 40 (max. # of programs)
3A92: 3D             MUL  			; 
3A93: 86 66          LDA         #$66		; PCB length
3A95: 3D             MUL  			; 
3A96: 30 CB          LEAX        D,U		; base of program to X
3A98: A6 80          LDA         ,X+		; transfer single program
3A9A: A7 C0          STA         ,U+		;   to program bank
3A9C: 31 3F          LEAY        -$01,Y		;   until y=0
3A9E: 26 F8          BNE         $3A98
3AA0: 39             RTS  

------------------------------------------------
--- transfer internal programs to cartridge ----
------------------------------------------------
3AA1: BD 86 02       JSR         $8602
3AA4: 8E 10 10       LDX         #$1010		; program bank base
3AA7: 10 8E 0F F0    LDY         #$0FF0		; program bank length
3AAB: 96 CB          LDA         $CB		; program number
3AAD: C6 28          LDB         #$28		; 40 (max. # of program)
3AAF: 3D             MUL  
3AB0: 86 66          LDA         #$66		; PCB length
3AB2: 3D             MUL  
3AB3: 33 8B          LEAU        D,X		; base of program to U
3AB5: 8D 48          BSR         $3AFF
3AB7: 26 5F          BNE         $3B18
3AB9: 10 8E 00 01    LDY         #$0001
3ABD: CE 3F FF       LDU         #$3FFF		; pointer to CARTRIDGE
3AC0: 96 CB          LDA         $CB
3AC2: 40             NEGA 
3AC3: 33 C6          LEAU        A,U
3AC5: 4F             CLRA 
3AC6: 8D 39          BSR         $3B01
3AC8: 10 8E 00 01    LDY         #$0001
3ACC: CE 3F FF       LDU         #$3FFF		; pointer to CARTRIDGE
3ACF: 86 01          LDA         #$01
3AD1: 8D 2E          BSR         $3B01
3AD3: 7E 86 93       JMP         $8693		; misc init

------------------------------------------------
--- store edit program to cartridge ------------
------------------------------------------------
3AD6: BD 86 02       JSR         $8602		; master init
3AD9: 96 D1          LDA         $D1
3ADB: 8D 9E          BSR         $3A7B
3ADD: 1F 03          TFR         D,U
3ADF: 33 C8 C6       LEAU        -$3A,U
3AE2: 8E 0D 30       LDX         #$0D30		; transfer base
3AE5: 10 8E 00 66    LDY         #$0066		; 102 bytes
3AE9: 8D 14          BSR         $3AFF		
3AEB: 26 09          BNE         $3AF6		; transfer failed -> $baf6
3AED: 0F AF          CLR         $AF
3AEF: 96 D1          LDA         $D1
3AF1: 97 D2          STA         $D2
3AF3: 7E 86 93       JMP         $8693
------------------------------------------------
3AF6: BE 0D 0B       LDX         $0D0B		; error table?
3AF9: A6 02          LDA         +$02,X		; error value to $d1?
3AFB: 97 D1          STA         $D1
3AFD: 20 19          BRA         $3B18

------------------------------------------------
--- write data to cartridge & check integrity --
------------------------------------------------
3AFF: A6 80          LDA         ,X+		; get value from [X]
3B01: C6 FF          LDB         #$FF
3B03: E7 C4          STB         ,U		; #$ff to [U]
3B05: 8D 34          BSR         $3B3B		; delay #$0bb8
3B07: E6 C4          LDB         ,U		; read back
3B09: A7 C4          STA         ,U		; store value to [U]
3B0B: 8D 2E          BSR         $3B3B		; delay #$0bb8
3B0D: E6 C4          LDB         ,U		; read back
3B0F: A1 C0          CMPA        ,U+		; compare
3B11: 26 04          BNE         $3B17		; if not equal RTS
3B13: 31 3F          LEAY        -$01,Y		; repeat until Y=0
3B15: 26 E8          BNE         $3AFF
3B17: 39             RTS  

------------------------------------------------
--- cartridge write failure: print error -------
------------------------------------------------
3B18: BD 86 93       JSR         $8693		; misc. initialization
3B1B: CE 75 76       LDU         #$7576		; WRITE FAILED - CHECK CART
3B1E: BD 99 56       JSR         $9956		;
3B21: 96 A9          LDA         $A9
3B23: 81 01          CMPA        #$01
3B25: 26 05          BNE         $3B2C
3B27: C6 08          LDB         #$08
3B29: 7E BC 05       JMP         $BC05
------------------------------------------------
3B2C: 0F CB          CLR         $CB
3B2E: CE 70 67       LDU         #$7067		; PRESS ANY BUTTON TO CONTINUE
3B31: BD 99 56       JSR         $9956		;
3B34: 32 62          LEAS        +$02,S
3B36: 8D 0E          BSR         $3B46
3B38: 7E 7A 35       JMP         $7A35		; STORAGE menu

------------------------------------------------
--- delay #$0bb8 -------------------------------
------------------------------------------------
3B3B: 34 10          PSHS        X
3B3D: 8E 0B B8       LDX         #$0BB8		; delay $0bb8
3B40: 30 1F          LEAX        -$01,X
3B42: 26 FC          BNE         $3B40
3B44: 35 90          PULS        PC,X


------------------------------------------------
3B46: BD 84 29       JSR         $8429		; stack magic using $0e
3B49: AE 22          LDX         +$02,Y		; x=(y+2)
3B4B: EC 24          LDD         +$04,Y		; d=(y+4)
3B4D: BD 84 9F       JSR         $849F		; $10/$12 magic
3B50: 8C 71 34       CMPX        #$7134		; repeat until X=$7134
3B53: 26 F1          BNE         $3B46
3B55: 7E 71 2E       JMP         $712E		; ROMLOW $012e

------------------------------------------------
--- calculate track block pointer (D) ----------
------------------------------------------------
3B58: C6 1B          LDB         #$1B		; length of track table
3B5A: 3D             MUL  
3B5B: C3 02 D4       ADDD        #$02D4		; add to track table base
3B5E: 39             RTS  

------------------------------------------------
3B5F: D6 C7          LDB         $C7
3B61: C4 7F          ANDB        #$7F
3B63: 26 02          BNE         $3B67
3B65: 0C C7          INC         $C7
3B67: D6 D1          LDB         $D1
3B69: D1 D2          CMPB        $D2
3B6B: 26 04          BNE         $3B71
3B6D: 0D AF          TST         $AF
3B6F: 27 03          BEQ         $3B74
3B71: BD BA 56       JSR         $BA56		; transfer program to buffer
3B74: 39             RTS  

------------------------------------------------
--- check cartridge status ---------------------
------------------------------------------------
3B75: 34 02          PSHS        A
3B77: 96 D5          LDA         $D5		; cartridge hook low
3B79: 26 04          BNE         $3B7F		; if hook set goto $BB7F
3B7B: 86 27          LDA         #$27		; cartridge not usable
3B7D: 20 0E          BRA         $3B8D
------------------------------------------------
3B7F: 7D 3F FE       TST         $3FFE		; cartridge formatted flag
3B82: 26 F7          BNE         $3B7B		; not formatted
3B84: 86 4F          LDA         #$4F		
3B86: 7D 3F FD       TST         $3FFD		; cartridge filled flag
3B89: 26 02          BNE         $3B8D		; not filled
3B8B: 86 77          LDA         #$77
3B8D: 97 BC          STA         $BC
3B8F: 35 82          PULS        PC,A

------------------------------------------------
--- Cartridge Error: print error message -------
--- A contains type of error -------------------
------------------------------------------------
3B91: 34 02          PSHS        A
3B93: CE 74 E8       LDU         #$74E8		; CARTRIDGE ERROR ($54e8)
3B96: BD 99 56       JSR         $9956		;
3B99: 35 02          PULS        A		; get error message offset
3B9B: 84 03          ANDA        #$03
3B9D: 48             LSLA 
3B9E: 8E F8 0D       LDX         #$F80D		; error message base
3BA1: EE 86          LDU         A,X		; get error message
3BA3: BD 99 56       JSR         $9956		; print error message
3BA6: C6 0C          LDB         #$0C
3BA8: 7E BC 05       JMP         $BC05

------------------------------------------------
--- convert A from hex to ascii & print --------
------------------------------------------------
3BAB: 8D 07          BSR         $3BB4
3BAD: 8B 30          ADDA        #$30		; number to ascii
3BAF: CB 30          ADDB        #$30		; number to ascii
3BB1: 7E 99 7D       JMP         $997D		; print A, B to display

------------------------------------------------
--- integer division: a=b/10 -------------------
------------------------------------------------
3BB4: C6 0A          LDB         #$0A		; $0a -> stack
3BB6: 34 04          PSHS        B
3BB8: 1F 89          TFR         A,B		; SWI mode to B
3BBA: 4F             CLRA 			; a=0
3BBB: E1 E4          CMPB        ,S		; if SWI mode < #$0a/#$0c
3BBD: 25 05          BCS         $3BC4		; 
3BBF: E0 E4          SUBB        ,S		; 	b=b-(s)
3BC1: 4C             INCA 			; 	SWI mode = SWI mode+1
3BC2: 20 F7          BRA         $3BBB
------------------------------------------------
3BC4: 32 61          LEAS        +$01,S		; discard #$0b
3BC6: 39             RTS  			; return value: a

------------------------------------------------
--- integer division: a=b/12 -------------------
------------------------------------------------
3BC7: C6 0C          LDB         #$0C
3BC9: 20 EB          BRA         $3BB6

------------------------------------------------
--- send ($ba) $f9 ($bb) to panel
------------------------------------------------
3BCB: 96 BA          LDA         $BA
3BCD: 27 0A          BEQ         $3BD9
3BCF: BD 99 81       JSR         $9981		; print A
3BD2: 86 F9          LDA         #$F9
3BD4: D6 BB          LDB         $BB
3BD6: BD 99 7D       JSR         $997D		; print A, B
3BD9: 39             RTS  

------------------------------------------------
--- send ($ba) $fa ($bb) to panel
--- store D in $ba/$bb
------------------------------------------------
3BDA: 97 BA          STA         $BA
3BDC: D7 BB          STB         $BB
3BDE: BD 99 81       JSR         $9981		; print A
3BE1: 86 FA          LDA         #$FA
3BE3: 20 F1          BRA         $3BD6

------------------------------------------------
--- clear stored keycodes ----------------------
------------------------------------------------
3BE5: 0F A3          CLR         $A3
3BE7: 0F A2          CLR         $A2
3BE9: 39             RTS  

------------------------------------------------
--- cartridge: bank A access -------------------
------------------------------------------------
3BEA: CC 0E 0A       LDD         #$0E0A		; select ROMLOW $5000
3BED: FD 64 0E       STD         $640E		;
3BF0: BD F4 81       JSR         $F481		; A/D conversion
3BF3: BD F4 81       JSR         $F481		; A/D conversion
3BF6: BD A6 69       JSR         $A669		; select ROMLOW $0000
3BF9: 81 19          CMPA        #$19
3BFB: 23 07          BLS         $3C04
3BFD: CE 76 19       LDU         #$7619		; CART A NOT EXIST ($5619)
3C00: C6 0C          LDB         #$0C
3C02: 8D 13          BSR         $3C17
3C04: 39             RTS  

------------------------------------------------
3C05: 34 04          PSHS        B
3C07: 86 FA          LDA         #$FA
3C09: BD 84 60       JSR         $8460		; store a to [$0e]+12
3C0C: BD 84 4B       JSR         $844B		; [$0e] magic
3C0F: 35 04          PULS        B
3C11: 5A             DECB 
3C12: C1 00          CMPB        #$00
3C14: 26 EF          BNE         $3C05
3C16: 39             RTS  

------------------------------------------------
3C17: 34 04          PSHS        B
3C19: BD 99 54       JSR         $9954		; sys.msg. from ROMLOW $5000
3C1C: 35 04          PULS        B
3C1E: 20 E5          BRA         $3C05

------------------------------------------------
3C20: 34 04          PSHS        B
3C22: BD 99 5A       JSR         $995A		; sys.msg. from ROMLOW $6000
3C25: 35 04          PULS        B
3C27: 20 DC          BRA         $3C05

------------------------------------------------
--- analog voltage check -----------------------
------------------------------------------------
3C29: BD BC B2       JSR         $BCB2
3C2C: CE 7F 63       LDU         #$7F63		; ANALOG KNOB ($5f63)
3C2F: BD 99 56       JSR         $9956		
3C32: 8E A6 41       LDX         #$A641		; softbutton handler to $a641
3C35: BF 0D 11       STX         $0D11		;
3C38: 86 10          LDA         #$10
3C3A: 97 A8          STA         $A8
3C3C: BD F4 8D       JSR         $F48D		; 8x A/D conversion
3C3F: 10 8E F7 85    LDY         #$F785		; display position
3C43: 4F             CLRA 
3C44: 34 32          PSHS        Y,X,A
3C46: A6 A6          LDA         A,Y		; get position
3C48: BD 99 81       JSR         $9981		; position cursor
3C4B: A6 E4          LDA         ,S
3C4D: AE 61          LDX         +$01,S
3C4F: E6 86          LDB         A,X
3C51: 4F             CLRA 
3C52: BD C3 CA       JSR         $C3CA		; 
3C55: 35 32          PULS        Y,X,A
3C57: 4C             INCA 
3C58: 81 06          CMPA        #$06
3C5A: 23 E8          BLS         $3C44
3C5C: 39             RTS  

------------------------------------------------
--- Filter tuning sequence ---------------------
------------------------------------------------
3C5D: 8D 53          BSR         $3CB2
3C5F: 8E 71 39       LDX         #$7139		; softbutton handler to
3C62: BF 0D 11       STX         $0D11		;   ROMLOW $0139
3C65: CE F8 1D       LDU         #$F81D		; FILTER TUNING
3C68: BD 99 56       JSR         $9956		;
3C6B: 86 10          LDA         #$10
3C6D: 97 A8          STA         $A8
3C6F: 8E F8 15       LDX         #$F815		; screen positions
3C72: 5F             CLRB 			; init voice counter
3C73: 10 8E 40 70    LDY         #$4070		; voice block base
3C77: 34 34          PSHS        Y,X,B
3C79: A6 85          LDA         B,X		; screen position	
3C7B: C6 46          LDB         #$46		; print "F"
3C7D: BD 99 7D       JSR         $997D		;
3C80: A6 E4          LDA         ,S		; value from stack
3C82: 8B 31          ADDA        #$31		; number to ascii
3C84: C6 3D          LDB         #$3D		; "="
3C86: BD 99 7D       JSR         $997D		; print "F#="
3C89: BD F6 4A       JSR         $F64A
3C8C: 4F             CLRA 
3C8D: BD C3 CA       JSR         $C3CA		; 
3C90: 35 34          PULS        Y,X,B
3C92: 31 A9 00 E7    LEAY        +$00E7,Y	; get next voice block
3C96: 5C             INCB 			; increment voice counter
3C97: C1 08          CMPB        #$08		; all 8 voices processed?
3C99: 25 DC          BCS         $3C77		; no -> loop
3C9B: 39             RTS  

------------------------------------------------
--- Copyright message: RAD software ------------
------------------------------------------------
3C9C: 8D 14          BSR         $3CB2
3C9E: 8E 71 39       LDX         #$7139		; softbutton handler to 
3CA1: BF 0D 11       STX         $0D11		;   ROMLOW $0139 (RTS)
3CA4: 86 10          LDA         #$10
3CA6: 97 A8          STA         $A8
3CA8: CE 75 97       LDU         #$7597		; RAD SOFTWARE ($5597)
3CAB: 7E 99 56       JMP         $9956

--- $acad = $0000
------------------------------------------------
3CAE: 8D 1A          BSR         $3CCA		; clear $ac
3CB0: 20 2B          BRA         $3CDD		; clear $ad

--- $acad = $0101
------------------------------------------------
3CB2: 8D 19          BSR         $3CCD		; $ac=1
3CB4: 20 1F          BRA         $3CD5		; $ad=1

--- clear bits 7-1 of $c7
------------------------------------------------
3CB6: 34 04          PSHS        B
3CB8: C6 01          LDB         #$01
3CBA: D4 C7          ANDB        $C7
3CBC: D7 C7          STB         $C7
3CBE: 35 84          PULS        PC,B

--- set bit 7 of $c7
------------------------------------------------
3CC0: 34 04          PSHS        B
3CC2: C6 80          LDB         #$80
3CC4: DA C7          ORB         $C7
3CC6: D7 C7          STB         $C7
3CC8: 35 84          PULS        PC,B

--- clear $ac
------------------------------------------------
3CCA: 0F AC          CLR         $AC
3CCC: 39             RTS  

--- $ac = 1
------------------------------------------------
3CCD: 34 02          PSHS        A
3CCF: 86 01          LDA         #$01
3CD1: 97 AC          STA         $AC
3CD3: 35 82          PULS        PC,A

--- $ad = 1
------------------------------------------------
3CD5: 34 02          PSHS        A
3CD7: 86 01          LDA         #$01
3CD9: 97 AD          STA         $AD
3CDB: 35 82          PULS        PC,A

-- clear $ad
------------------------------------------------
3CDD: 0F AD          CLR         $AD
3CDF: 39             RTS  

------------------------------------------------
--- erase all memory and reinitialize ----------
------------------------------------------------
3CE0: 8D D0          BSR         $3CB2
3CE2: 8E BC F2       LDX         #$BCF2		; softbutton handler to $bcf2
3CE5: BF 0D 11       STX         $0D11		;
3CE8: 86 10          LDA         #$10
3CEA: 97 A8          STA         $A8
3CEC: CE 75 E9       LDU         #$75E9		; ERASE ALL MEM ($55e9)
3CEF: 7E 99 56       JMP         $9956		;

------------------------------------------------
--- ERASE ALL MEM: yes -------------------------
------------------------------------------------
3CF2: C1 04          CMPB        #$04
3CF4: 26 09          BNE         $3CFF
3CF6: BD 86 0E       JSR         $860E		; master initialization
3CF9: 86 37          LDA         #$37		; function code = 
3CFB: B7 10 0C       STA         $100C		;   erase all & reinit.
3CFE: 3F             SWI  			; reset

------------------------------------------------
--- ERASE ALL MEM: no --------------------------
------------------------------------------------
3CFF: C1 09          CMPB        #$09
3D01: 26 09          BNE         $3D0C
3D03: 8E A6 07       LDX         #$A607		; softbutton handler to $a607
3D06: BF 0D 11       STX         $0D11		; 
3D09: 7E 7A E4       JMP         $7AE4		; ROMLOW $0ae4 (?)
------------------------------------------------
3D0C: 39             RTS  

--- get entry from table @ ROMLOW $17f5
------------------------------------------------
3D0D: 34 40          PSHS        U
3D0F: 24 05          BCC         $3D16
3D11: CE 77 F5       LDU         #$77F5		; table base @ ROMLOW $17f5
3D14: 20 03          BRA         $3D19

------------------------------------------------
--- get character from character table ---------
------------------------------------------------
3D16: CE 77 B5       LDU         #$77B5		; table base
3D19: BD A6 51       JSR         $A651		; ROMLOW $1000
3D1C: A6 C6          LDA         A,U		; get character
3D1E: BD A6 69       JSR         $A669		; ROMLOW $0000
3D21: 35 C0          PULS        PC,U

------------------------------------------------
3D23: 34 01          PSHS        CC
3D25: FE 02 A7       LDU         $02A7
3D28: D6 AA          LDB         $AA
3D2A: C1 0C          CMPB        #$0C
3D2C: 26 08          BNE         $3D36
3D2E: C6 C5          LDB         #$C5
3D30: 10 8E 0D 19    LDY         #$0D19
3D34: 20 10          BRA         $3D46
------------------------------------------------
3D36: BE 0D 15       LDX         $0D15		; get hook
3D39: 8C E8 2D       CMPX        #$E82D		; hook = $e82d?
3D3C: 26 02          BNE         $3D40
3D3E: 33 41          LEAU        +$01,U
3D40: C6 9F          LDB         #$9F
3D42: 10 8E 0D 17    LDY         #$0D17
3D46: 35 01          PULS        CC
3D48: 34 44          PSHS        U,B
3D4A: 26 3B          BNE         $3D87
3D4C: C6 01          LDB         #$01
3D4E: 1F 31          TFR         U,X
3D50: 8C 02 00       CMPX        #$0200
3D53: 25 01          BCS         $3D56
3D55: 58             LSLB 
3D56: 8C 01 00       CMPX        #$0100
3D59: 25 01          BCS         $3D5C
3D5B: 58             LSLB 
3D5C: 8C 00 80       CMPX        #$0080
3D5F: 25 01          BCS         $3D62
3D61: 58             LSLB 
3D62: 8C 00 40       CMPX        #$0040
3D65: 24 01          BCC         $3D68
3D67: 44             LSRA 
3D68: 8C 00 20       CMPX        #$0020
3D6B: 24 01          BCC         $3D6E
3D6D: 44             LSRA 
3D6E: 8C 00 10       CMPX        #$0010
3D71: 24 01          BCC         $3D74
3D73: 44             LSRA 
3D74: 3D             MUL  
3D75: 10 83 03 E6    CMPD        #$03E6
3D79: 23 03          BLS         $3D7E
3D7B: CC 03 E6       LDD         #$03E6
3D7E: 10 A3 61       CMPD        +$01,S
3D81: 22 27          BHI         $3DAA
3D83: 1F 01          TFR         D,X
3D85: 20 15          BRA         $3D9C
------------------------------------------------
3D87: AE A4          LDX         ,Y
3D89: 0D C9          TST         $C9
3D8B: 2B 08          BMI         $3D95
3D8D: AC 61          CMPX        +$01,S
3D8F: 24 19          BCC         $3DAA
3D91: 30 01          LEAX        +$01,X
3D93: 20 07          BRA         $3D9C
------------------------------------------------
3D95: 8C 00 00       CMPX        #$0000
3D98: 27 10          BEQ         $3DAA
3D9A: 30 1F          LEAX        -$01,X
3D9C: AF A4          STX         ,Y
3D9E: A6 E4          LDA         ,S		; print character from stack 
3DA0: BD 99 81       JSR         $9981		;
3DA3: 30 01          LEAX        +$01,X
3DA5: 1F 10          TFR         X,D
3DA7: BD C3 CA       JSR         $C3CA
3DAA: 35 C4          PULS        PC,U,B
------------------------------------------------
3DAC: 26 18          BNE         $3DC6
3DAE: D6 BF          LDB         $BF
3DB0: 26 01          BNE         $3DB3
3DB2: 39             RTS  
------------------------------------------------
3DB3: C1 40          CMPB        #$40
3DB5: 24 04          BCC         $3DBB
3DB7: 44             LSRA 
3DB8: 58             LSLB 
3DB9: 20 F8          BRA         $3DB3
------------------------------------------------
3DBB: 81 00          CMPA        #$00
3DBD: 27 04          BEQ         $3DC3
3DBF: 91 BF          CMPA        $BF
3DC1: 23 01          BLS         $3DC4
3DC3: 39             RTS  
------------------------------------------------
3DC4: 20 12          BRA         $3DD8
------------------------------------------------
3DC6: 96 C0          LDA         $C0
3DC8: 0D C9          TST         $C9
3DCA: 2A 07          BPL         $3DD3
3DCC: 81 02          CMPA        #$02
3DCE: 25 01          BCS         $3DD1
3DD0: 4A             DECA 
3DD1: 20 05          BRA         $3DD8
------------------------------------------------
3DD3: 91 BF          CMPA        $BF
3DD5: 24 01          BCC         $3DD8
3DD7: 4C             INCA 
3DD8: 97 C0          STA         $C0
3DDA: 86 AF          LDA         #$AF
3DDC: BD 99 81       JSR         $9981
3DDF: 96 C0          LDA         $C0
3DE1: 7E BB AB       JMP         $BBAB		          ; print A
------------------------------------------------
3DE4: 26 0C          BNE         $3DF2
3DE6: B1 02 AB       CMPA        $02AB
3DE9: 24 2A          BCC         $3E15
3DEB: 4D             TSTA 
3DEC: 26 18          BNE         $3E06
3DEE: 86 01          LDA         #$01
3DF0: 20 14          BRA         $3E06
------------------------------------------------
3DF2: B6 0D 1B       LDA         $0D1B
3DF5: 0D C9          TST         $C9
3DF7: 2B 08          BMI         $3E01
3DF9: B1 02 AB       CMPA        $02AB
3DFC: 24 17          BCC         $3E15
3DFE: 4C             INCA 
3DFF: 20 05          BRA         $3E06
------------------------------------------------
3E01: 81 01          CMPA        #$01
3E03: 23 10          BLS         $3E15
3E05: 4A             DECA 
3E06: B7 0D 1B       STA         $0D1B
3E09: 34 02          PSHS        A
3E0B: 86 C6          LDA         #$C6		; cursor to pos. $36
3E0D: BD 99 81       JSR         $9981		;
3E10: 35 02          PULS        A
3E12: BD BB AB       JSR         $BBAB		; print A
3E15: 39             RTS  
------------------------------------------------
3E16: 26 11          BNE         $3E29
3E18: 48             LSLA 
3E19: 81 FA          CMPA        #$FA
3E1B: 23 04          BLS         $3E21
3E1D: 86 FA          LDA         #$FA
3E1F: 20 1A          BRA         $3E3B
------------------------------------------------
3E21: 81 19          CMPA        #$19
3E23: 24 16          BCC         $3E3B
3E25: 86 19          LDA         #$19
3E27: 20 12          BRA         $3E3B
------------------------------------------------
3E29: 96 EC          LDA         $EC
3E2B: 0D C9          TST         $C9
3E2D: 2B 07          BMI         $3E36
3E2F: 81 FA          CMPA        #$FA
3E31: 24 0D          BCC         $3E40
3E33: 4C             INCA 
3E34: 20 05          BRA         $3E3B
------------------------------------------------
3E36: 81 19          CMPA        #$19
3E38: 23 06          BLS         $3E40
3E3A: 4A             DECA 
3E3B: 97 EC          STA         $EC
3E3D: BD BF 53       JSR         $BF53
3E40: 39             RTS  
------------------------------------------------
3E41: 26 0A          BNE         $3E4D
3E43: 44             LSRA 
3E44: 44             LSRA 
3E45: 81 1E          CMPA        #$1E
3E47: 23 16          BLS         $3E5F
3E49: 86 1E          LDA         #$1E
3E4B: 20 12          BRA         $3E5F
------------------------------------------------
3E4D: 96 BE          LDA         $BE
3E4F: 0D C9          TST         $C9
3E51: 2B 07          BMI         $3E5A
3E53: 81 1E          CMPA        #$1E
3E55: 24 1B          BCC         $3E72
3E57: 4C             INCA 
3E58: 20 05          BRA         $3E5F
------------------------------------------------
3E5A: 81 00          CMPA        #$00
3E5C: 23 14          BLS         $3E72
3E5E: 4A             DECA 
3E5F: 97 BE          STA         $BE
3E61: 34 02          PSHS        A
3E63: 86 C1          LDA         #$C1		; cursor to pos. $31
3E65: BD 99 81       JSR         $9981		;
3E68: 35 02          PULS        A
3E6A: 8E 76 E7       LDX         #$76E7		; quantization value
3E6D: C6 04          LDB         #$04		; text length = 4
3E6F: BD B9 71       JSR         $B971		; print quantization value
3E72: 39             RTS  
------------------------------------------------
3E73: 26 09          BNE         $3E7E
3E75: 44             LSRA 
3E76: 81 3B          CMPA        #$3B
3E78: 23 18          BLS         $3E92
3E7A: 86 3B          LDA         #$3B
3E7C: 20 14          BRA         $3E92
------------------------------------------------
3E7E: 96 BF          LDA         $BF
3E80: 0D C9          TST         $C9
3E82: 27 29          BEQ         $3EAD
3E84: 2B 07          BMI         $3E8D
3E86: 81 3B          CMPA        #$3B
3E88: 24 1D          BCC         $3EA7
3E8A: 4C             INCA 
3E8B: 20 05          BRA         $3E92
------------------------------------------------
3E8D: 81 00          CMPA        #$00
3E8F: 27 16          BEQ         $3EA7
3E91: 4A             DECA 
3E92: D6 AA          LDB         $AA
3E94: C1 0F          CMPB        #$0F
3E96: 27 04          BEQ         $3E9C
3E98: C1 16          CMPB        #$16
3E9A: 26 09          BNE         $3EA5
3E9C: 8E 01 C7       LDX         #$01C7
3E9F: E6 86          LDB         A,X
3EA1: C1 FF          CMPB        #$FF
3EA3: 26 DB          BNE         $3E80
3EA5: 97 BF          STA         $BF
3EA7: 96 BF          LDA         $BF
3EA9: 4C             INCA 
3EAA: BD BB AB       JSR         $BBAB          ; print A
3EAD: 39             RTS  
------------------------------------------------
3EAE: 26 0C          BNE         $3EBC
3EB0: 4D             TSTA 
3EB1: 26 01          BNE         $3EB4
3EB3: 4C             INCA 
3EB4: 81 63          CMPA        #$63
3EB6: 23 16          BLS         $3ECE
3EB8: 86 63          LDA         #$63
3EBA: 20 12          BRA         $3ECE
------------------------------------------------
3EBC: 96 C0          LDA         $C0
3EBE: 0D C9          TST         $C9
3EC0: 2B 07          BMI         $3EC9
3EC2: 81 63          CMPA        #$63
3EC4: 24 14          BCC         $3EDA
3EC6: 4C             INCA 
3EC7: 20 05          BRA         $3ECE
------------------------------------------------
3EC9: 81 01          CMPA        #$01
3ECB: 23 0D          BLS         $3EDA
3ECD: 4A             DECA 
3ECE: 97 C0          STA         $C0
3ED0: 86 A6          LDA         #$A6		; cursor to pos $26
3ED2: BD 99 81       JSR         $9981		;
3ED5: 96 C0          LDA         $C0
3ED7: BD BB AB       JSR         $BBAB          ; print A
3EDA: 39             RTS  
------------------------------------------------
3EDB: 26 18          BNE         $3EF5
3EDD: 81 10          CMPA        #$10
3EDF: 24 04          BCC         $3EE5
3EE1: 86 10          LDA         #$10
3EE3: 20 06          BRA         $3EEB
------------------------------------------------
3EE5: 81 70          CMPA        #$70
3EE7: 23 02          BLS         $3EEB
3EE9: 86 70          LDA         #$70
3EEB: 44             LSRA 
3EEC: 44             LSRA 
3EED: 34 02          PSHS        A
3EEF: 86 F0          LDA         #$F0
3EF1: AB E0          ADDA        ,S+
3EF3: 20 12          BRA         $3F07
------------------------------------------------
3EF5: A6 C4          LDA         ,U
3EF7: 0D C9          TST         $C9
3EF9: 2B 07          BMI         $3F02
3EFB: 81 0C          CMPA        #$0C
3EFD: 2C 0A          BGE         $3F09
3EFF: 4C             INCA 
3F00: 20 05          BRA         $3F07
------------------------------------------------
3F02: 81 F4          CMPA        #$F4
3F04: 2F 03          BLE         $3F09
3F06: 4A             DECA 
3F07: A7 C4          STA         ,U
3F09: 39             RTS  

--- via $8093
------------------------------------------------
3F0A: 26 05          BNE         $3F11
3F0C: 84 60          ANDA        #$60
3F0E: 48             LSLA 
3F0F: 20 16          BRA         $3F27
------------------------------------------------
3F11: A6 C4          LDA         ,U
3F13: 84 C0          ANDA        #$C0
3F15: 0D C9          TST         $C9
3F17: 2B 08          BMI         $3F21
3F19: 81 80          CMPA        #$80
3F1B: 22 22          BHI         $3F3F
3F1D: 8B 40          ADDA        #$40
3F1F: 20 06          BRA         $3F27
------------------------------------------------
3F21: 81 40          CMPA        #$40
3F23: 25 1A          BCS         $3F3F
3F25: 80 40          SUBA        #$40
3F27: 11 83 02 D7    CMPU        #$02D7
3F2B: 26 06          BNE         $3F33
3F2D: 81 40          CMPA        #$40
3F2F: 22 02          BHI         $3F33
3F31: 86 40          LDA         #$40		; byte to be ORed with
3F33: C6 30          LDB         #$30		; byte to be ANDed with
3F35: BD 80 37       JSR         $8037		; U = U & B | A
3F38: 34 40          PSHS        U
3F3A: BD 89 E7       JSR         $89E7
3F3D: 35 40          PULS        U
3F3F: 39             RTS  
------------------------------------------------
3F40: 34 01          PSHS        CC
3F42: C6 07          LDB         #$07
3F44: CE 0D 17       LDU         #$0D17
3F47: 35 01          PULS        CC
3F49: 34 04          PSHS        B
3F4B: 26 03          BNE         $3F50
3F4D: 7E 80 11       JMP         $8011
------------------------------------------------
3F50: 7E 80 1D       JMP         $801D

------------------------------------------------
--- set $cd to 1 -------------------------------
------------------------------------------------
3F53: 34 02          PSHS        A
3F55: 86 01          LDA         #$01
3F57: 97 CD          STA         $CD
3F59: 35 82          PULS        PC,A

------------------------------------------------
--- clear bit 7 of $a5 -------------------------
------------------------------------------------
3F5B: 34 02          PSHS        A
3F5D: 96 A5          LDA         $A5
3F5F: 84 7F          ANDA        #$7F
3F61: 97 A5          STA         $A5
3F63: 35 82          PULS        PC,A

------------------------------------------------
--- set bit 7 of $a5 ---------------------------
------------------------------------------------
3F65: 34 02          PSHS        A
3F67: 96 A5          LDA         $A5
3F69: 8A 80          ORA         #$80
3F6B: 97 A5          STA         $A5
3F6D: 35 82          PULS        PC,A

------------------------------------------------
3F6F: 0D A5          TST         $A5
3F71: 26 04          BNE         $3F77
3F73: 0C A5          INC         $A5
3F75: 20 02          BRA         $3F79

--- button 0/1/2
------------------------------------------------
3F77: 0F A5          CLR         $A5
3F79: D6 D0          LDB         $D0
3F7B: C1 02          CMPB        #$02
3F7D: 22 04          BHI         $3F83
3F7F: CB 03          ADDB        #$03
3F81: 20 0C          BRA         $3F8F

--- button 4/5
------------------------------------------------
3F83: C1 05          CMPB        #$05
3F85: 22 04          BHI         $3F8B
3F87: C0 03          SUBB        #$03
3F89: 20 04          BRA         $3F8F
------------------------------------------------
3F8B: C6 06          LDB         #$06
3F8D: DB A5          ADDB        $A5
3F8F: D7 D0          STB         $D0
3F91: 20 14          BRA         $3FA7

--- button 3
------------------------------------------------
3F93: C1 03          CMPB        #$03
3F95: 26 06          BNE         $3F9D
3F97: CB 03          ADDB        #$03
3F99: DB A5          ADDB        $A5
3F9B: 20 08          BRA         $3FA5
------------------------------------------------
3F9D: 96 A5          LDA         $A5
3F9F: 81 01          CMPA        #$01
3FA1: 26 02          BNE         $3FA5
3FA3: CB 03          ADDB        #$03
3FA5: D7 D0          STB         $D0
3FA7: BD BC C0       JSR         $BCC0		; set bit 7 of $c7
3FAA: BD BC B2       JSR         $BCB2		; $ac/$ad = $0101
3FAD: 86 03          LDA         #$03
3FAF: 97 A9          STA         $A9
3FB1: 8D A8          BSR         $3F5B
3FB3: 86 08          LDA         #$08
3FB5: 97 A8          STA         $A8
3FB7: 86 D6          LDA         #$D6		; CLS
3FB9: BD 99 81       JSR         $9981		;
3FBC: 86 03          LDA         #$03
3FBE: D6 D0          LDB         $D0
3FC0: C1 06          CMPB        #$06
3FC2: 25 01          BCS         $3FC5
3FC4: 4C             INCA 
3FC5: 34 04          PSHS        B	
3FC7: 8E 76 37       LDX         #$7637		;  INT / CRTA / CRTB
3FCA: C6 04          LDB         #$04		; text length = 4
3FCC: BD B9 71       JSR         $B971
3FCF: 35 04          PULS        B
3FD1: 1F 98          TFR         B,A
3FD3: 81 06          CMPA        #$06
3FD5: 25 02          BCS         $3FD9
3FD7: 80 06          SUBA        #$06
3FD9: 8B 31          ADDA        #$31
3FDB: BD 99 81       JSR         $9981
3FDE: C1 06          CMPB        #$06
3FE0: 25 03          BCS         $3FE5
3FE2: 7E C0 66       JMP         $C066
------------------------------------------------
3FE5: 10 8E F7 7A    LDY         #$F77A		; 10param. display positions
3FE9: 8E 01 C7       LDX         #$01C7		; screen buffer
3FEC: 86 0A          LDA         #$0A		; text length = 10
3FEE: 3D             MUL  
3FEF: 1F 98          TFR         B,A
3FF1: 8B 09          ADDA        #$09
3FF3: 34 02          PSHS        A
3FF5: 34 34          PSHS        Y,X,B
3FF7: 1F 98          TFR         B,A
3FF9: BD BB B4       JSR         $BBB4
3FFC: A6 A5          LDA         B,Y
3FFE: BD 99 81       JSR         $9981
4001: E6 E4          LDB         ,S
4003: A6 85          LDA         B,X
4005: 2A 05          BPL         $400C
4007: CE F8 31       LDU         #$F831		; print "XXX-"
400A: 20 1B          BRA         $4027
------------------------------------------------
400C: 26 07          BNE         $4015
400E: 86 D5          LDA         #$D5		; print #$d5
4010: C6 2E          LDB         #$2E		; print #$2e
4012: BD 99 7D       JSR         $997D		;
4015: 96 B0          LDA         $B0
4017: 2A 0B          BPL         $4024
4019: 84 7F          ANDA        #$7F		; don't underline sequence if 
401B: A1 E4          CMPA        ,S		;   not selected
401D: 26 05          BNE         $4024		; 
401F: 86 D2          LDA         #$D2		; enable underline
4021: BD 99 81       JSR         $9981		;
4024: CE F8 2C       LDU         #$F82C		; print "SEQ-"
4027: BD 99 56       JSR         $9956		;
402A: A6 E4          LDA         ,S		; get sequence number
402C: 4C             INCA 			: start with 1 not 0
402D: BD BB AB       JSR         $BBAB          ; print sequence number
4030: 86 D1          LDA         #$D1		; disable underline
4032: BD 99 81       JSR         $9981		;
4035: 35 34          PULS        Y,X,B
4037: 5C             INCB 
4038: E1 E4          CMPB        ,S
403A: 23 B9          BLS         $3FF5
403C: 32 61          LEAS        +$01,S
403E: D6 F5          LDB         $F5
4040: 2A 10          BPL         $4052
4042: 96 F2          LDA         $F2
4044: BD BB B4       JSR         $BBB4
4047: 91 D0          CMPA        $D0
4049: 26 07          BNE         $4052
404B: A6 A5          LDA         B,Y
404D: C6 06          LDB         #$06
404F: BD BB DA       JSR         $BBDA
4052: 96 D0          LDA         $D0
4054: 81 06          CMPA        #$06
4056: 24 05          BCC         $405D
4058: 8E C0 A3       LDX         #$C0A3		; softbutton handler to $c0a3
405B: 20 03          BRA         $4060
------------------------------------------------
405D: 8E C1 24       LDX         #$C124		; softbutton handler to $c124
4060: BF 0D 11       STX         $0D11		;
4063: 7E C3 63       JMP         $C363
------------------------------------------------
4066: 96 F5          LDA         $F5
4068: 34 02          PSHS        A
406A: 96 D0          LDA         $D0
406C: 81 06          CMPA        #$06
406E: 26 03          BNE         $4073
4070: 4F             CLRA 
4071: 20 02          BRA         $4075
------------------------------------------------
4073: 86 0A          LDA         #$0A
4075: 34 02          PSHS        A
4077: 10 8E F7 7A    LDY         #$F77A		; 8param. display position
407B: 5F             CLRB 
407C: 34 04          PSHS        B
407E: A6 A5          LDA         B,Y
4080: EB 61          ADDB        +$01,S
4082: D7 F5          STB         $F5
4084: BD AD BB       JSR         $ADBB
4087: 35 04          PULS        B
4089: 5C             INCB 
408A: C1 09          CMPB        #$09
408C: 23 EE          BLS         $407C
408E: 35 06          PULS        B,A
4090: D7 F5          STB         $F5
4092: 2B BE          BMI         $4052
4094: 4D             TSTA 
4095: 27 06          BEQ         $409D
4097: C1 09          CMPB        #$09
4099: 23 B7          BLS         $4052
409B: C0 0A          SUBB        #$0A
409D: C1 09          CMPB        #$09
409F: 23 AA          BLS         $404B
40A1: 20 AF          BRA         $4052
------------------------------------------------
40A3: 96 AA          LDA         $AA
40A5: 81 01          CMPA        #$01
40A7: 26 02          BNE         $40AB
40A9: 20 08          BRA         $40B3
------------------------------------------------
40AB: 81 00          CMPA        #$00
40AD: 27 04          BEQ         $40B3
40AF: 81 05          CMPA        #$05
40B1: 26 6A          BNE         $411D
40B3: 34 04          PSHS        B
40B5: 96 D0          LDA         $D0
40B7: C6 0A          LDB         #$0A
40B9: 3D             MUL  
40BA: EB E0          ADDB        ,S+
40BC: 8E 01 C7       LDX         #$01C7
40BF: 6D 85          TST         B,X
40C1: 27 12          BEQ         $40D5
40C3: 96 AA          LDA         $AA
40C5: 81 01          CMPA        #$01
40C7: 26 02          BNE         $40CB
40C9: 20 56          BRA         $4121
------------------------------------------------
40CB: 6D 85          TST         B,X
40CD: 2A 06          BPL         $40D5
40CF: BD C3 55       JSR         $C355
40D2: 7E AC 6C       JMP         $AC6C		; create new sequence
------------------------------------------------
40D5: D7 BF          STB         $BF
40D7: 96 F5          LDA         $F5
40D9: 8A 80          ORA         #$80
40DB: 97 F5          STA         $F5
40DD: 96 AA          LDA         $AA
40DF: 81 00          CMPA        #$00
40E1: 27 12          BEQ         $40F5
40E3: 81 01          CMPA        #$01
40E5: 26 0C          BNE         $40F3
40E7: 0F CD          CLR         $CD
40E9: D1 F2          CMPB        $F2
40EB: 27 02          BEQ         $40EF
40ED: CA 80          ORB         #$80
40EF: D7 B0          STB         $B0
40F1: 20 02          BRA         $40F5
------------------------------------------------
40F3: 86 00          LDA         #$00
40F5: 97 CA          STA         $CA
40F7: 0D CD          TST         $CD
40F9: 27 09          BEQ         $4104
40FB: 8E C1 04       LDX         #$C104		; hook to $c104
40FE: BF 0D 15       STX         $0D15		;
4101: 7E AE 38       JMP         $AE38
------------------------------------------------
4104: 8E 00 04       LDX         #$0004
4107: 96 BF          LDA         $BF
4109: BD AA 34       JSR         $AA34
410C: CC 00 00       LDD         #$0000
410F: FD 0D 19       STD         $0D19
4112: 86 10          LDA         #$10
4114: 97 AA          STA         $AA
4116: D6 BF          LDB         $BF
4118: CB 14          ADDB        #$14
411A: 7E 8B 08       JMP         $8B08		; send SONG SELECT
------------------------------------------------
411D: 81 06          CMPA        #$06
411F: 26 02          BNE         $4123
4121: 20 52          BRA         $4175
------------------------------------------------
4123: 39             RTS  
------------------------------------------------
4124: 96 AA          LDA         $AA
4126: 81 05          CMPA        #$05
4128: 27 04          BEQ         $412E
412A: 81 00          CMPA        #$00
412C: 26 47          BNE         $4175
412E: 8E 02 03       LDX         #$0203
4131: 96 A5          LDA         $A5
4133: 81 01          CMPA        #$01
4135: 26 02          BNE         $4139
4137: CB 0A          ADDB        #$0A
4139: A6 85          LDA         B,X
413B: 81 FF          CMPA        #$FF
413D: 26 06          BNE         $4145
413F: BD C3 55       JSR         $C355
4142: 7E AC A7       JMP         $ACA7		; create new song
------------------------------------------------
4145: D7 F5          STB         $F5
4147: 0D CD          TST         $CD
4149: 27 09          BEQ         $4154
414B: 8E C1 54       LDX         #$C154		; hook to $c154
414E: BF 0D 15       STX         $0D15		;
4151: 7E AE 38       JMP         $AE38
------------------------------------------------
4154: BD AD 1C       JSR         $AD1C
4157: 84 01          ANDA        #$01
4159: 97 E8          STA         $E8
415B: 34 04          PSHS        B
415D: BD 8B 08       JSR         $8B08		; send SONG SELECT
4160: 35 04          PULS        B
4162: CB 3C          ADDB        #$3C
4164: BD D0 03       JSR         $D003
4167: 86 01          LDA         #$01
4169: B7 0D 1B       STA         $0D1B
416C: 86 05          LDA         #$05
416E: 97 AA          STA         $AA
4170: 97 CA          STA         $CA
4172: 7E BF AD       JMP         $BFAD		; MAIN menu
------------------------------------------------
4175: BD A9 FB       JSR         $A9FB		; SEQ. MUST BE STOPPED
4178: 20 F8          BRA         $4172
------------------------------------------------
417A: 86 05          LDA         #$05
417C: 97 AA          STA         $AA
417E: 97 CA          STA         $CA
4180: 5F             CLRB 
4181: 96 F5          LDA         $F5
4183: 81 0A          CMPA        #$0A
4185: 25 01          BCS         $4188
4187: 5C             INCB 
4188: D7 A5          STB         $A5
418A: C6 03          LDB         #$03
418C: 7E BF 93       JMP         $BF93

------------------------------------------------
--- locator menu -------------------------------
------------------------------------------------
418F: CE 77 15       LDU         #$7715		; LOCATE SEQ= ($5715)
4192: BD 99 56       JSR         $9956
4195: 96 AA          LDA         $AA
4197: 81 06          CMPA        #$06
4199: 27 04          BEQ         $419F
419B: 81 05          CMPA        #$05
419D: 26 10          BNE         $41AF
419F: CE 77 3E       LDU         #$773E		; STEP= ($573e)
41A2: BD 99 56       JSR         $9956
41A5: 86 87          LDA         #$87
41A7: BD AD BB       JSR         $ADBB
41AA: 8E AF 22       LDX         #$AF22		; softbutton handler to $af22
41AD: 20 1A          BRA         $41C9
------------------------------------------------
41AF: CE 77 47       LDU         #$7747		; TRACK= ($5747)
41B2: BD 99 56       JSR         $9956
41B5: 96 B6          LDA         $B6
41B7: 27 07          BEQ         $41C0
41B9: 8B 30          ADDA        #$30
41BB: BD 99 81       JSR         $9981
41BE: 20 06          BRA         $41C6
------------------------------------------------
41C0: CE 77 4F       LDU         #$774F		; NONE ($574f)
41C3: BD 99 56       JSR         $9956
41C6: 8E AE AB       LDX         #$AEAB		; softbutton handler to $aeab
41C9: BF 0D 11       STX         $0D11
41CC: 86 02          LDA         #$02
41CE: 97 A8          STA         $A8
41D0: BD C1 ED       JSR         $C1ED
41D3: BD BC AE       JSR         $BCAE		; clear $ac, $ad
41D6: C6 7F          LDB         #$7F
41D8: D7 C8          STB         $C8
41DA: 7E C3 63       JMP         $C363
------------------------------------------------

41DD: AD 42 41 52 3D 00		.BAR=. 
41E3: AD 54 4D 50 3D 00 	.TMP=.
41E9: 45 58 54 00   		EXT.

------------------------------------------------
41ED: 96 A8          LDA         $A8
41EF: 81 04          CMPA        #$04
41F1: 26 07          BNE         $41FA
41F3: 0D DB          TST         $DB
41F5: 27 2D          BEQ         $4224
41F7: 7E 81 1B       JMP         $811B
------------------------------------------------
41FA: 81 02          CMPA        #$02
41FC: 27 27          BEQ         $4225
41FE: 81 03          CMPA        #$03
4200: 26 22          BNE         $4224
4202: 96 AA          LDA         $AA
4204: 81 04          CMPA        #$04
4206: 27 11          BEQ         $4219
4208: 81 02          CMPA        #$02
420A: 27 0D          BEQ         $4219
420C: 81 08          CMPA        #$08
420E: 27 09          BEQ         $4219
4210: CE C1 E3       LDU         #$C1E3		; TMP =
4213: BD 99 56       JSR         $9956
4216: 7E C2 68       JMP         $C268
------------------------------------------------
4219: CE C1 DD       LDU         #$C1DD		; BAR =
421C: BD 99 56       JSR         $9956
421F: 86 B1          LDA         #$B1
4221: 7E C2 7E       JMP         $C27E
------------------------------------------------
4224: 39             RTS  
------------------------------------------------
4225: 96 AA          LDA         $AA
4227: 81 06          CMPA        #$06
4229: 27 04          BEQ         $422F
422B: 81 05          CMPA        #$05
422D: 26 1A          BNE         $4249
422F: 86 93          LDA         #$93
4231: BD 99 81       JSR         $9981
4234: B6 02 A9       LDA         $02A9
4237: BD BB AB       JSR         $BBAB          ; print A
423A: 86 96          LDA         #$96		; cursor to pos. $16
423C: BD 99 81       JSR         $9981		; 
423F: B6 02 AA       LDA         $02AA
4242: 4C             INCA 
4243: B0 01 00       SUBA        $0100
4246: BD BB AB       JSR         $BBAB          ; print A
4249: 86 9E          LDA         #$9E		; cursor to pos. $1e
424B: BD 99 81       JSR         $9981		;
424E: 96 F2          LDA         $F2
4250: 4C             INCA 
4251: BD BB AB       JSR         $BBAB          ; print A
4254: 86 A5          LDA         #$A5
4256: BD C2 7E       JSR         $C27E
4259: 86 B5          LDA         #$B5		; cursor to pos. $35
425B: BD 99 81       JSR         $9981
425E: 96 F7          LDA         $F7		; score value
4260: 8E 76 E7       LDX         #$76E7		; score value table base
4263: C6 04          LDB         #$04		; text length
4265: BD B9 71       JSR         $B971		; create screen buffer
4268: 86 B1          LDA         #$B1		; cursor to pos $31
426A: BD 99 81       JSR         $9981		:
426D: 96 E5          LDA         $E5
426F: 84 7F          ANDA        #$7F
4271: 27 06          BEQ         $4279
4273: CE C1 E9       LDU         #$C1E9		; TMP
4276: 7E 99 56       JMP         $9956
------------------------------------------------
4279: DC EB          LDD         $EB
427B: 7E C3 CA       JMP         $C3CA
------------------------------------------------
427E: BD 99 81       JSR         $9981
4281: FC 01 11       LDD         $0111
4284: C3 00 01       ADDD        #$0001
4287: 7E C3 CA       JMP         $C3CA
------------------------------------------------
428A: CE F8 B0       LDU         #$F8B0		; print "TRACKS TMP="
428D: BD 99 56       JSR         $9956		;
4290: 86 03          LDA         #$03
4292: 97 A8          STA         $A8
4294: 8D 13          BSR         $42A9
4296: BD BC AE       JSR         $BCAE
4299: C6 7F          LDB         #$7F
429B: D7 C8          STB         $C8
429D: BD BC B6       JSR         $BCB6
42A0: 8E AA EE       LDX         #$AAEE		; softbutton handler to $aaee
42A3: BF 0D 11       STX         $0D11		;
42A6: 7E C3 63       JMP         $C363

------------------------------------------------
--- create TRACK TYPE menu ---------------------
------------------------------------------------
42A9: 96 A8          LDA         $A8
42AB: 81 03          CMPA        #$03		; button = 3?
42AD: 26 1A          BNE         $42C9		; no -> return
42AF: BD C2 68       JSR         $C268
42B2: 5F             CLRB 			; track 0
42B3: CE 02 D4       LDU         #$02D4		; track table base
42B6: 33 C8 1B       LEAU        +$1B,U		; next block
42B9: 34 44          PSHS        U,B
42BB: 8D 12          BSR         $42CF		; create track menu for track B
42BD: 35 44          PULS        U,B
42BF: 33 C8 1B       LEAU        +$1B,U		; next block
42C2: 5C             INCB 
42C3: C1 07          CMPB        #$07
42C5: 23 F2          BLS         $42B9
42C7: 8D 66          BSR         $432F
42C9: 39             RTS  

------------------------------------------------
--- create TRACK TYPE menu (1) -----------------
------------------------------------------------
42CA: 86 E8          LDA         #$E8		; send $e8 to display
42CC: BD 99 81       JSR         $9981

------------------------------------------------
--- create TRACK TYPE menu (2) -----------------
------------------------------------------------
42CF: 10 8E F8 D5    LDY         #$F8D5		; track type position base
42D3: A6 A5          LDA         B,Y		; get position on display
42D5: 4A             DECA 			
42D6: BD 99 81       JSR         $9981		; position cursor
42D9: A6 42          LDA         +$02,U		; get track type
42DB: 2A 0F          BPL         $42EC
42DD: 8E F8 C9       LDX         #$F8C9		; track type UNUSED
42E0: 20 35          BRA         $4317
------------------------------------------------
42E2: 8E F8 BD       LDX         #$F8BD		; track type *MIDI*
42E5: 20 30          BRA         $4317
------------------------------------------------
42E7: 8E F8 C3       LDX         #$F8C3		; track type *SEQ-*
42EA: 20 2B          BRA         $4317
------------------------------------------------
42EC: E6 43          LDB         +$03,U
42EE: C4 C0          ANDB        #$C0
42F0: 27 F5          BEQ         $42E7
42F2: C1 80          CMPB        #$80
42F4: 27 EC          BEQ         $42E2
42F6: 8E 0D 6A       LDX         #$0D6A
42F9: AC C4          CMPX        ,U
42FB: AC C4          CMPX        ,U
42FD: 26 07          BNE         $4306
42FF: 86 D0          LDA         #$D0
4301: BD 99 81       JSR         $9981
4304: 20 0E          BRA         $4314
------------------------------------------------
4306: 91 BC          CMPA        $BC
4308: 23 05          BLS         $430F
430A: 8E F8 CF       LDX         #$F8CF		; track type: *CART*
430D: 20 08          BRA         $4317
------------------------------------------------
430F: BD BA 7B       JSR         $BA7B
4312: 1F 01          TFR         D,X
4314: 30 88 C6       LEAX        -$3A,X
4317: 86 20          LDA         #$20
4319: E6 43          LDB         +$03,U
431B: C4 20          ANDB        #$20
431D: 27 02          BEQ         $4321
431F: 86 2E          LDA         #$2E		; print "."
4321: BD 99 81       JSR         $9981
4324: C6 06          LDB         #$06
4326: 4F             CLRA 
4327: BD B9 71       JSR         $B971
432A: 86 D1          LDA         #$D1		; position cursor
432C: 7E 99 81       JMP         $9981
------------------------------------------------
432F: BD BB CB       JSR         $BBCB
4332: D6 B6          LDB         $B6
4334: 27 0B          BEQ         $4341
4336: 5A             DECB 
4337: 8E F8 D5       LDX         #$F8D5		; get track type position
433A: A6 85          LDA         B,X		;   of track X
433C: C6 06          LDB         #$06
433E: BD BB DA       JSR         $BBDA
4341: 39             RTS  

------------------------------------------------
--- prepare CREATE/ERASE menu ------------------
------------------------------------------------
4342: BD BC B2       JSR         $BCB2
4345: CE 77 62       LDU         #$7762		; CREATE NEW SEQ. ($5762)
4348: BD 99 56       JSR         $9956
434B: 86 A3          LDA         #$A3
434D: BD 99 81       JSR         $9981
4350: FC 02 AC       LDD         $02AC
4353: 8D 3B          BSR         $4390
4355: 34 06          PSHS        B,A
4357: 86 0A          LDA         #$0A
4359: 97 A8          STA         $A8
435B: 8E AB 7E       LDX         #$AB7E		; softbutton handler to $ab7e
435E: BF 0D 11       STX         $0D11
4361: 35 86          PULS        PC,B,A

------------------------------------------------
--- print sequencer mode on track screen -------
--- if 2<$a8<9 ---------------------------------
------------------------------------------------
4363: 96 A8          LDA         $A8
4365: 81 02          CMPA        #$02		; if $a8<2 or $a8>9 then RTS
4367: 25 26          BCS         $438F
4369: 81 09          CMPA        #$09
436B: 22 22          BHI         $438F
436D: 86 D1          LDA         #$D1		; cursor mode = normal 
436F: D6 AA          LDB         $AA		; get sequencer mode

------------------------------------------------
--- print sequencer mode into track screen -----
------------------------------------------------
4371: C1 02          CMPB        #$02		; if $aa=2,2 set blink cursor
4373: 27 04          BEQ         $4379
4375: C1 03          CMPB        #$03		: else set normal cursor
4377: 26 02          BNE         $437B
4379: 86 D0          LDA         #$D0		; cursor mode = blink
437B: C6 A8          LDB         #$A8		; cursor pos = $28
437D: BD 99 7D       JSR         $997D		; set cursor mode & pos.
4380: 96 AA          LDA         $AA		; sequencer mode
4382: C6 04          LDB         #$04		; length of text
4384: 8E 77 63       LDX         #$7763		; STOP/PLAY/ODUB/REC 
4387: BD B9 71       JSR         $B971
438A: 86 D1          LDA         #$D1		; set normal cursor
438C: BD 99 81       JSR         $9981
438F: 39             RTS  

------------------------------------------------
4390: 8E 00 00       LDX         #$0000
4393: 10 83 27 10    CMPD        #$2710
4397: 25 07          BCS         $43A0
4399: 83 27 10       SUBD        #$2710
439C: 30 01          LEAX        +$01,X
439E: 20 F3          BRA         $4393
------------------------------------------------
43A0: 34 06          PSHS        B,A
43A2: 1F 10          TFR         X,D
43A4: 1F 98          TFR         B,A
43A6: 8B 30          ADDA        #$30
43A8: BD 99 81       JSR         $9981
43AB: 35 06          PULS        B,A
43AD: 8E 00 00       LDX         #$0000
43B0: 10 83 03 E8    CMPD        #$03E8
43B4: 25 07          BCS         $43BD
43B6: 83 03 E8       SUBD        #$03E8
43B9: 30 01          LEAX        +$01,X
43BB: 20 F3          BRA         $43B0
------------------------------------------------
43BD: 34 06          PSHS        B,A
43BF: 1F 10          TFR         X,D
43C1: 1F 98          TFR         B,A
43C3: 8B 30          ADDA        #$30
43C5: BD 99 81       JSR         $9981
43C8: 35 06          PULS        B,A

------------------------------------------------
--- integer division: x=int(d/100), print X ----
------------------------------------------------
43CA: 8E 00 00       LDX         #$0000		; x = int(d/100)
43CD: 10 83 00 64    CMPD        #$0064		 
43D1: 25 07          BCS         $43DA		  
43D3: 83 00 64       SUBD        #$0064		 
43D6: 30 01          LEAX        +$01,X		 
43D8: 20 F3          BRA         $43CD
------------------------------------------------
43DA: 34 04          PSHS        B
43DC: 1F 10          TFR         X,D		; print result
43DE: 1F 98          TFR         B,A		;
43E0: 8B 30          ADDA        #$30		; 
43E2: BD 99 81       JSR         $9981		;
43E5: 35 04          PULS        B		; print "0"
43E7: 1F 98          TFR         B,A		;
43E9: 7E BB AB       JMP         $BBAB          ;

------------------------------------------------
43EC: CE 77 54       LDU         #$7754		; print "LOCATING..."
43EF: BD 99 56       JSR         $9956		;
43F2: 20 0A          BRA         $43FE
------------------------------------------------
43F4: 86 0B          LDA         #$0B
43F6: 97 AA          STA         $AA
43F8: CE 77 A0       LDU         #$77A0		; SAVING NEW TRACK DATA
43FB: BD A7 1E       JSR         $A71E
43FE: C6 01          LDB         #$01
4400: 7E BC 05       JMP         $BC05
------------------------------------------------
4403: BD 9A 54       JSR         $9A54
4406: BD C5 2B       JSR         $C52B
4409: 10 9E D3       LDY         $D3		; y <- $
440C: 31 3F          LEAY        -$01,Y		; y <- [$d3]--  
440E: 34 20          PSHS        Y		; y -> [s]
4410: 31 1F          LEAY        -$01,X		; y <- [$d3]-- 
4412: 10 AC E4       CMPY        ,S		; y = s?
4415: 23 15          BLS         $442C
4417: 9F D3          STX         $D3
4419: FC 01 25       LDD         $0125
441C: 10 B3 01 21    CMPD        $0121
4420: 23 08          BLS         $442A
4422: DC D3          LDD         $D3
4424: 83 00 01       SUBD        #$0001
4427: FD 01 25       STD         $0125
442A: 20 13          BRA         $443F
------------------------------------------------
442C: 10 AC E4       CMPY        ,S		; y = s?
442F: 24 0E          BCC         $443F
4431: 34 10          PSHS        X
4433: BD C4 A4       JSR         $C4A4
4436: 35 10          PULS        X
4438: 9F D3          STX         $D3
443A: 30 1F          LEAX        -$01,X
443C: BF 01 25       STX         $0125
443F: 32 62          LEAS        +$02,S
4441: BD E2 85       JSR         $E285
4444: 4F             CLRA 
4445: C6 FF          LDB         #$FF
4447: CE FF FF       LDU         #$FFFF
444A: 8E 00 00       LDX         #$0000
444D: B7 0B E6       STA         $0BE6
4450: B7 02 A6       STA         $02A6
4453: B7 02 D0       STA         $02D0
4456: FF 01 17       STU         $0117
4459: FF 01 19       STU         $0119
445C: FF 01 1B       STU         $011B
445F: FF 01 1D       STU         $011D
4462: B7 01 01       STA         $0101
4465: B7 02 C3       STA         $02C3
4468: B7 02 C4       STA         $02C4
446B: 96 EF          LDA         $EF
446D: 84 3B          ANDA        #$3B
446F: 97 EF          STA         $EF
4471: 86 00          LDA         #$00
4473: 97 EE          STA         $EE
4475: 7D 02 95       TST         $0295
4478: 26 03          BNE         $447D
447A: BD C6 CA       JSR         $C6CA
447D: 7F 02 C6       CLR         $02C6
4480: 0F FE          CLR         $FE
4482: 7F 02 BF       CLR         $02BF
4485: 7D 02 AE       TST         $02AE
4488: 26 07          BNE         $4491
448A: 4F             CLRA 
448B: 8E 01 C7       LDX         #$01C7
448E: BD E5 69       JSR         $E569
4491: 96 F5          LDA         $F5
4493: 84 7F          ANDA        #$7F
4495: 26 0A          BNE         $44A1
4497: 8E 02 03       LDX         #$0203
449A: 6D 86          TST         A,X
449C: 2A 03          BPL         $44A1
449E: BD D5 19       JSR         $D519
44A1: 0F CD          CLR         $CD
44A3: 39             RTS  
------------------------------------------------
44A4: 86 64          LDA         #$64		
44A6: 97 EC          STA         $EC
44A8: 86 0A          LDA         #$0A
44AA: 97 F7          STA         $F7
44AC: 86 01          LDA         #$01
44AE: 97 E8          STA         $E8
44B0: 86 18          LDA         #$18
44B2: 97 FC          STA         $FC
44B4: 8E 02 D4       LDX         #$02D4		; track table, $02d6: $ff $c0 $00
44B7: BD D3 A9       JSR         $D3A9		; $02e0: $7e
44BA: 6F 02          CLR         +$02,X		; $02d6: $00 $c0 $00
44BC: CC 10 4A       LDD         #$104A		; $02d4: $104a
44BF: ED 84          STD         ,X
44C1: 4F             CLRA 
44C2: C6 FF          LDB         #$FF
44C4: CE FF FF       LDU         #$FFFF
44C7: 8E 00 00       LDX         #$0000
44CA: 97 ED          STA         $ED
44CC: 97 E6          STA         $E6
44CE: 97 E7          STA         $E7
44D0: B7 02 D1       STA         $02D1
44D3: 20 09          BRA         $44DE
------------------------------------------------
44D5: 4F             CLRA 			; D = #$00ff
44D6: C6 FF          LDB         #$FF
44D8: CE FF FF       LDU         #$FFFF		; U = #$ffff
44DB: 8E 00 00       LDX         #$0000		
44DE: F7 01 00       STB         $0100		; #$ff -> $0100
44E1: B7 02 AE       STA         $02AE		; #$00 -> $02ae
44E4: BF 01 11       STX         $0111		; #$0000 -> $0111
44E7: BF 02 A7       STX         $02A7		; #$0000 -> $0111
44EA: FF 02 95       STU         $0295		; #$ffff -> $0295
44ED: 0F F2          CLR         $F2		; #$00 -> $f2
44EF: D7 F8          STB         $F8		; #$ff -> $f8
44F1: 8E 01 C7       LDX         #$01C7		; for i=$01c7 to $0202 (60)
44F4: 86 3C          LDA         #$3C		;   [i] = $ff
44F6: 81 00          CMPA        #$00		
44F8: 27 05          BEQ         $44FF	
44FA: 4A             DECA 
44FB: E7 86          STB         A,X
44FD: 20 F7          BRA         $44F6
------------------------------------------------
44FF: 8E 02 03       LDX         #$0203		; for i=$0203 to $0216 (20)
4502: 86 14          LDA         #$14		;  [i] = $ff
4504: 81 00          CMPA        #$00
4506: 27 05          BEQ         $450D
4508: 4A             DECA 
4509: E7 86          STB         A,X
450B: 20 F7          BRA         $4504
------------------------------------------------
450D: CC 00 00       LDD         #$0000		
4510: FD 01 21       STD         $0121		; #$0000 -> $0121
4513: FF 01 25       STU         $0125		; #$ffff -> $0125
4516: FF 01 23       STU         $0123		; #$ffff -> $0123
4519: 0F F6          CLR         $F6		; #$00 -> $f6
451B: 86 80          LDA         #$80
451D: 97 F5          STA         $F5		; #$80 -> $f5
451F: 8E 00 01       LDX         #$0001
4522: 9F D3          STX         $D3		; #$0001 -> $d3
4524: BD A6 69       JSR         $A669		; ROMLOW $0000
4527: BD A4 5A       JSR         $A45A		; copy stuff to buffer $0217
452A: 39             RTS  
------------------------------------------------
452B: 8E 00 00       LDX         #$0000
452E: 39             RTS  
------------------------------------------------
452F: 6D 26          TST         +$06,Y
4531: 26 26          BNE         $4559
4533: EC 24          LDD         +$04,Y
4535: BD 84 9F       JSR         $849F
4538: 81 3C          CMPA        #$3C
453A: 25 03          BCS         $453F
453C: 7E D4 EF       JMP         $D4EF
------------------------------------------------
453F: 8E 01 C7       LDX         #$01C7
4542: 6D 86          TST         A,X
4544: 2A 10          BPL         $4556
4546: BD D0 09       JSR         $D009
4549: D7 F7          STB         $F7
454B: BD E5 69       JSR         $E569
454E: C6 FF          LDB         #$FF
4550: F7 01 00       STB         $0100
4553: 7F 01 01       CLR         $0101
4556: 7E D0 37       JMP         $D037
------------------------------------------------
4559: A6 24          LDA         +$04,Y
455B: BD 84 9F       JSR         $849F
455E: 4D             TSTA 
455F: 2A 08          BPL         $4569
4561: BD C4 D5       JSR         $C4D5
4564: BD C4 03       JSR         $C403
4567: 20 0E          BRA         $4577
------------------------------------------------
4569: 81 3C          CMPA        #$3C
456B: 25 05          BCS         $4572
456D: BD E6 47       JSR         $E647
4570: 20 05          BRA         $4577
------------------------------------------------
4572: 0F CD          CLR         $CD
4574: BD E5 FB       JSR         $E5FB
4577: CE AE 17       LDU         #$AE17
457A: 7E D9 E9       JMP         $D9E9
------------------------------------------------
457D: BD 84 9F       JSR         $849F
4580: 8E 01 C7       LDX         #$01C7
4583: 96 F2          LDA         $F2
4585: 6D 86          TST         A,X
4587: 2A 03          BPL         $458C
4589: 7E C9 BD       JMP         $C9BD
------------------------------------------------
458C: 7D 02 D2       TST         $02D2
458F: 26 F8          BNE         $4589
4591: D6 E5          LDB         $E5
4593: C4 7F          ANDB        #$7F
4595: C1 01          CMPB        #$01
4597: 26 04          BNE         $459D
4599: 73 02 D2       COM         $02D2
459C: 39             RTS  
------------------------------------------------
459D: FE 02 AC       LDU         $02AC
45A0: 27 48          BEQ         $45EA
45A2: C6 02          LDB         #$02
45A4: D7 EE          STB         $EE
45A6: 6D 86          TST         A,X
45A8: 27 1A          BEQ         $45C4
45AA: 7F 02 C5       CLR         $02C5
45AD: 7F 02 A6       CLR         $02A6
45B0: 73 02 C3       COM         $02C3
45B3: FC 01 21       LDD         $0121
45B6: FD 01 1F       STD         $011F
45B9: BD CD 9E       JSR         $CD9E
45BC: BD 8B 31       JSR         $8B31
45BF: BD DB 6F       JSR         $DB6F
45C2: 20 21          BRA         $45E5
------------------------------------------------
45C4: 7D 01 02       TST         $0102
45C7: 2A 13          BPL         $45DC
45C9: DC F0          LDD         $F0
45CB: F3 02 C7       ADDD        $02C7
45CE: FD 02 8F       STD         $028F
45D1: BD C9 D2       JSR         $C9D2
45D4: BD 8B 31       JSR         $8B31
45D7: BD DB 6F       JSR         $DB6F
45DA: 20 06          BRA         $45E2
------------------------------------------------
45DC: BD 8B 39       JSR         $8B39
45DF: BD 9A 6F       JSR         $9A6F
45E2: BD C7 7D       JSR         $C77D
45E5: BD C8 59       JSR         $C859
45E8: 20 06          BRA         $45F0
------------------------------------------------
45EA: CE AA DF       LDU         #$AADF
45ED: BD D9 E9       JSR         $D9E9
45F0: 39             RTS  
------------------------------------------------
45F1: 34 20          PSHS        Y
45F3: FC 02 AC       LDD         $02AC
45F6: 10 27 00 50    LBEQ        $464A
45FA: 96 EE          LDA         $EE
45FC: 81 05          CMPA        #$05
45FE: 26 05          BNE         $4605
4600: 7D 02 C3       TST         $02C3
4603: 2B 4B          BMI         $4650
4605: FC 01 21       LDD         $0121
4608: FD 01 1F       STD         $011F
460B: 6D 24          TST         +$04,Y
460D: 26 11          BNE         $4620
460F: 96 EF          LDA         $EF
4611: 8A 04          ORA         #$04
4613: 97 EF          STA         $EF
4615: BD DC 88       JSR         $DC88
4618: CE C1 ED       LDU         #$C1ED
461B: BD D9 E9       JSR         $D9E9
461E: 20 25          BRA         $4645
------------------------------------------------
4620: 6D 26          TST         +$06,Y
4622: 27 09          BEQ         $462D
4624: BD DC 88       JSR         $DC88
4627: CE AA 83       LDU         #$AA83
462A: BD D9 E9       JSR         $D9E9
462D: 96 EF          LDA         $EF
462F: 84 FB          ANDA        #$FB
4631: 97 EF          STA         $EF
4633: C6 02          LDB         #$02
4635: 96 EE          LDA         $EE
4637: 81 05          CMPA        #$05
4639: 27 04          BEQ         $463F
463B: D7 EE          STB         $EE
463D: 20 03          BRA         $4642
------------------------------------------------
463F: F7 02 C1       STB         $02C1
4642: BD C7 7D       JSR         $C77D
4645: BD C8 59       JSR         $C859
4648: 20 06          BRA         $4650
------------------------------------------------
464A: CE AA DF       LDU         #$AADF
464D: BD D9 E9       JSR         $D9E9
4650: 35 20          PULS        Y
4652: BD 84 9F       JSR         $849F
4655: 39             RTS  
------------------------------------------------
4656: BD 84 9F       JSR         $849F
4659: 7D 02 95       TST         $0295
465C: 2A 01          BPL         $465F
465E: 39             RTS  
------------------------------------------------
465F: 86 04          LDA         #$04
4661: 97 EE          STA         $EE
4663: FE 01 06       LDU         $0106
4666: B6 01 0B       LDA         $010B
4669: 81 06          CMPA        #$06
466B: 26 02          BNE         $466F
466D: 33 41          LEAU        +$01,U
466F: FF 01 15       STU         $0115
4672: 96 EF          LDA         $EF
4674: 8A 40          ORA         #$40
4676: 97 EF          STA         $EF
4678: 7F 02 BF       CLR         $02BF
467B: BD E3 DB       JSR         $E3DB
467E: CC FF FF       LDD         #$FFFF
4681: FD 01 04       STD         $0104
4684: 39             RTS  
------------------------------------------------
4685: 34 20          PSHS        Y
4687: 86 00          LDA         #$00
4689: 5F             CLRB 
468A: BD C9 A4       JSR         $C9A4
468D: 35 20          PULS        Y
468F: 86 00          LDA         #$00
4691: 97 EE          STA         $EE
4693: E6 24          LDB         +$04,Y
4695: BD 84 9F       JSR         $849F
4698: 5D             TSTB 
4699: 10 27 00 2D    LBEQ        $46CA
469D: 7D 02 95       TST         $0295
46A0: 2A 03          BPL         $46A5
46A2: 7E C7 3B       JMP         $C73B
------------------------------------------------
46A5: FC 01 25       LDD         $0125
46A8: B3 01 1F       SUBD        $011F
46AB: 10 27 00 18    LBEQ        $46C7
46AF: BD 86 02       JSR         $8602
46B2: 34 06          PSHS        B,A
46B4: CC 7D 63       LDD         #$7D63		; jump to ROMLOW $4d63
46B7: 34 06          PSHS        B,A		;
46B9: CC 0E 08       LDD         #$0E08		;
46BC: BD 85 B4       JSR         $85B4		;
46BF: BD E2 1C       JSR         $E21C
46C2: 7E C7 59       JMP         $C759
------------------------------------------------
46C5: 20 02          BRA         $46C9
------------------------------------------------
46C7: 11 3F          SWI3 
------------------------------------------------
46C9: 39             RTS  
------------------------------------------------
46CA: 7D 02 95       TST         $0295
46CD: 2B 1D          BMI         $46EC
46CF: 10 8E 02 95    LDY         #$0295
46D3: A6 24          LDA         +$04,Y
46D5: 34 02          PSHS        A
46D7: EC 26          LDD         +$06,Y		; get SEQRAM address
46D9: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
46DC: 32 61          LEAS        +$01,S		; get next byte
46DE: CC FF FF       LDD         #$FFFF
46E1: FD 02 91       STD         $0291
46E4: FD 02 95       STD         $0295
46E7: 7F 02 BF       CLR         $02BF
46EA: 20 06          BRA         $46F2
------------------------------------------------
46EC: CC 00 00       LDD         #$0000
46EF: FD 02 A7       STD         $02A7
46F2: 7F 02 C3       CLR         $02C3
46F5: 86 00          LDA         #$00
46F7: 97 EE          STA         $EE
46F9: FC 01 21       LDD         $0121
46FC: FD 01 1F       STD         $011F
46FF: BD E2 B3       JSR         $E2B3
4702: BD CD 9E       JSR         $CD9E
4705: CC FF FF       LDD         #$FFFF
4708: FD 01 02       STD         $0102
470B: 39             RTS  
------------------------------------------------
470C: E6 26          LDB         +$06,Y
470E: BD 84 9F       JSR         $849F
4711: 7D 02 95       TST         $0295
4714: 2B 03          BMI         $4719
4716: 7E C7 72       JMP         $C772
------------------------------------------------
4719: 34 04          PSHS        B
471B: BD C7 28       JSR         $C728
471E: BD E3 DB       JSR         $E3DB
4721: 35 04          PULS        B
4723: 86 03          LDA         #$03
4725: 7E C9 A0       JMP         $C9A0
------------------------------------------------
4728: 34 04          PSHS        B
472A: 96 EF          LDA         $EF
472C: 1F 89          TFR         A,B
472E: 84 DF          ANDA        #$DF
4730: 97 EF          STA         $EF
4732: C4 20          ANDB        #$20
4734: 27 03          BEQ         $4739
4736: BD DE 9C       JSR         $DE9C
4739: 35 84          PULS        PC,B
------------------------------------------------
473B: BD 86 02       JSR         $8602
473E: 34 06          PSHS        B,A
4740: CC 7E 64       LDD         #$7E64		; jump to ROMLOW $4e64
4743: 34 06          PSHS        B,A		;
4745: CC 0E 08       LDD         #$0E08		;
4748: BD 85 B4       JSR         $85B4		;
474B: BD E2 1C       JSR         $E21C
474E: 7F 02 C3       CLR         $02C3
4751: DC F0          LDD         $F0
4753: F3 02 C7       ADDD        $02C7
4756: FD 02 8F       STD         $028F
4759: BD 86 93       JSR         $8693
475C: 20 0A          BRA         $4768
------------------------------------------------
475E: E6 24          LDB         +$04,Y
4760: BD 84 9F       JSR         $849F
4763: 5D             TSTB 
4764: 10 27 00 09    LBEQ        $4771
4768: CE AA 6B       LDU         #$AA6B
476B: BD D9 E9       JSR         $D9E9
476E: BD E9 8E       JSR         $E98E
4771: 39             RTS  
------------------------------------------------
4772: BD C7 28       JSR         $C728
4775: 86 03          LDA         #$03
4777: BD C9 A0       JSR         $C9A0
477A: 16 FE E6       LBRA        $4663
477D: BD C7 D4       JSR         $C7D4
4780: 8E 01 17       LDX         #$0117
4783: 10 AE 84       LDY         ,X
4786: 10 8C 80 00    CMPY        #$8000
478A: 24 3C          BCC         $47C8
478C: E6 24          LDB         +$04,Y
478E: D1 F6          CMPB        $F6
4790: 26 2F          BNE         $47C1
4792: EE A4          LDU         ,Y
4794: EF 84          STU         ,X
4796: 2A 03          BPL         $479B
4798: BF 01 19       STX         $0119
479B: 34 50          PSHS        U,X
479D: A6 24          LDA         +$04,Y
479F: C6 FF          LDB         #$FF
47A1: ED 22          STD         +$02,Y
47A3: A6 26          LDA         +$06,Y
47A5: 80 15          SUBA        #$15
47A7: A7 24          STA         +$04,Y
47A9: BD E5 10       JSR         $E510
47AC: 96 F6          LDA         $F6
47AE: BD CE 01       JSR         $CE01
47B1: EC 26          LDD         +$06,Y
47B3: 34 06          PSHS        B,A
47B5: BD CD F4       JSR         $CDF4
47B8: 35 06          PULS        B,A
47BA: BD 8B 77       JSR         $8B77
47BD: 35 30          PULS        Y,X
47BF: 20 05          BRA         $47C6
------------------------------------------------
47C1: 30 A4          LEAX        ,Y
47C3: 10 AE A4       LDY         ,Y
47C6: 20 BE          BRA         $4786
------------------------------------------------
47C8: BD E4 DD       JSR         $E4DD
47CB: 86 FF          LDA         #$FF
47CD: B7 02 BF       STA         $02BF
47D0: 7F 02 A6       CLR         $02A6
47D3: 39             RTS  
------------------------------------------------
47D4: CC 00 00       LDD         #$0000
47D7: FD 02 95       STD         $0295
47DA: 10 8E 02 95    LDY         #$0295
47DE: CE 02 AF       LDU         #$02AF
47E1: EC 4C          LDD         +$0C,U
47E3: B3 01 02       SUBD        $0102
47E6: ED 22          STD         +$02,Y
47E8: 26 1B          BNE         $4805
47EA: 10 BE 02 CC    LDY         $02CC
47EE: CE C8 49       LDU         #$C849
47F1: 34 06          PSHS        B,A
47F3: CC 72 6F       LDD         #$726F		; jump to ROMLOW $726f
47F6: 34 06          PSHS        B,A		;
47F8: CC 0E 08       LDD         #$0E08		;
47FB: BD 85 B4       JSR         $85B4		;
47FE: 10 8E 02 95    LDY         #$0295
4802: CE 02 AF       LDU         #$02AF
4805: A6 45          LDA         +$05,U
4807: A7 24          STA         +$04,Y
4809: A6 4E          LDA         +$0E,U
480B: A7 25          STA         +$05,Y
480D: 86 F2          LDA         #$F2
480F: 34 02          PSHS        A
4811: EC 42          LDD         +$02,U
4813: E0 4E          SUBB        +$0E,U
4815: 82 00          SBCA        #$00
4817: ED 26          STD         +$06,Y		; SEQRAM address
4819: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
481C: 32 61          LEAS        +$01,S		; get next byte
481E: FC 01 06       LDD         $0106
4821: FD 01 13       STD         $0113
4824: 10 BF 02 93    STY         $0293
4828: DC F0          LDD         $F0
482A: F3 02 C7       ADDD        $02C7
482D: 10 A3 26       CMPD        +$06,Y
4830: 26 06          BNE         $4838
4832: EC 22          LDD         +$02,Y
4834: 26 02          BNE         $4838
4836: 6C 23          INC         +$03,Y
4838: FC 01 21       LDD         $0121
483B: FD 01 1F       STD         $011F
483E: CC 00 00       LDD         #$0000
4841: FD 01 04       STD         $0104
4844: 39             RTS  
------------------------------------------------
4845: 73 02 BE       COM         $02BE
4848: 39             RTS  
------------------------------------------------
4849: C8 45          EORB        #$45
484B: C8 45          EORB        #$45
484D: C8 45          EORB        #$45
484F: C8 45          EORB        #$45
4851: C8 45          EORB        #$45
4853: C8 45          EORB        #$45
4855: CA B3          ORB         #$B3
4857: CA B3          ORB         #$B3
4859: 96 F6          LDA         $F6
485B: BD CE 01       JSR         $CE01
485E: 6F 05          CLR         +$05,X
4860: 39             RTS  
------------------------------------------------
4861: 8D 73          BSR         $48D6
4863: 0D E5          TST         $E5
4865: 2B 0D          BMI         $4874
4867: 34 20          PSHS        Y
4869: BD 9A 54       JSR         $9A54
486C: BD CA 2E       JSR         $CA2E
486F: BD CA 99       JSR         $CA99
4872: 35 20          PULS        Y
4874: B6 01 00       LDA         $0100
4877: 2B 03          BMI         $487C
4879: 7E D4 AA       JMP         $D4AA
------------------------------------------------
487C: 8E 01 C7       LDX         #$01C7
487F: 96 F2          LDA         $F2
4881: 6D 86          TST         A,X
4883: 26 09          BNE         $488E
4885: 86 01          LDA         #$01
4887: 20 1C          BRA         $48A5
------------------------------------------------
4889: 7D 02 95       TST         $0295
488C: 2A 04          BPL         $4892
488E: BD 84 9F       JSR         $849F
4891: 39             RTS  
------------------------------------------------
4892: 86 04          LDA         #$04
4894: D6 EF          LDB         $EF
4896: 6D 24          TST         +$04,Y
4898: 26 04          BNE         $489E
489A: C4 BF          ANDB        #$BF
489C: 20 02          BRA         $48A0
------------------------------------------------
489E: CA 40          ORB         #$40
48A0: 7F 02 BF       CLR         $02BF
48A3: D7 EF          STB         $EF
48A5: 97 EE          STA         $EE
48A7: A6 26          LDA         +$06,Y
48A9: BD 84 9F       JSR         $849F
48AC: 4D             TSTA 
48AD: 26 05          BNE         $48B4
48AF: BD 8B 31       JSR         $8B31
48B2: 20 09          BRA         $48BD
------------------------------------------------
48B4: BD DC 88       JSR         $DC88
48B7: CE AA 8F       LDU         #$AA8F
48BA: BD D9 E9       JSR         $D9E9
48BD: BD CD 9E       JSR         $CD9E
48C0: DC F0          LDD         $F0
48C2: F3 02 C7       ADDD        $02C7
48C5: FD 02 8F       STD         $028F
48C8: BD C9 D2       JSR         $C9D2
48CB: FC 01 04       LDD         $0104
48CE: 26 03          BNE         $48D3
48D0: BD C9 FF       JSR         $C9FF
48D3: 7E DB 6F       JMP         $DB6F
------------------------------------------------
48D6: 7D 02 D2       TST         $02D2
48D9: 27 15          BEQ         $48F0
48DB: A6 26          LDA         +$06,Y
48DD: BD 84 9F       JSR         $849F
48E0: 35 20          PULS        Y
48E2: 4D             TSTA 
48E3: 27 0B          BEQ         $48F0
48E5: 7F 02 D2       CLR         $02D2
48E8: 96 F2          LDA         $F2
48EA: 8E 01 C7       LDX         #$01C7
48ED: 7E C5 9D       JMP         $C59D
------------------------------------------------
48F0: 39             RTS  
------------------------------------------------
48F1: BD 84 9F       JSR         $849F
48F4: 7E C9 BD       JMP         $C9BD
------------------------------------------------
48F7: 8D DD          BSR         $48D6
48F9: 7D 01 00       TST         $0100
48FC: 2B 03          BMI         $4901
48FE: BD D0 09       JSR         $D009
4901: 8E 01 C7       LDX         #$01C7
4904: 96 F2          LDA         $F2
4906: 6D 86          TST         A,X
4908: 27 17          BEQ         $4921
490A: 7D 01 00       TST         $0100
490D: 2B 09          BMI         $4918
490F: 34 20          PSHS        Y
4911: BD D5 95       JSR         $D595
4914: 35 20          PULS        Y
4916: 20 02          BRA         $491A
------------------------------------------------
4918: C6 FF          LDB         #$FF
491A: 5D             TSTB 
491B: 2A 04          BPL         $4921
491D: BD 84 9F       JSR         $849F
4920: 39             RTS  
------------------------------------------------
4921: 86 01          LDA         #$01
4923: 5F             CLRB 
4924: 20 2A          BRA         $4950
------------------------------------------------
4926: 7D 02 95       TST         $0295
4929: 10 2B FF 61    LBMI        $488E
492D: 86 04          LDA         #$04
492F: D6 EF          LDB         $EF
4931: 6D 24          TST         +$04,Y
4933: 26 07          BNE         $493C
4935: C4 BF          ANDB        #$BF
4937: 7F 02 BF       CLR         $02BF
493A: 20 10          BRA         $494C
------------------------------------------------
493C: CA 40          ORB         #$40
493E: 7D 01 04       TST         $0104
4941: 2B 09          BMI         $494C
4943: 34 02          PSHS        A
4945: 86 FF          LDA         #$FF
4947: B7 02 BF       STA         $02BF
494A: 35 02          PULS        A
494C: D7 EF          STB         $EF
494E: C6 FF          LDB         #$FF
4950: 97 EE          STA         $EE
4952: A6 26          LDA         +$06,Y
4954: BD 84 9F       JSR         $849F
4957: 4D             TSTA 
4958: 26 05          BNE         $495F
495A: BD 8B 39       JSR         $8B39
495D: 20 09          BRA         $4968
------------------------------------------------
495F: BD DC 88       JSR         $DC88
4962: CE AA 8F       LDU         #$AA8F
4965: BD D9 E9       JSR         $D9E9
4968: FC 01 02       LDD         $0102
496B: 2A 22          BPL         $498F
496D: DC F0          LDD         $F0
496F: F3 02 C7       ADDD        $02C7
4972: FD 02 8F       STD         $028F
4975: BD C9 D2       JSR         $C9D2
4978: FC 01 04       LDD         $0104
497B: 26 03          BNE         $4980
497D: BD C9 FF       JSR         $C9FF
4980: 7D 01 00       TST         $0100
4983: 2A 05          BPL         $498A
4985: BD DB 6F       JSR         $DB6F
4988: 20 03          BRA         $498D
------------------------------------------------
498A: BD 9A 6F       JSR         $9A6F
498D: 20 03          BRA         $4992
------------------------------------------------
498F: BD 9A 6F       JSR         $9A6F
4992: 39             RTS  
------------------------------------------------
4993: E6 26          LDB         +$06,Y
4995: BD 84 9F       JSR         $849F
4998: 96 EF          LDA         $EF
499A: 84 FB          ANDA        #$FB
499C: 97 EF          STA         $EF
499E: 86 00          LDA         #$00
49A0: 8D 02          BSR         $49A4
49A2: 20 19          BRA         $49BD
------------------------------------------------
49A4: 97 EE          STA         $EE
49A6: 34 04          PSHS        B
49A8: BD 9A 54       JSR         $9A54
49AB: BD CA 2E       JSR         $CA2E
49AE: BD CA 99       JSR         $CA99
49B1: 86 FF          LDA         #$FF
49B3: 97 F8          STA         $F8
49B5: E6 E0          LDB         ,S+
49B7: 26 03          BNE         $49BC
49B9: BD 8B 35       JSR         $8B35
49BC: 39             RTS  
------------------------------------------------
49BD: 7F 02 D2       CLR         $02D2
49C0: BD DC 88       JSR         $DC88
49C3: CE AA B0       LDU         #$AAB0
49C6: 7E D9 E9       JMP         $D9E9
------------------------------------------------
49C9: E6 26          LDB         +$06,Y
49CB: BD 84 9F       JSR         $849F
49CE: 86 03          LDA         #$03
49D0: 20 CE          BRA         $49A0
------------------------------------------------
49D2: 10 BE 02 8F    LDY         $028F
49D6: 10 BF 02 CC    STY         $02CC
49DA: CE C9 EF       LDU         #$C9EF
49DD: 34 06          PSHS        B,A
49DF: CC 72 6F       LDD         #$726F		; jump to ROMLOW $426f
49E2: 34 06          PSHS        B,A		;
49E4: CC 0E 08       LDD         #$0E08		;
49E7: BD 85 B4       JSR         $85B4		;
49EA: 10 BF 02 8F    STY         $028F
49EE: 39             RTS  
------------------------------------------------
49EF: CC DA CC       LDD         #$DACC
49F2: 69 CB          ROL         D,U
49F4: 
49F6: BE CA 28       LDX         $CA28
49F9: CA B3          ORB         #$B3
49FB: CB 0F          ADDB        #$0F
49FD: CA CE          ORB         #$CE
49FF: 10 BE 02 91    LDY         $0291
4A03: CE CA 18       LDU         #$CA18
4A06: 34 06          PSHS        B,A
4A08: CC 72 6F       LDD         #$726F		; jump to ROMLOW $426f
4A0B: 34 06          PSHS        B,A		;
4A0D: CC 0E 08       LDD         #$0E08		;
4A10: BD 85 B4       JSR         $85B4		;
4A13: 10 BF 02 91    STY         $0291
4A17: 39             RTS  
------------------------------------------------
4A18: CC D0 CC       LDD         #$D0CC
4A1B: 64 CB          LSR         D,U
4A1D: DF CA          STU         $CA
4A1F: B7 CA B4       STA         $CAB4
4A22: CA B3          ORB         #$B3
4A24: CB C8          ADDB        #$C8
4A26: CA B4          ORB         #$B4
4A28: BD CA 2E       JSR         $CA2E
4A2B: 7E CA 99       JMP         $CA99
------------------------------------------------
4A2E: 86 07          LDA         #$07
4A30: BD CA 37       JSR         $CA37
4A33: 4A             DECA 
4A34: 2A FA          BPL         $4A30
4A36: 39             RTS  
------------------------------------------------
4A37: 34 42          PSHS        U,A
4A39: 8E 01 17       LDX         #$0117
4A3C: 10 AE 84       LDY         ,X
4A3F: 10 8C 80 00    CMPY        #$8000
4A43: 24 32          BCC         $4A77
4A45: A6 24          LDA         +$04,Y
4A47: A1 E4          CMPA        ,S
4A49: 26 25          BNE         $4A70
4A4B: EE A4          LDU         ,Y
4A4D: EF 84          STU         ,X
4A4F: 2A 03          BPL         $4A54
4A51: BF 01 19       STX         $0119
4A54: 34 50          PSHS        U,X
4A56: BD CE 01       JSR         $CE01
4A59: AF 24          STX         +$04,Y
4A5B: CC 7A E1       LDD         #$7AE1
4A5E: ED 22          STD         +$02,Y
4A60: EE A4          LDU         ,Y
4A62: EC 26          LDD         +$06,Y
4A64: BD 84 AE       JSR         $84AE
4A67: 0B 5E	     fdb	 $0B5E
4A69: BD 8B 77       JSR         $8B77
4A6C: 35 30          PULS        Y,X
4A6E: 20 05          BRA         $4A75
------------------------------------------------
4A70: 30 A4          LEAX        ,Y
4A72: 10 AE A4       LDY         ,Y
4A75: 20 C8          BRA         $4A3F
------------------------------------------------
4A77: A6 E4          LDA         ,S
4A79: BD CE 01       JSR         $CE01
4A7C: 6D 07          TST         +$07,X
4A7E: 27 17          BEQ         $4A97
4A80: BD 84 68       JSR         $8468
4A83: 25 0C          BCS         $4A91
4A85: CC 7B 62       LDD         #$7B62		; ROMLOW $2b62
4A88: ED 22          STD         +$02,Y
4A8A: AF 24          STX         +$04,Y
4A8C: BD 84 AE       JSR         $84AE
4A8F: 0B 5E	     fdb	 $0B5E
4A91: 86 01          LDA         #$01
4A93: 5F             CLRB 
4A94: BD 8B B5       JSR         $8BB5
4A97: 35 C2          PULS        PC,U,A
------------------------------------------------
4A99: 8E 02 D4       LDX         #$02D4		; track table base
4A9C: 30 88 1B       LEAX        +$1B,X
4A9F: 6D 02          TST         +$02,X
4AA1: 2B 07          BMI         $4AAA
4AA3: 34 10          PSHS        X
4AA5: BD E4 89       JSR         $E489
4AA8: 35 10          PULS        X
4AAA: 30 88 1B       LEAX        +$1B,X
4AAD: 8C 03 C7       CMPX        #$03C7
4AB0: 26 ED          BNE         $4A9F
4AB2: 39             RTS  
------------------------------------------------
4AB3: 39             RTS  
------------------------------------------------
4AB4: 11 3F          SWI3 
------------------------------------------------
4AB6: 39             RTS  
------------------------------------------------
4AB7: EC 0C          LDD         +$0C,X
4AB9: FD 01 04       STD         $0104
4ABC: 20 05          BRA         $4AC3
------------------------------------------------
4ABE: EC 0C          LDD         +$0C,X
4AC0: FD 01 02       STD         $0102
4AC3: CE 02 AF       LDU         #$02AF
4AC6: EC 4C          LDD         +$0C,U
4AC8: 27 03          BEQ         $4ACD
4ACA: 73 02 BE       COM         $02BE
4ACD: 39             RTS  
------------------------------------------------
4ACE: 34 20          PSHS        Y
4AD0: 10 8E 02 95    LDY         #$0295
4AD4: FE 01 21       LDU         $0121
4AD7: FF 02 91       STU         $0291
4ADA: EE 22          LDU         +$02,Y
4ADC: 34 40          PSHS        U
4ADE: D6 EF          LDB         $EF
4AE0: C4 40          ANDB        #$40
4AE2: 34 04          PSHS        B
4AE4: 27 09          BEQ         $4AEF
4AE6: EC 61          LDD         +$01,S
4AE8: 26 05          BNE         $4AEF
4AEA: 86 FF          LDA         #$FF
4AEC: B7 02 BF       STA         $02BF
4AEF: A6 24          LDA         +$04,Y
4AF1: A7 05          STA         +$05,X
4AF3: 34 06          PSHS        B,A
4AF5: CC 72 A0       LDD         #$72A0		; jump to ROMLOW $42a0
4AF8: 34 06          PSHS        B,A		;
4AFA: CC 0E 08       LDD         #$0E08		;
4AFD: BD 85 B4       JSR         $85B4		;
4B00: 35 42          PULS        U,A
4B02: FF 01 04       STU         $0104
4B05: 4D             TSTA 
4B06: 27 05          BEQ         $4B0D
4B08: 86 FF          LDA         #$FF
4B0A: B7 02 BF       STA         $02BF
4B0D: 35 A0          PULS        PC,Y
------------------------------------------------
4B0F: BD CA 2E       JSR         $CA2E
4B12: BD CA 99       JSR         $CA99
4B15: 7D 01 04       TST         $0104
4B18: 2A 53          BPL         $4B6D
4B1A: B6 01 00       LDA         $0100
4B1D: 2A 27          BPL         $4B46
4B1F: 96 F8          LDA         $F8
4B21: 2A 0E          BPL         $4B31
4B23: D6 E8          LDB         $E8
4B25: 27 68          BEQ         $4B8F
4B27: DC F0          LDD         $F0
4B29: F3 02 C7       ADDD        $02C7
4B2C: FD 02 8F       STD         $028F
4B2F: 20 07          BRA         $4B38
------------------------------------------------
4B31: 03 F8          COM         $F8
4B33: 97 F2          STA         $F2
4B35: BD D3 BB       JSR         $D3BB
4B38: CC FF FF       LDD         #$FFFF
4B3B: FD 01 11       STD         $0111
4B3E: FC 02 8F       LDD         $028F
4B41: FD 02 CC       STD         $02CC
4B44: 20 1D          BRA         $4B63
------------------------------------------------
4B46: 4A             DECA 
4B47: 26 09          BNE         $4B52
4B49: 0F CD          CLR         $CD
4B4B: BD D5 95       JSR         $D595
4B4E: 2B 3F          BMI         $4B8F
4B50: 20 0B          BRA         $4B5D
------------------------------------------------
4B52: B7 01 00       STA         $0100
4B55: DC F0          LDD         $F0
4B57: F3 02 C7       ADDD        $02C7
4B5A: FD 02 8F       STD         $028F
4B5D: CC FF FF       LDD         #$FFFF
4B60: FD 01 11       STD         $0111
4B63: 8E 02 AF       LDX         #$02AF
4B66: FC 02 8F       LDD         $028F
4B69: ED 02          STD         +$02,X
4B6B: 20 1F          BRA         $4B8C
------------------------------------------------
4B6D: 96 EE          LDA         $EE
4B6F: 81 02          CMPA        #$02
4B71: 26 13          BNE         $4B86
4B73: 86 04          LDA         #$04
4B75: 97 EE          STA         $EE
4B77: BD C6 63       JSR         $C663
4B7A: BD DC 88       JSR         $DC88
4B7D: CE AA 8F       LDU         #$AA8F
4B80: BD D9 E9       JSR         $D9E9
4B83: 7E CB 0F       JMP         $CB0F
------------------------------------------------
4B86: 73 02 C4       COM         $02C4
4B89: 7E CB 23       JMP         $CB23
------------------------------------------------
4B8C: 7E CA C3       JMP         $CAC3
------------------------------------------------
4B8F: BD 8B 35       JSR         $8B35
4B92: 96 EE          LDA         $EE
4B94: BD CB BD       JSR         $CBBD
4B97: C6 FF          LDB         #$FF
4B99: BD C9 A0       JSR         $C9A0
4B9C: 96 EF          LDA         $EF
4B9E: 84 FB          ANDA        #$FB
4BA0: 97 EF          STA         $EF
4BA2: DC F0          LDD         $F0
4BA4: F3 02 C7       ADDD        $02C7
4BA7: FD 02 8F       STD         $028F
4BAA: CE 02 AF       LDU         #$02AF
4BAD: ED 42          STD         +$02,U
4BAF: CC FF FF       LDD         #$FFFF
4BB2: FD 01 02       STD         $0102
4BB5: FD 01 11       STD         $0111
4BB8: ED 4C          STD         +$0C,U
4BBA: 7E CA C3       JMP         $CAC3
------------------------------------------------
4BBD: 81 04          CMPA        #$04
4BBF: 26 04          BNE         $4BC5
4BC1: 86 03          LDA         #$03
4BC3: 20 02          BRA         $4BC7
------------------------------------------------
4BC5: 86 00          LDA         #$00
4BC7: 39             RTS  
------------------------------------------------
4BC8: CC FF FF       LDD         #$FFFF
4BCB: FD 01 04       STD         $0104
4BCE: 7F 02 BF       CLR         $02BF
4BD1: 7D 01 02       TST         $0102
4BD4: 2A 03          BPL         $4BD9
4BD6: BD CB 0F       JSR         $CB0F
4BD9: 86 FF          LDA         #$FF
4BDB: B7 02 BE       STA         $02BE
4BDE: 39             RTS  
------------------------------------------------
4BDF: BD CD 66       JSR         $CD66
4BE2: 20 0C          BRA         $4BF0
------------------------------------------------
4BE4: 0D FE          TST         $FE
4BE6: 27 05          BEQ         $4BED
4BE8: 35 06          PULS        B,A
4BEA: 16 FE D6       LBRA        $4AC3
4BED: BD CD 55       JSR         $CD55
4BF0: CE 02 AF       LDU         #$02AF
4BF3: A6 44          LDA         +$04,U
4BF5: BD CE 01       JSR         $CE01
4BF8: E6 49          LDB         +$09,U
4BFA: C1 01          CMPB        #$01
4BFC: 26 19          BNE         $4C17
4BFE: E6 4A          LDB         +$0A,U
4C00: C4 40          ANDB        #$40
4C02: 26 0F          BNE         $4C13
4C04: BD 84 79       JSR         $8479
4C07: CC 7B 62       LDD         #$7B62
4C0A: ED 22          STD         +$02,Y
4C0C: AF 24          STX         +$04,Y
4C0E: BD 84 AE       JSR         $84AE
4C11: 0B 5E	     fdb	 $0B5E
4C13: E6 49          LDB         +$09,U
4C15: 20 2F          BRA         $4C46
------------------------------------------------
4C17: C1 03          CMPB        #$03
4C19: 26 0E          BNE         $4C29
4C1B: 0D DB          TST         $DB
4C1D: 27 08          BEQ         $4C27
4C1F: E6 4A          LDB         +$0A,U
4C21: E7 0C          STB         +$0C,X
4C23: 86 06          LDA         #$06
4C25: 20 39          BRA         $4C60
------------------------------------------------
4C27: 20 1D          BRA         $4C46
------------------------------------------------
4C29: C1 05          CMPB        #$05
4C2B: 26 19          BNE         $4C46
4C2D: BD 84 68       JSR         $8468
4C30: 25 14          BCS         $4C46
4C32: E6 4A          LDB         +$0A,U
4C34: 86 80          LDA         #$80
4C36: ED 26          STD         +$06,Y
4C38: CC 7C 65       LDD         #$7C65
4C3B: ED 22          STD         +$02,Y
4C3D: AF 24          STX         +$04,Y
4C3F: BD 84 AE       JSR         $84AE
4C42: 0B 5E	     fdb	 $0B5E
4C44: E6 49          LDB         +$09,U
4C46: CB 06          ADDB        #$06
4C48: A6 4A          LDA         +$0A,U
4C4A: A7 85          STA         B,X
4C4C: EC 49          LDD         +$09,U
4C4E: 81 00          CMPA        #$00
4C50: 26 05          BNE         $4C57
4C52: BD 8B A5       JSR         $8BA5		; pitch bend
4C55: 20 0C          BRA         $4C63
------------------------------------------------
4C57: 81 05          CMPA        #$05
4C59: 26 05          BNE         $4C60
4C5B: BD 8A E5       JSR         $8AE5
4C5E: 20 03          BRA         $4C63
------------------------------------------------
4C60: BD 8B B5       JSR         $8BB5
4C63: 39             RTS  
------------------------------------------------
4C64: BD CD 66       JSR         $CD66
4C67: 20 03          BRA         $4C6C
------------------------------------------------
4C69: BD CD 55       JSR         $CD55
4C6C: CE 02 AF       LDU         #$02AF
4C6F: A6 49          LDA         +$09,U
4C71: BB 01 01       ADDA        $0101
4C74: A7 49          STA         +$09,U
4C76: 6D 46          TST         +$06,U
4C78: 10 2B 00 F5    LBMI        $4D71
4C7C: A6 44          LDA         +$04,U
4C7E: BD CE 01       JSR         $CE01
4C81: 6D 05          TST         +$05,X
4C83: 26 18          BNE         $4C9D
4C85: 96 FE          LDA         $FE
4C87: 26 14          BNE         $4C9D
4C89: A6 03          LDA         +$03,X
4C8B: 84 40          ANDA        #$40
4C8D: 27 05          BEQ         $4C94
4C8F: EC 49          LDD         +$09,U
4C91: BD CD EF       JSR         $CDEF
4C94: 34 40          PSHS        U
4C96: EC 49          LDD         +$09,U
4C98: BD 8B 77       JSR         $8B77
4C9B: 35 40          PULS        U
4C9D: A6 44          LDA         +$04,U
4C9F: A7 4A          STA         +$0A,U
4CA1: 8E 01 17       LDX         #$0117
4CA4: 10 AE 84       LDY         ,X
4CA7: 10 8C 80 00    CMPY        #$8000
4CAB: 24 22          BCC         $4CCF
4CAD: A6 26          LDA         +$06,Y
4CAF: E6 24          LDB         +$04,Y
4CB1: 10 A3 49       CMPD        +$09,U
4CB4: 26 12          BNE         $4CC8
4CB6: EC A4          LDD         ,Y
4CB8: ED 84          STD         ,X
4CBA: 2A 03          BPL         $4CBF
4CBC: BF 01 19       STX         $0119
4CBF: BD 84 9F       JSR         $849F
4CC2: 10 8E FF FF    LDY         #$FFFF
4CC6: 20 05          BRA         $4CCD
------------------------------------------------
4CC8: 30 A4          LEAX        ,Y
4CCA: 10 AE A4       LDY         ,Y
4CCD: 20 D8          BRA         $4CA7
------------------------------------------------
4CCF: 39             RTS  
------------------------------------------------
4CD0: EC 0C          LDD         +$0C,X
4CD2: FD 01 04       STD         $0104
4CD5: BD CD 66       JSR         $CD66
4CD8: 20 08          BRA         $4CE2
------------------------------------------------
4CDA: EC 0C          LDD         +$0C,X
4CDC: FD 01 02       STD         $0102
4CDF: BD CD 55       JSR         $CD55
4CE2: CE 02 AF       LDU         #$02AF
4CE5: A6 44          LDA         +$04,U
4CE7: BD CE 01       JSR         $CE01
4CEA: 6D 05          TST         +$05,X
4CEC: 27 04          BEQ         $4CF2
4CEE: 96 FE          LDA         $FE
4CF0: 27 60          BEQ         $4D52
4CF2: BD 84 68       JSR         $8468
4CF5: 25 5B          BCS         $4D52
4CF7: A6 44          LDA         +$04,U
4CF9: 84 07          ANDA        #$07
4CFB: E6 4A          LDB         +$0A,U
4CFD: C4 7F          ANDB        #$7F
4CFF: ED 24          STD         +$04,Y
4D01: A6 45          LDA         +$05,U
4D03: 8B 15          ADDA        #$15
4D05: BB 01 01       ADDA        $0101
4D08: C6 40          LDB         #$40
4D0A: ED 26          STD         +$06,Y
4D0C: 34 40          PSHS        U
4D0E: 7D 01 17       TST         $0117
4D11: 2B 08          BMI         $4D1B
4D13: FE 01 19       LDU         $0119
4D16: 10 AF C4       STY         ,U
4D19: 20 04          BRA         $4D1F
------------------------------------------------
4D1B: 10 BF 01 17    STY         $0117
4D1F: 10 BF 01 19    STY         $0119
4D23: CE FF FF       LDU         #$FFFF
4D26: EF A4          STU         ,Y
4D28: 35 40          PULS        U
4D2A: 0D FE          TST         $FE
4D2C: 10 26 FD 93    LBNE        $4AC3
4D30: E6 03          LDB         +$03,X
4D32: C4 40          ANDB        #$40
4D34: 27 0E          BEQ         $4D44
4D36: A6 45          LDA         +$05,U
4D38: 8B 15          ADDA        #$15
4D3A: BB 01 01       ADDA        $0101
4D3D: E6 49          LDB         +$09,U
4D3F: CA 02          ORB         #$02
4D41: BD CD DB       JSR         $CDDB
4D44: A6 45          LDA         +$05,U
4D46: 8B 15          ADDA        #$15
4D48: BB 01 01       ADDA        $0101
4D4B: E6 49          LDB         +$09,U
4D4D: CA 02          ORB         #$02
4D4F: BD 8B 50       JSR         $8B50
4D52: 16 FD 6E       LBRA        $4AC3
4D55: A6 04          LDA         +$04,X
4D57: 91 F6          CMPA        $F6
4D59: 26 0A          BNE         $4D65
4D5B: 7D 02 BF       TST         $02BF
4D5E: 2A 05          BPL         $4D65
4D60: 35 06          PULS        B,A
4D62: 16 FD 5E       LBRA        $4AC3
4D65: 39             RTS  
------------------------------------------------
4D66: 7D 02 BF       TST         $02BF
4D69: 26 05          BNE         $4D70
4D6B: 35 06          PULS        B,A
4D6D: 16 FD 53       LBRA        $4AC3
4D70: 39             RTS  
------------------------------------------------
4D71: CE 02 AF       LDU         #$02AF
4D74: A6 44          LDA         +$04,U
4D76: BD CE 01       JSR         $CE01
4D79: 6D 05          TST         +$05,X
4D7B: 26 20          BNE         $4D9D
4D7D: E6 03          LDB         +$03,X
4D7F: C4 40          ANDB        #$40
4D81: 27 15          BEQ         $4D98
4D83: BD 84 68       JSR         $8468
4D86: 25 10          BCS         $4D98
4D88: CC 7C 65       LDD         #$7C65
4D8B: ED 22          STD         +$02,Y
4D8D: AF 24          STX         +$04,Y
4D8F: EC 49          LDD         +$09,U
4D91: ED 26          STD         +$06,Y
4D93: BD 84 AE       JSR         $84AE
4D96: 0B 5E	     fdb	 $0B5E
4D98: EC 49          LDD         +$09,U
4D9A: BD 8B D7       JSR         $8BD7
4D9D: 39             RTS  
------------------------------------------------
4D9E: 34 20          PSHS        Y
4DA0: CC 00 00       LDD         #$0000
4DA3: FD 01 11       STD         $0111
4DA6: 7D 01 00       TST         $0100
4DA9: 2A 03          BPL         $4DAE
4DAB: FD 01 06       STD         $0106
4DAE: 0D E5          TST         $E5
4DB0: 2A 27          BPL         $4DD9
4DB2: FD 01 02       STD         $0102
4DB5: B7 01 0D       STA         $010D
4DB8: B7 01 0E       STA         $010E
4DBB: CC FF FF       LDD         #$FFFF
4DBE: FD 01 04       STD         $0104
4DC1: 86 06          LDA         #$06
4DC3: B7 01 0B       STA         $010B
4DC6: FE 01 0F       LDU         $010F
4DC9: E6 42          LDB         +$02,U
4DCB: F7 01 0C       STB         $010C
4DCE: E6 44          LDB         +$04,U
4DD0: F7 01 08       STB         $0108
4DD3: CE C1 ED       LDU         #$C1ED
4DD6: BD D9 E9       JSR         $D9E9
4DD9: 35 A0          PULS        PC,Y
------------------------------------------------
4DDB: BD 84 68       JSR         $8468
4DDE: 25 0E          BCS         $4DEE
4DE0: AF 24          STX         +$04,Y
4DE2: ED 26          STD         +$06,Y
4DE4: CC 7A 52       LDD         #$7A52
4DE7: ED 22          STD         +$02,Y
4DE9: BD 84 AE       JSR         $84AE
4DEC: 0B 5E	     fdb	 $0B5E
4DEE: 39             RTS  
------------------------------------------------
4DEF: BD 84 79       JSR         $8479
4DF2: ED 26          STD         +$06,Y
4DF4: AF 24          STX         +$04,Y
4DF6: CC 7A E1       LDD         #$7AE1
4DF9: ED 22          STD         +$02,Y
4DFB: BD 84 AE       JSR         $84AE
4DFE: 0B 5E	     fdb	 $0B5E
4E00: 39             RTS  

------------------------------------------------
--- calculate track block pointer (X) ----------
------------------------------------------------
4E01: 8E 02 D4       LDX         #$02D4		; track table base
4E04: 4C             INCA 			; track number
4E05: C6 1B          LDB         #$1B		; length of track block
4E07: 3D             MUL  
4E08: 30 8B          LEAX        D,X		; get track block address
4E0A: 39             RTS  

------------------------------------------------
4E0B: B6 01 00       LDA         $0100
4E0E: 10 2A 00 C1    LBPL        $4ED3
4E12: EC 24          LDD         +$04,Y
4E14: 34 06          PSHS        B,A
4E16: BD 84 9F       JSR         $849F
4E19: 8E 01 C7       LDX         #$01C7
4E1C: 96 F2          LDA         $F2
4E1E: 6D 86          TST         A,X
4E20: 26 26          BNE         $4E48
4E22: EC E4          LDD         ,S
4E24: BD D0 3E       JSR         $D03E
4E27: 10 83 00 00    CMPD        #$0000
4E2B: 26 10          BNE         $4E3D
4E2D: DC F0          LDD         $F0
4E2F: F3 02 C7       ADDD        $02C7
4E32: FD 02 8F       STD         $028F
4E35: BD CD 9E       JSR         $CD9E
4E38: 73 01 02       COM         $0102
4E3B: 20 0B          BRA         $4E48
------------------------------------------------
4E3D: FD 01 06       STD         $0106
4E40: BD D0 9E       JSR         $D09E
4E43: EC E4          LDD         ,S
4E45: FD 01 11       STD         $0111
4E48: 32 62          LEAS        +$02,S
4E4A: CE AA 72       LDU         #$AA72
4E4D: BD D9 E9       JSR         $D9E9
4E50: 7E D0 59       JMP         $D059
------------------------------------------------
4E53: 7D 02 95       TST         $0295
4E56: 2B F2          BMI         $4E4A
4E58: EC 24          LDD         +$04,Y
4E5A: 34 06          PSHS        B,A
4E5C: BD 84 9F       JSR         $849F
4E5F: BD D0 3E       JSR         $D03E
4E62: 10 83 00 00    CMPD        #$0000
4E66: 26 10          BNE         $4E78
4E68: DC F0          LDD         $F0
4E6A: F3 02 C7       ADDD        $02C7
4E6D: FD 02 8F       STD         $028F
4E70: BD CD 9E       JSR         $CD9E
4E73: 73 01 02       COM         $0102
4E76: 20 0E          BRA         $4E86
------------------------------------------------
4E78: FD 01 06       STD         $0106
4E7B: BD D0 C6       JSR         $D0C6
4E7E: BD D0 9E       JSR         $D09E
4E81: EC E4          LDD         ,S
4E83: FD 01 11       STD         $0111
4E86: 32 62          LEAS        +$02,S
4E88: 7E CE 4A       JMP         $CE4A
------------------------------------------------
4E8B: B6 01 00       LDA         $0100
4E8E: 10 2A 00 BC    LBPL        $4F4E
4E92: EC 24          LDD         +$04,Y
4E94: BD 84 9F       JSR         $849F
4E97: 44             LSRA 
4E98: 24 02          BCC         $4E9C
4E9A: CA 80          ORB         #$80
4E9C: BD D0 6D       JSR         $D06D
4E9F: 23 09          BLS         $4EAA
4EA1: FD 01 06       STD         $0106
4EA4: BD D0 7D       JSR         $D07D
4EA7: BD D0 9E       JSR         $D09E
4EAA: CE C1 ED       LDU         #$C1ED
4EAD: 7E D9 E9       JMP         $D9E9
------------------------------------------------
4EB0: EC 24          LDD         +$04,Y
4EB2: BD 84 9F       JSR         $849F
4EB5: 7D 02 95       TST         $0295
4EB8: 2A 01          BPL         $4EBB
4EBA: 39             RTS  
------------------------------------------------
4EBB: 44             LSRA 
4EBC: 24 02          BCC         $4EC0
4EBE: CA 80          ORB         #$80
4EC0: BD D0 6D       JSR         $D06D
4EC3: 23 0C          BLS         $4ED1
4EC5: FD 01 06       STD         $0106
4EC8: BD D0 7D       JSR         $D07D
4ECB: BD D0 C6       JSR         $D0C6
4ECE: BD D0 9E       JSR         $D09E
4ED1: 20 D7          BRA         $4EAA
------------------------------------------------
4ED3: EC 24          LDD         +$04,Y
4ED5: 34 06          PSHS        B,A
4ED7: BD 84 9F       JSR         $849F
4EDA: DC F3          LDD         $F3
4EDC: C3 00 06       ADDD        #$0006
4EDF: FD 02 91       STD         $0291
4EE2: 7F 02 A9       CLR         $02A9
4EE5: CC 00 00       LDD         #$0000
4EE8: FD 01 06       STD         $0106
4EEB: 43             COMA 
4EEC: B7 02 D0       STA         $02D0
4EEF: EC E4          LDD         ,S
4EF1: 10 83 00 01    CMPD        #$0001
4EF5: 26 03          BNE         $4EFA
4EF7: 73 02 D0       COM         $02D0
4EFA: BD D5 E4       JSR         $D5E4
4EFD: EC E4          LDD         ,S
4EFF: 83 00 01       SUBD        #$0001
4F02: 27 07          BEQ         $4F0B
4F04: ED E4          STD         ,S
4F06: BD CF 12       JSR         $CF12
4F09: 20 05          BRA         $4F10
------------------------------------------------
4F0B: 32 62          LEAS        +$02,S
4F0D: 7E CE 4A       JMP         $CE4A
------------------------------------------------
4F10: 20 DD          BRA         $4EEF
------------------------------------------------
4F12: D6 F2          LDB         $F2
4F14: 8E 01 C7       LDX         #$01C7
4F17: 6D 85          TST         B,X
4F19: 26 32          BNE         $4F4D
4F1B: 58             LSLB 
4F1C: 8E 01 27       LDX         #$0127
4F1F: EC 85          LDD         B,X
4F21: 34 06          PSHS        B,A
4F23: BD D3 F8       JSR         $D3F8
4F26: 34 06          PSHS        B,A
4F28: EC 62          LDD         +$02,S
4F2A: BD D2 07       JSR         $D207
4F2D: 35 26          PULS        Y,B,A
4F2F: BD D0 41       JSR         $D041
4F32: 34 06          PSHS        B,A
4F34: B6 01 00       LDA         $0100
4F37: 3D             MUL  
4F38: 34 06          PSHS        B,A
4F3A: E6 62          LDB         +$02,S
4F3C: B6 01 00       LDA         $0100
4F3F: 3D             MUL  
4F40: 1F 98          TFR         B,A
4F42: 5F             CLRB 
4F43: E3 E1          ADDD        ,S++
4F45: 32 62          LEAS        +$02,S
4F47: F3 01 06       ADDD        $0106
4F4A: FD 01 06       STD         $0106
4F4D: 39             RTS  
------------------------------------------------
4F4E: EC 24          LDD         +$04,Y
4F50: BD 84 9F       JSR         $849F
4F53: 44             LSRA 
4F54: 24 02          BCC         $4F58
4F56: CA 80          ORB         #$80
4F58: FD 01 06       STD         $0106
4F5B: 34 06          PSHS        B,A
4F5D: DC F3          LDD         $F3
4F5F: C3 00 06       ADDD        #$0006
4F62: FD 02 91       STD         $0291
4F65: 7F 02 A9       CLR         $02A9
4F68: BD D5 95       JSR         $D595
4F6B: 5D             TSTB 
4F6C: 2B 2C          BMI         $4F9A
4F6E: FC 02 A7       LDD         $02A7
4F71: C3 00 01       ADDD        #$0001
4F74: BD D0 3E       JSR         $D03E
4F77: 34 06          PSHS        B,A
4F79: EC 62          LDD         +$02,S
4F7B: 10 A3 E4       CMPD        ,S
4F7E: 25 04          BCS         $4F84
4F80: A3 E4          SUBD        ,S
4F82: 20 0B          BRA         $4F8F
------------------------------------------------
4F84: 32 64          LEAS        +$04,S
4F86: BD D0 7D       JSR         $D07D
4F89: BD D0 9E       JSR         $D09E
4F8C: 7E CE AA       JMP         $CEAA
------------------------------------------------
4F8F: 7A 01 00       DEC         $0100
4F92: 26 E7          BNE         $4F7B
4F94: 32 62          LEAS        +$02,S
4F96: ED E4          STD         ,S
4F98: 20 08          BRA         $4FA2
------------------------------------------------
4F9A: BD D5 70       JSR         $D570
4F9D: 35 06          PULS        B,A
4F9F: 7E CE AA       JMP         $CEAA
------------------------------------------------
4FA2: 20 C4          BRA         $4F68
------------------------------------------------
4FA4: BD D0 09       JSR         $D009
4FA7: E6 24          LDB         +$04,Y
4FA9: A6 26          LDA         +$06,Y
4FAB: BD 84 9F       JSR         $849F
4FAE: 4D             TSTA 
4FAF: 26 23          BNE         $4FD4
4FB1: D7 F2          STB         $F2
4FB3: C6 FF          LDB         #$FF
4FB5: F7 01 00       STB         $0100
4FB8: 7F 01 01       CLR         $0101
4FBB: 34 02          PSHS        A
4FBD: BD D3 BB       JSR         $D3BB
4FC0: 73 01 02       COM         $0102
4FC3: 35 02          PULS        A
4FC5: 4D             TSTA 
4FC6: 26 05          BNE         $4FCD
4FC8: BD D0 37       JSR         $D037
4FCB: 20 06          BRA         $4FD3
------------------------------------------------
4FCD: CE AE 0D       LDU         #$AE0D
4FD0: BD D9 E9       JSR         $D9E9
4FD3: 39             RTS  
------------------------------------------------
4FD4: C1 14          CMPB        #$14
4FD6: 24 14          BCC         $4FEC
4FD8: 8E 02 03       LDX         #$0203
4FDB: 6D 85          TST         B,X
4FDD: 2B 0B          BMI         $4FEA
4FDF: D7 F5          STB         $F5
4FE1: BD D0 03       JSR         $D003
4FE4: CE C1 7A       LDU         #$C17A
4FE7: BD D9 E9       JSR         $D9E9
4FEA: 20 16          BRA         $5002
------------------------------------------------
4FEC: C1 14          CMPB        #$14
4FEE: 25 12          BCS         $5002
4FF0: C1 50          CMPB        #$50
4FF2: 24 0E          BCC         $5002
4FF4: C0 14          SUBB        #$14
4FF6: 8E 01 C7       LDX         #$01C7
4FF9: 6D 85          TST         B,X
4FFB: 2B 05          BMI         $5002
4FFD: BD D0 09       JSR         $D009
5000: 20 AF          BRA         $4FB1
------------------------------------------------
5002: 39             RTS  
------------------------------------------------
5003: BD D0 09       JSR         $D009
5006: 7E D5 70       JMP         $D570
------------------------------------------------
5009: 34 36          PSHS        Y,X,B,A
500B: 0D CD          TST         $CD
500D: 27 13          BEQ         $5022
500F: 0F CD          CLR         $CD
5011: 7D 01 00       TST         $0100
5014: 2B 09          BMI         $501F
5016: 96 F2          LDA         $F2
5018: 8E 01 C7       LDX         #$01C7
501B: 6D 86          TST         A,X
501D: 2B 03          BMI         $5022
501F: BD D3 05       JSR         $D305
5022: 35 B6          PULS        PC,Y,X,B,A
------------------------------------------------
5024: A6 26          LDA         +$06,Y
5026: E6 24          LDB         +$04,Y
5028: BD 84 9F       JSR         $849F
502B: 4D             TSTA 
502C: 26 0F          BNE         $503D
502E: 8E 01 C7       LDX         #$01C7
5031: 6D 85          TST         B,X
5033: 26 08          BNE         $503D
5035: D7 F8          STB         $F8
5037: CE AE 17       LDU         #$AE17
503A: BD D9 E9       JSR         $D9E9
503D: 39             RTS  
------------------------------------------------
503E: BE 01 0F       LDX         $010F
5041: 34 06          PSHS        B,A
5043: E6 02          LDB         +$02,X
5045: 34 04          PSHS        B
5047: A6 62          LDA         +$02,S
5049: 3D             MUL  
504A: 34 06          PSHS        B,A
504C: E6 62          LDB         +$02,S
504E: A6 63          LDA         +$03,S
5050: 3D             MUL  
5051: 1F 98          TFR         B,A
5053: 5F             CLRB 
5054: E3 E1          ADDD        ,S++
5056: 32 63          LEAS        +$03,S
5058: 39             RTS  
------------------------------------------------
5059: B6 01 06       LDA         $0106
505C: F6 01 07       LDB         $0107
505F: 2A 04          BPL         $5065
5061: 1A 01          ORCC        #$01		; set carry
5063: 20 02          BRA         $5067
------------------------------------------------
5065: 1C FE          ANDCC       #$FE		; clear carry
5067: 49             ROLA 
5068: C4 7F          ANDB        #$7F
506A: 7E 8B 1F       JMP         $8B1F
------------------------------------------------
506D: 34 06          PSHS        B,A
506F: FC 02 A7       LDD         $02A7
5072: C3 00 01       ADDD        #$0001
5075: BD D0 3E       JSR         $D03E
5078: 10 A3 E4       CMPD        ,S
507B: 35 86          PULS        PC,B,A
------------------------------------------------
507D: 34 06          PSHS        B,A
507F: BE 01 0F       LDX         $010F
5082: E6 02          LDB         +$02,X
5084: 4F             CLRA 
5085: 34 06          PSHS        B,A
5087: CE 00 00       LDU         #$0000
508A: EC 62          LDD         +$02,S
508C: 10 A3 E4       CMPD        ,S
508F: 25 06          BCS         $5097
5091: A3 E4          SUBD        ,S
5093: 33 41          LEAU        +$01,U
5095: 20 F5          BRA         $508C
------------------------------------------------
5097: FF 01 11       STU         $0111
509A: 32 62          LEAS        +$02,S
509C: 35 86          PULS        PC,B,A
509E: 34 06          PSHS        B,A
50A0: 1F 02          TFR         D,Y
50A2: DC F0          LDD         $F0
50A4: C3 00 05       ADDD        #$0005
50A7: 34 06          PSHS        B,A
50A9: CC 7F 3F       LDD         #$7F3F		; jump to ROMLOW $4f3f
50AC: 34 06          PSHS        B,A		;
50AE: CC 0E 08       LDD         #$0E08		;
50B1: BD 85 B4       JSR         $85B4		;
50B4: BD DA C2       JSR         $DAC2
50B7: 34 06          PSHS        B,A
50B9: CC 7F A7       LDD         #$7FA7		; jump to ROMLOW $4fa7
50BC: 34 06          PSHS        B,A		;
50BE: CC 0E 08       LDD         #$0E08		;
50C1: BD 85 B4       JSR         $85B4		;
50C4: 35 86          PULS        PC,B,A
------------------------------------------------
50C6: 34 06          PSHS        B,A
50C8: 10 B3 01 13    CMPD        $0113
50CC: 25 0D          BCS         $50DB
50CE: 10 B3 01 15    CMPD        $0115
50D2: 24 07          BCC         $50DB
50D4: EC E4          LDD         ,S
50D6: BD D0 E5       JSR         $D0E5
50D9: 20 08          BRA         $50E3
------------------------------------------------
50DB: 10 8E FF FF    LDY         #$FFFF
50DF: 10 BF 01 04    STY         $0104
50E3: 35 86          PULS        PC,B,A
------------------------------------------------
50E5: B3 01 13       SUBD        $0113
50E8: 34 06          PSHS        B,A
50EA: 10 BE 01 13    LDY         $0113
50EE: DC F0          LDD         $F0
50F0: C3 00 05       ADDD        #$0005
50F3: 34 06          PSHS        B,A
50F5: CC 7F 3F       LDD         #$7F3F		; jump to ROMLOW $4f3f
50F8: 34 06          PSHS        B,A		;
50FA: CC 0E 08       LDD         #$0E08		;
50FD: BD 85 B4       JSR         $85B4		;
5100: 1E 02          EXG         D,Y
5102: E3 E4          ADDD        ,S
5104: ED E4          STD         ,S
5106: 10 BF 02 91    STY         $0291
510A: CC 00 00       LDD         #$0000
510D: FD 01 02       STD         $0102
5110: EC E4          LDD         ,S
5112: 10 83 15 55    CMPD        #$1555
5116: 25 08          BCS         $5120
5118: 83 15 55       SUBD        #$1555
511B: CE 15 55       LDU         #$1555
511E: 20 05          BRA         $5125
------------------------------------------------
5120: CC 00 00       LDD         #$0000
5123: EE E4          LDU         ,S
5125: ED E4          STD         ,S
5127: 34 40          PSHS        U
5129: E6 61          LDB         +$01,S
512B: 86 06          LDA         #$06
512D: 3D             MUL  
512E: 34 06          PSHS        B,A
5130: E6 62          LDB         +$02,S
5132: 86 06          LDA         #$06
5134: 3D             MUL  
5135: 1F 98          TFR         B,A
5137: 5F             CLRB 
5138: E3 E1          ADDD        ,S++
513A: 32 62          LEAS        +$02,S
513C: B3 01 02       SUBD        $0102
513F: FD 01 02       STD         $0102
5142: CE D1 67       LDU         #$D167
5145: 10 BE 02 91    LDY         $0291
5149: 34 06          PSHS        B,A
514B: CC 72 6F       LDD         #$726F		; jump to ROMLOW $426f
514E: 34 06          PSHS        B,A		;
5150: CC 0E 08       LDD         #$0E08		;
5153: BD 85 B4       JSR         $85B4		;
5156: 10 BF 02 91    STY         $0291
515A: EC E4          LDD         ,S
515C: 26 B2          BNE         $5110
515E: 32 62          LEAS        +$02,S
5160: BE 01 02       LDX         $0102
5163: BF 01 04       STX         $0104
5166: 39             RTS  
------------------------------------------------
5167: D1 B7          CMPB        $B7
5169: CA B3          ORB         #$B3
516B: CA B3          ORB         #$B3
516D: D1 B7          CMPB        $B7
516F: CA B3          ORB         #$B3
5171: CA B3          ORB         #$B3
5173: D1 92          CMPB        $92
5175: D1 77          CMPB        $77
5177: 96 EF          LDA         $EF
5179: 84 40          ANDA        #$40
517B: 27 05          BEQ         $5182
517D: 86 FF          LDA         #$FF
517F: B7 02 BF       STA         $02BF
5182: 10 8E 02 95    LDY         #$0295
5186: EC 22          LDD         +$02,Y
5188: ED 0C          STD         +$0C,X
518A: FC 01 21       LDD         $0121
518D: ED 02          STD         +$02,X
518F: 7E D1 B7       JMP         $D1B7
------------------------------------------------
5192: 7F 02 BF       CLR         $02BF
5195: CC 00 00       LDD         #$0000
5198: ED 66          STD         +$06,S
519A: CC FF FF       LDD         #$FFFF
519D: FD 01 04       STD         $0104
51A0: FD 01 02       STD         $0102
51A3: 73 02 BE       COM         $02BE
51A6: 39             RTS  
------------------------------------------------
51A7: D1 B7          CMPB        $B7
51A9: CA B3          ORB         #$B3
51AB: CA B3          ORB         #$B3
51AD: D1 B7          CMPB        $B7
51AF: CA B3          ORB         #$B3
51B1: CA B3          ORB         #$B3
51B3: D1 EA          CMPB        $EA
51B5: D1 D4          CMPB        $D4
51B7: FC 01 02       LDD         $0102
51BA: 10 A3 0C       CMPD        +$0C,X
51BD: 25 04          BCS         $51C3
51BF: A3 0C          SUBD        +$0C,X
51C1: 20 08          BRA         $51CB
------------------------------------------------
51C3: EC 0C          LDD         +$0C,X
51C5: B3 01 02       SUBD        $0102
51C8: 73 02 BE       COM         $02BE
51CB: FD 01 02       STD         $0102
51CE: EC 02          LDD         +$02,X
51D0: FD 02 CC       STD         $02CC
51D3: 39             RTS  
------------------------------------------------
51D4: 10 8E 02 95    LDY         #$0295
51D8: A6 24          LDA         +$04,Y
51DA: A7 05          STA         +$05,X
51DC: 34 06          PSHS        B,A
51DE: CC 72 A0       LDD         #$72A0		; jump to ROMLOW $42a0
51E1: 34 06          PSHS        B,A		;
51E3: CC 0E 08       LDD         #$0E08		;
51E6: BD 85 B4       JSR         $85B4		;
51E9: 39             RTS  
------------------------------------------------
51EA: 7D 01 00       TST         $0100
51ED: 2B 05          BMI         $51F4
51EF: BD D5 70       JSR         $D570
51F2: 20 06          BRA         $51FA
------------------------------------------------
51F4: BD CD 9E       JSR         $CD9E
51F7: 73 01 02       COM         $0102
51FA: BD CE 4A       JSR         $CE4A
51FD: BD CE AA       JSR         $CEAA
5200: 10 FE 02 A3    LDS         $02A3
5204: 7E D9 D4       JMP         $D9D4
------------------------------------------------
5207: C3 00 07       ADDD        #$0007
520A: 32 7F          LEAS        -$01,S
520C: BD D8 16       JSR         $D816
520F: C3 00 01       ADDD        #$0001
5212: 1F 03          TFR         D,U
5214: A6 E4          LDA         ,S
5216: 84 1F          ANDA        #$1F
5218: C6 05          LDB         #$05
521A: 3D             MUL  
521B: 8E D4 0F       LDX         #$D40F
521E: 30 8B          LEAX        D,X
5220: 35 82          PULS        PC,A
5222: 34 06          PSHS        B,A
5224: C3 00 04       ADDD        #$0004
5227: 32 7F          LEAS        -$01,S
5229: BD D8 16       JSR         $D816
522C: C3 00 01       ADDD        #$0001
522F: 35 04          PULS        B
5231: 5D             TSTB 
5232: 2B 03          BMI         $5237
5234: 5F             CLRB 
5235: 20 02          BRA         $5239
------------------------------------------------
5237: C6 02          LDB         #$02
5239: F7 02 C9       STB         $02C9
523C: CB 03          ADDB        #$03
523E: 86 08          LDA         #$08
5240: 3D             MUL  
5241: C3 00 09       ADDD        #$0009
5244: FD 02 C7       STD         $02C7
5247: EC E4          LDD         ,S
5249: 34 01          PSHS        CC
524B: 1A 50          ORCC        #$50		; disable FIRQ/IRQ
524D: 8D B8          BSR         $5207
524F: BF 01 0F       STX         $010F
5252: 35 01          PULS        CC
5254: 34 02          PSHS        A
5256: 1F 30          TFR         U,D
5258: 32 7F          LEAS        -$01,S
525A: BD D8 16       JSR         $D816
525D: C3 00 01       ADDD        #$0001
5260: 1F 03          TFR         D,U
5262: 35 02          PULS        A
5264: 97 EC          STA         $EC
5266: 35 02          PULS        A
5268: 4D             TSTA 
5269: 2A 06          BPL         $5271
526B: 84 7F          ANDA        #$7F
526D: C6 01          LDB         #$01
526F: 20 01          BRA         $5272
------------------------------------------------
5271: 5F             CLRB 
5272: 97 F7          STA         $F7
5274: 7D 01 00       TST         $0100
5277: 2A 02          BPL         $527B
5279: D7 E8          STB         $E8
527B: 4F             CLRA 
527C: BD CE 01       JSR         $CE01
527F: 1F 30          TFR         U,D
5281: 32 7F          LEAS        -$01,S
5283: BD D8 16       JSR         $D816
5286: C3 00 01       ADDD        #$0001
5289: 6D E4          TST         ,S
528B: 2B 51          BMI         $52DE
528D: 32 7F          LEAS        -$01,S
528F: BD D8 16       JSR         $D816
5292: C3 00 01       ADDD        #$0001
5295: 32 7F          LEAS        -$01,S
5297: BD D8 16       JSR         $D816
529A: C3 00 01       ADDD        #$0001
529D: 1F 03          TFR         D,U
529F: A6 61          LDA         +$01,S
52A1: 84 0F          ANDA        #$0F
52A3: A7 04          STA         +$04,X
52A5: A6 61          LDA         +$01,S
52A7: 84 F0          ANDA        #$F0
52A9: A7 03          STA         +$03,X
52AB: E6 E4          LDB         ,S
52AD: E7 0C          STB         +$0C,X
52AF: 86 06          LDA         #$06
52B1: BD 8B B5       JSR         $8BB5
52B4: A6 62          LDA         +$02,S
52B6: D6 E5          LDB         $E5
52B8: 2B 04          BMI         $52BE
52BA: A1 02          CMPA        +$02,X
52BC: 27 15          BEQ         $52D3
52BE: A7 02          STA         +$02,X
52C0: C6 66          LDB         #$66
52C2: 3D             MUL  
52C3: C3 10 4A       ADDD        #$104A
52C6: ED 84          STD         ,X
52C8: E6 62          LDB         +$02,S
52CA: BD 8A BB       JSR         $8ABB
52CD: 6F 88 13       CLR         +$13,X
52D0: 6F 88 19       CLR         +$19,X
52D3: 34 10          PSHS        X
52D5: BD E4 89       JSR         $E489
52D8: 35 10          PULS        X
52DA: 32 62          LEAS        +$02,S
52DC: 20 0F          BRA         $52ED
------------------------------------------------
52DE: C3 00 02       ADDD        #$0002
52E1: 1F 03          TFR         D,U
52E3: 86 FF          LDA         #$FF
52E5: A7 02          STA         +$02,X
52E7: A6 03          LDA         +$03,X
52E9: 84 CF          ANDA        #$CF
52EB: A7 03          STA         +$03,X
52ED: F6 02 C9       LDB         $02C9
52F0: 33 C5          LEAU        B,U
52F2: 1F 30          TFR         U,D
52F4: 30 88 1B       LEAX        +$1B,X
52F7: 8C 03 C7       CMPX        #$03C7
52FA: 10 26 FF 85    LBNE        $5283
52FE: 32 61          LEAS        +$01,S
5300: BD 89 E7       JSR         $89E7
5303: 35 86          PULS        PC,B,A
------------------------------------------------
5305: 34 26          PSHS        Y,B,A
5307: 96 EC          LDA         $EC
5309: 34 02          PSHS        A
530B: 96 E8          LDA         $E8
530D: 1C FE          ANDCC       #$FE		; clear carry
530F: 46             RORA 
5310: 46             RORA 
5311: 9A F7          ORA         $F7
5313: 34 02          PSHS        A
5315: DC F0          LDD         $F0
5317: C3 00 07       ADDD        #$0007		; SEQRAM address
531A: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
531D: C3 00 01       ADDD        #$0001		; increment SEQRAM address
5320: 32 61          LEAS        +$01,S		; get next byte
5322: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
5325: C3 00 01       ADDD        #$0001		; increment SEQRAM address
5328: 32 61          LEAS        +$01,S		; get next byte
532A: C6 07          LDB         #$07
532C: BD D3 34       JSR         $D334
532F: 5A             DECB 
5330: 2A FA          BPL         $532C
5332: 35 A6          PULS        PC,Y,B,A
------------------------------------------------
5334: 34 04          PSHS        B
5336: A6 E4          LDA         ,S
5338: BD CE 01       JSR         $CE01
533B: A6 0C          LDA         +$0C,X
533D: 34 02          PSHS        A
533F: A6 03          LDA         +$03,X
5341: 84 F0          ANDA        #$F0
5343: 85 20          BITA        #$20
5345: 27 04          BEQ         $534B
5347: 8A 10          ORA         #$10
5349: 20 02          BRA         $534D
------------------------------------------------
534B: 84 EF          ANDA        #$EF
534D: AA 04          ORA         +$04,X
534F: 34 02          PSHS        A
5351: A6 02          LDA         +$02,X
5353: 34 02          PSHS        A
5355: DC F0          LDD         $F0
5357: C3 00 09       ADDD        #$0009
535A: 34 06          PSHS        B,A
535C: A6 65          LDA         +$05,S
535E: C6 03          LDB         #$03
5360: FB 02 C9       ADDB        $02C9
5363: 3D             MUL  
5364: E3 E1          ADDD        ,S++		; SEQRAM address
5366: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
5369: C3 00 01       ADDD        #$0001		; increment SEQRAM address
536C: 32 61          LEAS        +$01,S		; get next byte
536E: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
5371: C3 00 01       ADDD        #$0001		; increment SEQRAM address
5374: 32 61          LEAS        +$01,S		; get next byte
5376: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
5379: C3 00 01       ADDD        #$0001		; increment SEQRAM address
537C: 32 61          LEAS        +$01,S		; get next byte
537E: 35 84          PULS        PC,B
------------------------------------------------
5380: 34 16          PSHS        X,B,A
5382: 86 FF          LDA         #$FF	
5384: 34 02          PSHS        A
5386: EC 61          LDD         +$01,S
5388: C3 00 09       ADDD        #$0009		; SEQRAM address
538B: 8E 02 EF       LDX         #$02EF		; track structure pointer
538E: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
5391: C3 00 01       ADDD        #$0001		; increment SEQRAM address
5394: C3 00 02       ADDD        #$0002		; SEQRAM address +2
5397: BD D3 A9       JSR         $D3A9		; init track (?)
539A: 30 88 1B       LEAX        +$1B,X		; next track
539D: 8C 03 C7       CMPX        #$03C7
53A0: 26 EC          BNE         $538E
53A2: 32 61          LEAS        +$01,S		; get next byte
53A4: BD 89 E7       JSR         $89E7
53A7: 35 96          PULS        PC,X,B,A


------------------------------------------------
--- initialize track ---------------------------
--- X points to track structure ----------------
------------------------------------------------
53A9: 34 06          PSHS        B,A
53AB: 86 FF          LDA         #$FF		; handler
53AD: A7 02          STA         +$02,X
53AF: 86 C0          LDA         #$C0
53B1: A7 03          STA         +$03,X
53B3: 86 7E          LDA         #$7E
53B5: A7 0C          STA         +$0C,X		; volume (?)
53B7: 6F 04          CLR         +$04,X		; empty flag (?)
53B9: 35 86          PULS        PC,B,A

------------------------------------------------
53BB: 7F 02 BF       CLR         $02BF
53BE: D6 F2          LDB         $F2
53C0: 8E 01 27       LDX         #$0127
53C3: 58             LSLB 
53C4: EC 85          LDD         B,X
53C6: DD F0          STD         $F0
53C8: BD D2 22       JSR         $D222
53CB: F3 02 C7       ADDD        $02C7
53CE: FD 02 8F       STD         $028F
53D1: DC F0          LDD         $F0
53D3: 8D 23          BSR         $53F8
53D5: 10 83 00 00    CMPD        #$0000
53D9: 27 03          BEQ         $53DE
53DB: 83 00 01       SUBD        #$0001
53DE: FD 02 A7       STD         $02A7
53E1: BD DB 58       JSR         $DB58
53E4: BD CD 9E       JSR         $CD9E
53E7: CC FF FF       LDD         #$FFFF
53EA: FD 01 04       STD         $0104
53ED: 0D E5          TST         $E5
53EF: 2B 06          BMI         $53F7
53F1: CE 80 A7       LDU         #$80A7
53F4: BD D9 E9       JSR         $D9E9
53F7: 39             RTS  
------------------------------------------------

53F8: C3 00 02 32 7F BD D8 16 C3 00 01 32 7F BD D8 16   ...2.......2....
5408: C3 00 01 35 04 35 82 00 0B 02 80 00 00 17 04 40   ...5.5.........@
5418: 00 01 0B 04 40 00 02 0B 06 2A FC 01 17 08 20 00   ....@....*.... .
5428: 03 0B 08 20 00 04 0B 0A 18 F0 02 17 0C 14 F0 05   ... ............
5438: 0B 0C 14 F0 06 0B 0E 12 EA 03 17 10 10 00 07 0B   ................
5448: 10 10 00 08 0B 12 0E EA 04 17 14 0C F0 09 0B 14   ................
5458: 0C F0 0A 0B 16 0B F2 05 17 18 0A F0 0B 0B 18 0A   ................
5468: F0 0C 0B 1A 09 EA 06 17 1C 09 FC 0D 0B 1C 09 FC   ................
5478: 0E 0B 1E 08 F0 07 17 20 08 00 0F 0B 20 08 00 10   ....... .... ...
5488: 0B 22 07 EE 08 17 24 07 FC 11 0B 24 07 FC 12 0B   ."....$....$....
5498: 26 06 E4 09 17 28 06 F0 13 0B 28 06 F0 14 0B 2A   &....(....(....*
54A8: 06 FC 34 20                                       ..4                  

------------------------------------------------
54AC: BD D0 09       JSR         $D009
54AF: F6 02 A9       LDB         $02A9
54B2: C1 01          CMPB        #$01
54B4: 27 16          BEQ         $54CC
54B6: 7F 02 A9       CLR         $02A9
54B9: DC F3          LDD         $F3
54BB: C3 00 06       ADDD        #$0006
54BE: FD 02 91       STD         $0291
54C1: BD D5 95       JSR         $D595
54C4: CE 80 A7       LDU         #$80A7
54C7: BD D9 E9       JSR         $D9E9
54CA: 20 0F          BRA         $54DB
------------------------------------------------
54CC: D6 F2          LDB         $F2
54CE: 8E 01 C7       LDX         #$01C7
54D1: 6D 85          TST         B,X
54D3: 26 E1          BNE         $54B6
54D5: B6 02 AA       LDA         $02AA
54D8: B7 01 00       STA         $0100
54DB: 35 20          PULS        Y
54DD: 5D             TSTB 
54DE: 2A 04          BPL         $54E4
54E0: BD 84 9F       JSR         $849F
54E3: 39             RTS  
------------------------------------------------
54E4: CC 00 00       LDD         #$0000
54E7: FD 01 06       STD         $0106
54EA: 86 01          LDA         #$01
54EC: 7E C8 A5       JMP         $C8A5
------------------------------------------------
54EF: FC 02 AC       LDD         $02AC
54F2: 10 83 00 09    CMPD        #$0009
54F6: 25 1E          BCS         $5516
54F8: 96 F5          LDA         $F5
54FA: 84 7F          ANDA        #$7F
54FC: 8E 02 03       LDX         #$0203
54FF: 6D 86          TST         A,X
5501: 2A 0F          BPL         $5512
5503: BD D0 09       JSR         $D009
5506: BD D5 19       JSR         $D519
5509: 7F 01 00       CLR         $0100
550C: BD D5 70       JSR         $D570
550F: 4F             CLRA 
5510: 20 02          BRA         $5514
------------------------------------------------
5512: 86 FF          LDA         #$FF
5514: 20 02          BRA         $5518
------------------------------------------------
5516: 86 FF          LDA         #$FF
5518: 39             RTS  
------------------------------------------------
5519: 6F 86          CLR         A,X
551B: C6 F3          LDB         #$F3
551D: 34 04          PSHS        B
551F: C6 01          LDB         #$01
5521: 8B 3C          ADDA        #$3C
5523: 1F 03          TFR         D,U
5525: 6F E2          CLR         ,-S
5527: 96 F2          LDA         $F2
5529: C6 01          LDB         #$01
552B: 34 06          PSHS        B,A
552D: 34 40          PSHS        U
552F: 96 F5          LDA         $F5
5531: 48             LSLA 
5532: 8E 01 9F       LDX         #$019F
5535: FE 01 21       LDU         $0121
5538: EF 86          STU         A,X
553A: CE 00 00       LDU         #$0000
553D: 34 40          PSHS        U
553F: CC 00 0A       LDD         #$000A
5542: 34 06          PSHS        B,A
5544: FC 01 21       LDD         $0121		; get SEQRAM address
5547: DD F3          STD         $F3
5549: 10 8E 00 0A    LDY         #$000A		; prepare 9 byte transfer
554D: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
5550: C3 00 01       ADDD        #$0001		; increment SEQRAM address
5553: 32 61          LEAS        +$01,S		; get next byte
5555: 31 3F          LEAY        -$01,Y		; all bytes transferred?
5557: 26 F4          BNE         $554D		; no -> loop
5559: FD 01 21       STD         $0121		; write back SEQRAM address
555C: 86 01          LDA         #$01
555E: B7 02 AB       STA         $02AB
5561: B7 02 A9       STA         $02A9
5564: B7 02 AA       STA         $02AA
5567: FC 01 21       LDD         $0121
556A: FD 01 1F       STD         $011F
556D: 7E E2 B3       JMP         $E2B3
------------------------------------------------
5570: 96 F5          LDA         $F5
5572: 84 7F          ANDA        #$7F
5574: 48             LSLA 
5575: 8E 01 9F       LDX         #$019F
5578: EC 86          LDD         A,X
557A: DD F3          STD         $F3
557C: C3 00 05       ADDD        #$0005
557F: 32 7F          LEAS        -$01,S
5581: BD D8 16       JSR         $D816
5584: C3 00 01       ADDD        #$0001
5587: FD 02 91       STD         $0291
558A: 35 02          PULS        A
558C: B7 02 AB       STA         $02AB
558F: 7F 02 A9       CLR         $02A9
5592: 7E D5 E4       JMP         $D5E4
------------------------------------------------
5595: 7D 02 AB       TST         $02AB
5598: 26 03          BNE         $559D
559A: C6 FF          LDB         #$FF
559C: 39             RTS  
------------------------------------------------
559D: B6 02 AB       LDA         $02AB
55A0: 34 02          PSHS        A
55A2: BD D5 E4       JSR         $D5E4
55A5: 5D             TSTB 
55A6: 2B 17          BMI         $55BF
55A8: 8E 01 C7       LDX         #$01C7
55AB: 6D 85          TST         B,X
55AD: 26 06          BNE         $55B5
55AF: D6 F2          LDB         $F2
55B1: 35 82          PULS        PC,A
55B3: 20 08          BRA         $55BD
------------------------------------------------
55B5: 6A E4          DEC         ,S
55B7: 26 04          BNE         $55BD
55B9: C6 FF          LDB         #$FF
55BB: 35 82          PULS        PC,A
------------------------------------------------
55BD: 20 23          BRA         $55E2
------------------------------------------------
55BF: DC F3          LDD         $F3
55C1: C3 00 06       ADDD        #$0006
55C4: FD 02 91       STD         $0291
55C7: 7F 02 A9       CLR         $02A9
55CA: CC 00 00       LDD         #$0000
55CD: FD 01 06       STD         $0106
55D0: 0D E8          TST         $E8
55D2: 26 09          BNE         $55DD
55D4: BD D5 E4       JSR         $D5E4
55D7: C6 FF          LDB         #$FF
55D9: 35 82          PULS        PC,A
55DB: 20 05          BRA         $55E2
------------------------------------------------
55DD: B6 02 AB       LDA         $02AB
55E0: A7 E4          STA         ,S
55E2: 20 BE          BRA         $55A2
------------------------------------------------
55E4: FC 02 91       LDD         $0291
55E7: 32 7F          LEAS        -$01,S
55E9: BD D8 16       JSR         $D816
55EC: C3 00 01       ADDD        #$0001
55EF: FD 02 91       STD         $0291
55F2: A6 E4          LDA         ,S
55F4: 81 F3          CMPA        #$F3
55F6: 27 42          BEQ         $563A
55F8: FC 02 91       LDD         $0291
55FB: 32 7F          LEAS        -$01,S
55FD: BD D8 16       JSR         $D816
5600: C3 00 01       ADDD        #$0001
5603: 32 7F          LEAS        -$01,S
5605: BD D8 16       JSR         $D816
5608: C3 00 01       ADDD        #$0001
560B: FD 02 91       STD         $0291
560E: 7C 02 A9       INC         $02A9
5611: 0F FD          CLR         $FD
5613: 35 02          PULS        A
5615: B7 01 01       STA         $0101
5618: 35 06          PULS        B,A
561A: B7 01 00       STA         $0100
561D: D7 F2          STB         $F2
561F: B7 02 AA       STA         $02AA
5622: D6 F2          LDB         $F2
5624: 8E 01 C7       LDX         #$01C7
5627: 6D 85          TST         B,X
5629: 26 0D          BNE         $5638
562B: B6 02 D0       LDA         $02D0
562E: 26 08          BNE         $5638
5630: BD D3 BB       JSR         $D3BB
5633: 73 01 02       COM         $0102
5636: D6 F2          LDB         $F2
5638: 20 1C          BRA         $5656
------------------------------------------------
563A: 32 61          LEAS        +$01,S
563C: FC 02 91       LDD         $0291
563F: 83 00 01       SUBD        #$0001
5642: FD 02 91       STD         $0291
5645: 86 01          LDA         #$01
5647: B7 01 00       STA         $0100
564A: B7 02 AA       STA         $02AA
564D: 0F F2          CLR         $F2
564F: 7F 01 01       CLR         $0101
5652: C6 FF          LDB         #$FF
5654: D7 FD          STB         $FD
5656: 39             RTS  
------------------------------------------------
5657: CE 00 01       LDU         #$0001
565A: 7F 01 01       CLR         $0101
565D: FC 02 AC       LDD         $02AC
5660: 10 83 00 03    CMPD        #$0003
5664: 25 69          BCS         $56CF
5666: B6 01 01       LDA         $0101
5669: 34 02          PSHS        A
566B: 34 40          PSHS        U
566D: FC 01 21       LDD         $0121
5670: B3 02 91       SUBD        $0291
5673: C3 00 03       ADDD        #$0003
5676: 1F 01          TFR         D,X
5678: CC 00 03       LDD         #$0003
567B: 34 06          PSHS        B,A
567D: FC 01 21       LDD         $0121
5680: BD D8 46       JSR         $D846
5683: FC 01 21       LDD         $0121
5686: E3 E1          ADDD        ,S++
5688: FD 01 21       STD         $0121
568B: FC 02 91       LDD         $0291
568E: 0D FD          TST         $FD
5690: 26 03          BNE         $5695
5692: 83 00 03       SUBD        #$0003		; get SEQRAM address
5695: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
5698: C3 00 01       ADDD        #$0001		; increment SEQRAM address
569B: 32 61          LEAS        +$01,S		; get next byte
569D: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
56A0: C3 00 01       ADDD        #$0001		; increment SEQRAM address
56A3: 32 61          LEAS        +$01,S		; get next byte
56A5: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
56A8: C3 00 01       ADDD        #$0001		; increment SEQRAM address
56AB: 32 61          LEAS        +$01,S		; get next byte
56AD: 7C 02 AB       INC         $02AB
56B0: DC F3          LDD         $F3
56B2: 32 7F          LEAS        -$01,S
56B4: BD D8 16       JSR         $D816
56B7: C3 00 01       ADDD        #$0001
56BA: 32 7F          LEAS        -$01,S
56BC: BD D8 16       JSR         $D816
56BF: C3 00 01       ADDD        #$0001
56C2: 35 04          PULS        B
56C4: 35 02          PULS        A
56C6: C3 00 03       ADDD        #$0003
56C9: BD D7 B2       JSR         $D7B2
56CC: 4F             CLRA 
56CD: 20 02          BRA         $56D1
------------------------------------------------
56CF: 86 FF          LDA         #$FF
56D1: 34 02          PSHS        A
56D3: FC 02 91       LDD         $0291
56D6: 0D FD          TST         $FD
56D8: 26 06          BNE         $56E0
56DA: 83 00 03       SUBD        #$0003
56DD: 7A 02 A9       DEC         $02A9
56E0: FD 02 91       STD         $0291
56E3: BD D7 3D       JSR         $D73D
56E6: 35 82          PULS        PC,A
------------------------------------------------
56E8: B6 02 AB       LDA         $02AB
56EB: 4A             DECA 
56EC: 27 4C          BEQ         $573A
56EE: B7 02 AB       STA         $02AB
56F1: FC 01 21       LDD         $0121
56F4: B3 02 91       SUBD        $0291
56F7: 1F 01          TFR         D,X
56F9: CC 00 03       LDD         #$0003
56FC: 34 06          PSHS        B,A
56FE: FC 02 91       LDD         $0291
5701: BD D8 66       JSR         $D866
5704: FC 01 21       LDD         $0121
5707: A3 E1          SUBD        ,S++
5709: FD 01 21       STD         $0121
570C: DC F3          LDD         $F3
570E: 32 7F          LEAS        -$01,S
5710: BD D8 16       JSR         $D816
5713: C3 00 01       ADDD        #$0001
5716: 32 7F          LEAS        -$01,S
5718: BD D8 16       JSR         $D816
571B: C3 00 01       ADDD        #$0001
571E: 35 04          PULS        B
5720: 35 02          PULS        A
5722: 83 00 03       SUBD        #$0003
5725: BD D7 B2       JSR         $D7B2
5728: 7A 02 A9       DEC         $02A9
572B: FC 02 91       LDD         $0291
572E: 83 00 03       SUBD        #$0003
5731: FD 02 91       STD         $0291
5734: BD D5 E4       JSR         $D5E4
5737: 4F             CLRA 
5738: 20 02          BRA         $573C
------------------------------------------------
573A: 86 FF          LDA         #$FF
573C: 39             RTS  
------------------------------------------------
573D: 7E D5 E4       JMP         $D5E4
------------------------------------------------
5740: BE 02 91       LDX         $0291
5743: B6 02 A9       LDA         $02A9
5746: 4A             DECA 
5747: 27 07          BEQ         $5750
5749: 0D FD          TST         $FD
574B: 26 03          BNE         $5750
574D: 4A             DECA 
574E: 30 1D          LEAX        -$03,X
5750: 30 1D          LEAX        -$03,X
5752: BF 02 91       STX         $0291
5755: B7 02 A9       STA         $02A9
5758: 7E D5 E4       JMP         $D5E4
------------------------------------------------
575B: B6 01 01       LDA         $0101
575E: 34 02          PSHS        A
5760: 34 40          PSHS        U
5762: FC 02 91       LDD         $0291
5765: 83 00 03       SUBD        #$0003
5768: 32 7F          LEAS        -$01,S
576A: BD D8 16       JSR         $D816
576D: C3 00 01       ADDD        #$0001
5770: A6 61          LDA         +$01,S
5772: A1 E4          CMPA        ,S
5774: 27 1C          BEQ         $5792
5776: A7 E4          STA         ,S
5778: 97 F2          STA         $F2
577A: 8E 01 C7       LDX         #$01C7
577D: 6D 86          TST         A,X
577F: 26 03          BNE         $5784
5781: BD D3 BB       JSR         $D3BB
5784: FC 02 91       LDD         $0291
5787: 83 00 03       SUBD        #$0003		; get SEQRAM address
578A: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
578D: C3 00 01       ADDD        #$0001		; increment SEQRAM address
5790: 20 06          BRA         $5798
------------------------------------------------
5792: FC 02 91       LDD         $0291		; get SEQRAM address
5795: 83 00 02       SUBD        #$0002		; -2
5798: ED E4          STD         ,S		; SEQRAM address to stack
579A: A6 62          LDA         +$02,S
579C: B7 02 AA       STA         $02AA
579F: EC E1          LDD         ,S++		; get SEQRAM address
57A1: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
57A4: C3 00 01       ADDD        #$0001		; increment SEQRAM address
57A7: 32 61          LEAS        +$01,S		; get next byte
57A9: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
57AC: C3 00 01       ADDD        #$0001		; increment SEQRAM address
57AF: 32 61          LEAS        +$01,S		; get next byte
57B1: 39             RTS  
------------------------------------------------
57B2: 1F 02          TFR         D,Y
57B4: 34 06          PSHS        B,A
57B6: DC F3          LDD         $F3		; get SEQRAM address
57B8: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
57BB: C3 00 01       ADDD        #$0001		; increment SEQRAM address
57BE: 32 61          LEAS        +$01,S		; get next byte
57C0: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
57C3: C3 00 01       ADDD        #$0001		; increment SEQRAM address
57C6: B6 02 AB       LDA         $02AB
57C9: A7 E4          STA         ,S
57CB: DC F3          LDD         $F3		; get SEQRAM address
57CD: C3 00 05       ADDD        #$0005		; +5
57D0: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
57D3: C3 00 01       ADDD        #$0001		; increment SEQRAM address
57D6: 32 61          LEAS        +$01,S		; get next byte
57D8: DC F3          LDD         $F3
57DA: BD E2 EF       JSR         $E2EF
57DD: FC 01 21       LDD         $0121
57E0: FD 01 1F       STD         $011F
57E3: 7E E2 B3       JMP         $E2B3

------------------------------------------------
--- transfer byte from stack to SEQRAM ---------
------------------------------------------------
57E6: 34 06          PSHS        B,A
57E8: 84 1F          ANDA        #$1F		; limit D to $1fff (1 page)
57EA: 1F 03          TFR         D,U
57EC: A6 E4          LDA         ,S		; get SEQRAM page from stack
57EE: 84 E0          ANDA        #$E0		; prepare outport
57F0: 44             LSRA 
57F1: 44             LSRA 
57F2: 44             LSRA 
57F3: 44             LSRA 
57F4: 34 01          PSHS        CC
57F6: 1A 50          ORCC        #$50		; disable FIRQ/IRQ		
57F8: B7 64 0F       STA         $640F		; select SEQRAM page
57FB: 88 0E          EORA        #$0E		
57FD: B7 64 0E       STA         $640E
5800: 5F             CLRB 
5801: F7 6C 00       STB         $6C00		; mapper = 0
5804: A6 65          LDA         +$05,S		; transfer byte from stack
5806: A7 C9 40 00    STA         +$4000,U	; ...to SEQRAM
580A: 5C             INCB 
580B: F7 6C 00       STB         $6C00		; mapper = 1
580E: FC 0B 8C       LDD         $0B8C
5811: FD 64 0E       STD         $640E		; restore outport
5814: 35 87          PULS        PC,B,A,CC

------------------------------------------------
--- transfer byte from SEQRAM to stack ---------
------------------------------------------------
5816: 34 06          PSHS        B,A
5818: 84 1F          ANDA        #$1F		; limit D to max. $1fff
581A: 1F 03          TFR         D,U
581C: A6 E4          LDA         ,S		; get value from stack
581E: 84 E0          ANDA        #$E0		; select bits 7 to 5
5820: 44             LSRA 			; and prepare it for use as
5821: 44             LSRA 			; outport value
5822: 44             LSRA 
5823: 44             LSRA 
5824: 34 01          PSHS        CC
5826: 1A 50          ORCC        #$50		; disable FIRQ/IRQ
5828: B7 64 0F       STA         $640F		; select SEQRAM area
582B: 88 0E          EORA        #$0E		
582D: B7 64 0E       STA         $640E
5830: 5F             CLRB 
5831: F7 6C 00       STB         $6C00		; mapper = 0
5834: A6 C9 40 00    LDA         +$4000,U
5838: A7 65          STA         +$05,S		; store value to stack
583A: 5C             INCB 			; mapper = 1
583B: F7 6C 00       STB         $6C00
583E: FC 0B 8C       LDD         $0B8C		; restore outport
5841: FD 64 0E       STD         $640E
5844: 35 87          PULS        PC,B,A,CC

------------------------------------------------
--- transfer X bytes within SEQRAM (upwards) ---
------------------------------------------------
5846: 30 84          LEAX        ,X		; if X=0 RTS
5848: 27 1B          BEQ         $5865
584A: EE 62          LDU         +$02,S		; return address to U
584C: 27 17          BEQ         $5865		; if U=0 RTS
584E: 32 7D          LEAS        -$03,S		; create space on stack 
5850: 83 00 01       SUBD        #$0001		; prepare SEQRAM page
5853: BD D8 16       JSR         $D816		; transfer byte from SEQRAM
5856: ED 61          STD         +$01,S		; write back outport value
5858: E3 65          ADDD        +$05,S		; add page offset (?)
585A: BD D7 E6       JSR         $D7E6		; transfer byte from stack
585D: EC 61          LDD         +$01,S		; get outport value
585F: 30 1F          LEAX        -$01,X		; decrement X
5861: 26 ED          BNE         $5850		; ...until X=0
5863: 32 63          LEAS        +$03,S		; correct stack
5865: 39             RTS  

------------------------------------------------
--- transfer X bytes within SEQRAM (downwards) -
------------------------------------------------
5866: 30 84          LEAX        ,X		; if X=0 RTS
5868: 27 1E          BEQ         $5888
586A: EE 62          LDU         +$02,S		; return address to U
586C: 27 1A          BEQ         $5888		; if U=0 RTS
586E: 32 7D          LEAS        -$03,S		; create space on stack
5870: 83 00 01       SUBD        #$0001		; prepare SEQRAM page
5873: C3 00 01       ADDD        #$0001
5876: BD D8 16       JSR         $D816		; transfer byte from SEQRAM
5879: ED 61          STD         +$01,S		; write back outport value
587B: A3 65          SUBD        +$05,S		; subtract page offset (?)
587D: BD D7 E6       JSR         $D7E6		; transfer byte from stack
5880: EC 61          LDD         +$01,S		; get outport value
5882: 30 1F          LEAX        -$01,X		; decrement X
5884: 26 ED          BNE         $5873		; ...until X=0
5886: 32 63          LEAS        +$03,S		; correct stack
5888: 39             RTS  

------------------------------------------------
5889: 10 FE 02 A3    LDS         $02A3		; move stack to [$02a3]
588D: BD D8 99       JSR         $D899		; 
5890: CE AA DF       LDU         #$AADF
5893: BD D9 E9       JSR         $D9E9
5896: 7E D9 D4       JMP         $D9D4

------------------------------------------------
--- floppy related magic -----------------------
------------------------------------------------
5899: 0D E5          TST         $E5
589B: 2B 55          BMI         $58F2		; RTS
589D: BD 9A 54       JSR         $9A54
58A0: BD CA 2E       JSR         $CA2E
58A3: BD CA 99       JSR         $CA99
58A6: 96 EE          LDA         $EE
58A8: 81 02          CMPA        #$02		; if $ee=2
58AA: 26 20          BNE         $58CC
58AC: 10 BE 01 1B    LDY         $011B		;   Y=$011b
58B0: 10 8C 80 00    CMPY        #$8000		;   if Y<$8000
58B4: 24 09          BCC         $58BF
58B6: EE A4          LDU         ,Y		;     U=[Y]
58B8: BD 84 9F       JSR         $849F		;     [$10]=$10, $10=Y, $12++
58BB: 1F 32          TFR         U,Y
58BD: 20 F1          BRA         $58B0
------------------------------------------------;   else
58BF: 10 BF 01 1B    STY         $011B		;     $011b = Y
58C3: 10 BF 01 1D    STY         $011D		;     $011d = Y
58C7: BD C6 CA       JSR         $C6CA
58CA: 20 0C          BRA         $58D8		;
------------------------------------------------
58CC: 81 04          CMPA        #$04		; else 
58CE: 26 04          BNE         $58D4		;   if $ee=4
58D0: C6 03          LDB         #$03		;     B=3
58D2: 20 02          BRA         $58D6
------------------------------------------------;   else
58D4: C6 00          LDB         #$00		;     B=0
58D6: D7 EE          STB         $EE		;   $ee=B
58D8: DC F0          LDD         $F0		; D=$F0
58DA: F3 02 C7       ADDD        $02C7
58DD: FD 02 8F       STD         $028F
58E0: BD CD 9E       JSR         $CD9E
58E3: 73 01 02       COM         $0102		; $0102 = !$0102
58E6: BD DC 88       JSR         $DC88
58E9: CE AA B0       LDU         #$AAB0
58EC: BD D9 E9       JSR         $D9E9
58EF: BD 8B 35       JSR         $8B35
58F2: 39             RTS  

------------------------------------------------
58F3: AD C4          JSR         ,U
58F5: CC 06 08       LDD         #$0608		; set outport = $0608
58F8: FD 64 0E       STD         $640E
58FB: 39             RTS  

------------------------------------------------
--- $FFEC: move byte form SEQRAM to stack ------
------------------------------------------------
58FC: 34 06          PSHS        B,A
58FE: 6F E2          CLR         ,-S
5900: BD D8 16       JSR         $D816		; byte from SEQRAM to stack
5903: A6 E0          LDA         ,S+
5905: A7 64          STA         +$04,S
5907: CC 06 08       LDD         #$0608		; set outport = $0608
590A: FD 64 0E       STD         $640E
590D: 35 86          PULS        PC,B,A

------------------------------------------------
--- $FFEA; move byte from stack to SEQRAM  -----
------------------------------------------------
590F: 34 06          PSHS        B,A
5911: A6 64          LDA         +$04,S		; get byte to transfer
5913: 34 02          PSHS        A
5915: EC 61          LDD         +$01,S		; get SEQRAM address
5917: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
591A: 32 61          LEAS        +$01,S		; get next byte
591C: CC 06 08       LDD         #$0608		; set outport = $0608
591F: FD 64 0E       STD         $640E
5922: 35 86          PULS        PC,B,A

------------------------------------------------
--- $FFE8: transfer X bytes upwards SEQRAM  ----
------------------------------------------------
5924: 34 06          PSHS        B,A		; save D
5926: EC 64          LDD         +$04,S		; move return address to [S]
5928: 34 06          PSHS        B,A		
592A: EC 62          LDD         +$02,S		; restore D
592C: BD D8 46       JSR         $D846		; transfer X bytes SEQR. up
592F: 32 62          LEAS        +$02,S		; discard moved address
5931: CE 06 08       LDU         #$0608		; set outport = $0608
5934: FF 64 0E       STU         $640E
5937: 35 C0          PULS        PC,U

------------------------------------------------
--- $FFE6: transfer X bytes downwards SEQRAM  --
------------------------------------------------
5939: 34 06          PSHS        B,A		; save D
593B: EC 64          LDD         +$04,S		; move return address to [S]
593D: 34 06          PSHS        B,A
593F: EC 62          LDD         +$02,S		; restore D
5941: BD D8 66       JSR         $D866		; transfer X bytes SEQR. down
5944: 32 62          LEAS        +$02,S		; discard moved address
5946: CE 06 08       LDU         #$0608		; set outport = $0608
5949: FF 64 0E       STU         $640E
594C: 35 C0          PULS        PC,U

------------------------------------------------
594E: BE 01 0F       LDX         $010F
5951: A6 01          LDA         +$01,X
5953: 4C             INCA 
5954: 91 FC          CMPA        $FC
5956: 10 25 00 72    LBCS        $59CC
595A: BD 86 02       JSR         $8602
595D: FC 01 21       LDD         $0121
5960: FD 02 9F       STD         $029F
5963: 10 BE 00 F0    LDY         $00F0
5967: FC 02 C7       LDD         $02C7
596A: 31 AB          LEAY        D,Y
596C: 10 BF 02 8F    STY         $028F
5970: 10 BF 02 CC    STY         $02CC
5974: CE C9 EF       LDU         #$C9EF
5977: 34 06          PSHS        B,A
5979: CC 72 6F       LDD         #$726F		; jump to ROMLOW $426f
597C: 34 06          PSHS        B,A		;
597E: CC 0E 08       LDD         #$0E08		;
5981: BD 85 B4       JSR         $85B4		;
5984: 10 BF 02 8F    STY         $028F
5988: 10 BF 02 91    STY         $0291
598C: BD C7 D4       JSR         $C7D4
598F: 34 06          PSHS        B,A
5991: CC 74 7C       LDD         #$747C		; jump to ROMLOW $447c
5994: 34 06          PSHS        B,A		;
5996: CC 0E 08       LDD         #$0E08		;		
5999: BD 85 B4       JSR         $85B4		;
599C: 4D             TSTA 
599D: 26 25          BNE         $59C4
599F: FC 02 9F       LDD         $029F
59A2: FD 01 1F       STD         $011F
59A5: FC 02 A7       LDD         $02A7
59A8: C3 00 01       ADDD        #$0001
59AB: BD D0 3E       JSR         $D03E
59AE: FD 01 06       STD         $0106
59B1: 7F 01 0B       CLR         $010B
59B4: BD C6 63       JSR         $C663
59B7: BD CD 9E       JSR         $CD9E
59BA: 73 01 02       COM         $0102
59BD: 86 03          LDA         #$03
59BF: 97 EE          STA         $EE
59C1: 4F             CLRA 
59C2: 20 05          BRA         $59C9
------------------------------------------------
59C4: BD C6 CA       JSR         $C6CA
59C7: 86 FF          LDA         #$FF
59C9: BD 86 93       JSR         $8693
59CC: 39             RTS  

------------------------------------------------
--- master routine (3) via $f76c ---------------
--- S: $0f58	   ROMLOW: $0000 ---------------
------------------------------------------------
59CD: BD C4 03       JSR         $C403
59D0: 10 FF 02 A3    STS         $02A3
59D4: BD 84 29       JSR         $8429		; handler moving
59D7: C6 1A          LDB         #$1A		; 26
59D9: 96 EE          LDA         $EE
59DB: 3D             MUL  
59DC: E3 22          ADDD        +$02,Y		; offset
59DE: 8E DA 02       LDX         #$DA02		; table base
59E1: AD 9B          JSR         [D,X]
59E3: 20 EF          BRA         $59D4		; loop

------------------------------------------------
59E5: BD 84 9F       JSR         $849F
59E8: 39             RTS  
------------------------------------------------
59E9: 34 20          PSHS        Y
59EB: 7D 02 C6       TST         $02C6
59EE: 26 10          BNE         $5A00
59F0: 0D FE          TST         $FE
59F2: 26 0C          BNE         $5A00
59F4: BD 84 79       JSR         $8479
59F7: ED 24          STD         +$04,Y
59F9: EF 22          STU         +$02,Y
59FB: BD 84 AE       JSR         $84AE
59FE: 0B 4F	     fdb	 $0B4F
5A00: 35 A0          PULS        PC,Y

------------------------------------------------
--- subroutine vectors for master routine (3) --
------------------------------------------------
5A02: CE 0B	     FDB	 $CE0B
5A04: CE 8B	     FDB	 $CE8B
5A06: CF A4	     FDB	 $CFA4
5A08: C5 7D	     FDB	 $C57D
5A0a: C8 61	     FDB	 $C861
5A0c: C8 67	     FDB	 $C867
5A0e: C8 F1	     FDB	 $C8F1
5A10: D9 E5	     FDB	 $D9E5
5A12: D9 E5	     FDB	 $D9E5
5A14: D9 E5	     FDB	 $D9E5
5A16: D9 E5	     FDB	 $D9E5
5A18: C5 2F	     FDB	 $C52F
5A1a: C7 5E	     FDB	 $C72E
5A1c: D9 E5	     FDB	 $D9E5
5A1e: D9 E5	     FDB	 $D9E5
5A20: D0 24	     FDB	 $D024
5A22: C5 F1	     FDB	 $C5F1
5A24: C8 63	     FDB	 $C863
5A26: D9 E5	     FDB	 $D9E5
5A28: C9 93	     FDB	 $C993
5A2a: DD 00	     FDB	 $DD00
5A2c: DD 5B	     FDB	 $DD5B
5A2e: D9 E5	     FDB	 $D9E5
5A30: D9 E5	     FDB	 $D9E5
5A32: D9 E5	     FDB	 $D9E5
5A34: D9 E5	     FDB	 $D9E5
5A36: D9 E5	     FDB	 $D9E5
5A38: D9 E5	     FDB	 $D9E5
5A3a: D9 E5	     FDB	 $D9E5
5A3c: D9 E5	     FDB	 $D9E5
5A3e: D9 E5	     FDB	 $D9E5
5A40: C6 56	     FDB	 $C656
5A42: C7 0C	     FDB	 $C70C
5A44: DD 0A	     FDB	 $DD0A
5A46: DD 5E	     FDB	 $DD5E
5A48: DD BD	     FDB	 $DDBD
5A4a: DD FF	     FDB	 $DDFF
5A4c: D9 E5	     FDB	 $D9E5
5A4e: D9 E5	     FDB	 $D9E5
5A50: CE 53	     FDB	 $CE53
5A52: CE 80	     FDB	 $CEB0
5A54: D9 E5	     FDB	 $D9E5
5A56: D9 E5	     FDB	 $D9E5
5A58: C8 89	     FDB	 $C889
5A5a: C9 26	     FDB	 $C926
5A5c: D9 E5	     FDB	 $D9E5
5A5e: D9 E5	     FDB	 $D9E5
5A60: D9 E5	     FDB	 $D9E5
5A62: D9 E5	     FDB	 $D9E5
5A64: D9 E5	     FDB	 $D9E5
5A66: D9 E5	     FDB	 $D9E5
5A68: C6 8F	     FDB	 $C68F
5A6a: D9 E5	     FDB	 $D9E5
5A6c: D9 E5	     FDB	 $D9E5
5A6e: D9 E5	     FDB	 $D9E5
5A70: D9 E5	     FDB	 $D9E5
5A72: D9 E5	     FDB	 $D9E5
5A74: D9 E5	     FDB	 $D9E5
5A76: C9 C9	     FDB	 $C9C9
5A78: DD 22	     FDB	 $DD22
5A7a: D9 E5	     FDB	 $D9E5
5A7c: D9 E5	     FDB	 $D9E5
5A7e: D9 E5	     FDB	 $D9E5
5A80: D9 E5	     FDB	 $D9E5
5A82: C6 85	     FDB	 $C685
5A84: D9 E5	     FDB	 $D9E5
5A86: D9 E5	     FDB	 $D9E5
5A88: D0 24	     FDB	 $D024
5A8a: C5 F1	     FDB	 $C5F1
5A8c: D9 E5	     FDB	 $D9E5
5A8e: D9 E5	     FDB	 $D9E5
5A90: DB ED	     FDB	 $DBED
5A92: DC 25	     FDB	 $DC25
5A94: DD 44	     FDB	 $DD44
5A96: DD B1	     FDB	 $DDB1
5A98: D9 E5	     FDB	 $D9E5
5A9a: D9 E5	     FDB	 $D9E5
5A9c: DB D8	     FDB	 $DBD8

------------------------------------------------
5A9E: 7A 01 0D       DEC         $010D
5AA1: 2A 1E          BPL         $5AC1
5AA3: 86 10          LDA         #$10
5AA5: 7A 01 0E       DEC         $010E
5AA8: 2A 08          BPL         $5AB2
5AAA: 8A 20          ORA         #$20
5AAC: F6 02 CB       LDB         $02CB
5AAF: F7 01 0E       STB         $010E
5AB2: D6 E6          LDB         $E6
5AB4: 3D             MUL  
5AB5: D7 FA          STB         $FA
5AB7: 86 01          LDA         #$01
5AB9: 97 FB          STA         $FB
5ABB: F6 02 CA       LDB         $02CA
5ABE: F7 01 0D       STB         $010D
5AC1: 39             RTS  
------------------------------------------------
5AC2: 34 26          PSHS        Y,B,A
5AC4: BE 01 0F       LDX         $010F
5AC7: E6 02          LDB         +$02,X
5AC9: 4F             CLRA 
5ACA: 34 06          PSHS        B,A
5ACC: EC 64          LDD         +$04,S
5ACE: 10 A3 E4       CMPD        ,S
5AD1: 25 04          BCS         $5AD7
5AD3: A3 E4          SUBD        ,S
5AD5: 20 F7          BRA         $5ACE
------------------------------------------------
5AD7: 32 61          LEAS        +$01,S
5AD9: E7 E4          STB         ,S
5ADB: E6 02          LDB         +$02,X
5ADD: E0 E4          SUBB        ,S
5ADF: F7 01 0C       STB         $010C
5AE2: 86 06          LDA         #$06
5AE4: B7 01 0B       STA         $010B
5AE7: E6 E0          LDB         ,S+
5AE9: 26 05          BNE         $5AF0
5AEB: CC 00 00       LDD         #$0000
5AEE: 20 15          BRA         $5B05
------------------------------------------------
5AF0: F6 02 CA       LDB         $02CA
5AF3: 5C             INCB 
5AF4: 34 04          PSHS        B
5AF6: F6 01 0C       LDB         $010C
5AF9: 3D             MUL  
5AFA: E1 E4          CMPB        ,S
5AFC: 25 05          BCS         $5B03
5AFE: E0 E4          SUBB        ,S
5B00: 4C             INCA 
5B01: 20 F7          BRA         $5AFA
------------------------------------------------
5B03: 32 61          LEAS        +$01,S
5B05: 34 01          PSHS        CC
5B07: 1A 50          ORCC        #$50		; disable FIRQ/IRQ
5B09: F7 01 0D       STB         $010D
5B0C: B7 01 0E       STA         $010E
5B0F: 35 A7          PULS        PC,Y,B,A,CC
------------------------------------------------
5B11: 34 16          PSHS        X,B,A
5B13: BE 01 0F       LDX         $010F
5B16: E6 02          LDB         +$02,X
5B18: 86 06          LDA         #$06
5B1A: 3D             MUL  
5B1B: E1 61          CMPB        +$01,S
5B1D: 25 05          BCS         $5B24
5B1F: E0 61          SUBB        +$01,S
5B21: 4C             INCA 
5B22: 20 F7          BRA         $5B1B
------------------------------------------------
5B24: 5D             TSTB 
5B25: 26 2B          BNE         $5B52
5B27: 34 02          PSHS        A
5B29: B6 02 CA       LDA         $02CA
5B2C: 4C             INCA 
5B2D: F6 01 0E       LDB         $010E
5B30: 3D             MUL  
5B31: FB 01 0D       ADDB        $010D
5B34: E1 62          CMPB        +$02,S
5B36: 25 05          BCS         $5B3D
5B38: E0 62          SUBB        +$02,S
5B3A: 4C             INCA 
5B3B: 20 F7          BRA         $5B34
------------------------------------------------
5B3D: B7 01 0E       STA         $010E
5B40: F7 01 0D       STB         $010D
5B43: 35 02          PULS        A
5B45: 4A             DECA 
5B46: B7 02 CB       STA         $02CB
5B49: A6 61          LDA         +$01,S
5B4B: 4A             DECA 
5B4C: B7 02 CA       STA         $02CA
5B4F: 5F             CLRB 
5B50: 20 02          BRA         $5B54
------------------------------------------------
5B52: C6 FF          LDB         #$FF
5B54: E7 61          STB         +$01,S
5B56: 35 96          PULS        PC,X,B,A
------------------------------------------------
5B58: BE 01 0F       LDX         $010F
5B5B: E6 84          LDB         ,X
5B5D: F7 02 CB       STB         $02CB
5B60: E6 01          LDB         +$01,X
5B62: F7 02 CA       STB         $02CA
5B65: 4F             CLRA 
5B66: C1 17          CMPB        #$17
5B68: 27 02          BEQ         $5B6C
5B6A: 86 02          LDA         #$02
5B6C: 97 E4          STA         $E4
5B6E: 39             RTS  
------------------------------------------------
5B6F: 7D 02 C6       TST         $02C6
5B72: 10 26 00 61    LBNE        $5BD7
5B76: 7F 01 0D       CLR         $010D
5B79: 7F 01 0E       CLR         $010E
5B7C: 7D 02 C3       TST         $02C3
5B7F: 2A 05          BPL         $5B86
5B81: D6 E6          LDB         $E6
5B83: 5C             INCB 
5B84: 20 02          BRA         $5B88
------------------------------------------------
5B86: D6 E7          LDB         $E7
5B88: 5D             TSTB 
5B89: 27 1B          BEQ         $5BA6
5B8B: 96 E6          LDA         $E6
5B8D: B7 02 C2       STA         $02C2
5B90: 5A             DECB 
5B91: D7 E6          STB         $E6
5B93: BD DC 9C       JSR         $DC9C
5B96: D7 F9          STB         $F9
5B98: 96 EE          LDA         $EE
5B9A: B7 02 C1       STA         $02C1
5B9D: 86 05          LDA         #$05
5B9F: 97 EE          STA         $EE
5BA1: CE AA 8F       LDU         #$AA8F
5BA4: 20 23          BRA         $5BC9
------------------------------------------------
5BA6: 96 EE          LDA         $EE
5BA8: 81 02          CMPA        #$02
5BAA: 26 1A          BNE         $5BC6
5BAC: B7 02 C1       STA         $02C1
5BAF: 86 05          LDA         #$05
5BB1: 97 EE          STA         $EE
5BB3: CE C1 ED       LDU         #$C1ED
5BB6: BD D9 E9       JSR         $D9E9
5BB9: CE AA 83       LDU         #$AA83
5BBC: F6 00 EF       LDB         $00EF
5BBF: CA 20          ORB         #$20
5BC1: F7 00 EF       STB         $00EF
5BC4: 20 03          BRA         $5BC9
------------------------------------------------
5BC6: CE AA 8F       LDU         #$AA8F
5BC9: 7D 02 C3       TST         $02C3
5BCC: 26 06          BNE         $5BD4
5BCE: BD DC 88       JSR         $DC88
5BD1: BD D9 E9       JSR         $D9E9
5BD4: BD 9A 6F       JSR         $9A6F
5BD7: 39             RTS  
------------------------------------------------
5BD8: B6 02 C1       LDA         $02C1
5BDB: 81 04          CMPA        #$04
5BDD: 26 0A          BNE         $5BE9
5BDF: 0F F9          CLR         $F9
5BE1: B6 02 C2       LDA         $02C2
5BE4: 97 E6          STA         $E6
5BE6: 7E C6 85       JMP         $C685
------------------------------------------------
5BE9: BD 84 9F       JSR         $849F
5BEC: 39             RTS  
------------------------------------------------
5BED: B6 00 EF       LDA         $00EF
5BF0: 84 DF          ANDA        #$DF
5BF2: B7 00 EF       STA         $00EF
5BF5: B6 02 C2       LDA         $02C2
5BF8: 97 E6          STA         $E6
5BFA: E6 26          LDB         +$06,Y
5BFC: BD 84 9F       JSR         $849F
5BFF: 34 04          PSHS        B
5C01: B6 02 C1       LDA         $02C1
5C04: 81 02          CMPA        #$02
5C06: 26 03          BNE         $5C0B
5C08: BD C6 CA       JSR         $C6CA
5C0B: B6 02 C1       LDA         $02C1
5C0E: BD CB BD       JSR         $CBBD
5C11: 35 04          PULS        B
5C13: BD C9 A0       JSR         $C9A0
5C16: BD CD 9E       JSR         $CD9E
5C19: 73 01 02       COM         $0102
5C1C: DC F0          LDD         $F0
5C1E: F3 02 C7       ADDD        $02C7
5C21: FD 02 8F       STD         $028F
5C24: 39             RTS  
------------------------------------------------
5C25: BD 84 9F       JSR         $849F
5C28: F6 00 EF       LDB         $00EF
5C2B: 1F 98          TFR         B,A
5C2D: C4 20          ANDB        #$20
5C2F: 27 14          BEQ         $5C45
5C31: 84 DF          ANDA        #$DF
5C33: B7 00 EF       STA         $00EF
5C36: F6 02 C1       LDB         $02C1
5C39: D7 EE          STB         $EE
5C3B: 7D 02 95       TST         $0295
5C3E: 2B 03          BMI         $5C43
5C40: BD DE 8B       JSR         $DE8B
5C43: 20 3C          BRA         $5C81
------------------------------------------------
5C45: 0A F9          DEC         $F9
5C47: 26 38          BNE         $5C81
5C49: CC FF FF       LDD         #$FFFF
5C4C: FD 01 11       STD         $0111
5C4F: BD DE 9C       JSR         $DE9C
5C52: 7D 02 C3       TST         $02C3
5C55: 2A 07          BPL         $5C5E
5C57: BD DC 9C       JSR         $DC9C
5C5A: D7 F9          STB         $F9
5C5C: 20 21          BRA         $5C7F
------------------------------------------------
5C5E: B6 02 C2       LDA         $02C2
5C61: 97 E6          STA         $E6
5C63: F6 02 C1       LDB         $02C1
5C66: C1 02          CMPB        #$02
5C68: 26 13          BNE         $5C7D
5C6A: F6 00 EF       LDB         $00EF
5C6D: CA 20          ORB         #$20
5C6F: F7 00 EF       STB         $00EF
5C72: BD DC 88       JSR         $DC88
5C75: CE AA 83       LDU         #$AA83
5C78: BD D9 E9       JSR         $D9E9
5C7B: 20 02          BRA         $5C7F
------------------------------------------------
5C7D: D7 EE          STB         $EE
5C7F: 20 06          BRA         $5C87
------------------------------------------------
5C81: BD DF 5E       JSR         $DF5E
5C84: BD DE 9C       JSR         $DE9C
5C87: 39             RTS  
------------------------------------------------
5C88: B6 01 00       LDA         $0100
5C8B: 43             COMA 
5C8C: 5F             CLRB 
5C8D: 7D 02 95       TST         $0295
5C90: 2B 02          BMI         $5C94
5C92: CA 01          ORB         #$01
5C94: 7D 02 C3       TST         $02C3
5C97: 27 02          BEQ         $5C9B
5C99: CA 80          ORB         #$80
5C9B: 39             RTS  
------------------------------------------------
5C9C: BE 01 0F       LDX         $010F
5C9F: A6 02          LDA         +$02,X
5CA1: C6 06          LDB         #$06
5CA3: 3D             MUL  
5CA4: 39             RTS  
------------------------------------------------
5CA5: 0D E5          TST         $E5
5CA7: 2B 2D          BMI         $5CD6
5CA9: 96 EE          LDA         $EE
5CAB: 81 01          CMPA        #$01
5CAD: 26 12          BNE         $5CC1
5CAF: 96 EF          LDA         $EF
5CB1: 85 04          BITA        #$04
5CB3: 27 07          BEQ         $5CBC
5CB5: CE 00 06       LDU         #$0006
5CB8: C6 FF          LDB         #$FF
5CBA: 20 03          BRA         $5CBF
------------------------------------------------
5CBC: CE 00 0C       LDU         #$000C
5CBF: 20 13          BRA         $5CD4
------------------------------------------------
5CC1: 81 05          CMPA        #$05
5CC3: 26 0C          BNE         $5CD1
5CC5: BD E0 F8       JSR         $E0F8
5CC8: 5D             TSTB 
5CC9: 27 01          BEQ         $5CCC
5CCB: 39             RTS  
------------------------------------------------
5CCC: CE 00 0C       LDU         #$000C
5CCF: 20 03          BRA         $5CD4
------------------------------------------------
5CD1: CE 00 0C       LDU         #$000C
5CD4: 20 05          BRA         $5CDB
------------------------------------------------
5CD6: CE 00 0A       LDU         #$000A
5CD9: C6 FF          LDB         #$FF
5CDB: BD 84 79       JSR         $8479
5CDE: EF 22          STU         +$02,Y
5CE0: E7 24          STB         +$04,Y
5CE2: 86 FF          LDA         #$FF
5CE4: A7 26          STA         +$06,Y
5CE6: BD 84 AE       JSR         $84AE
5CE9: 0B 6D	     fdb	 $0B6D
5CEB: 11 83 00 0C    CMPU        #$000C                                       
5CEF: 26 05          BNE         $5CF6
5CF1: BD 8B 35       JSR         $8B35
5CF4: 20 09          BRA         $5CFF
------------------------------------------------
5CF6: 11 83 00 0A    CMPU        #$000A
5CFA: 26 03          BNE         $5CFF
5CFC: BD 8B 39       JSR         $8B39
5CFF: 39             RTS  
------------------------------------------------
5D00: BD E1 AF       JSR         $E1AF
5D03: BD DE 8B       JSR         $DE8B
5D06: BD DE 9C       JSR         $DE9C
5D09: 39             RTS  
------------------------------------------------
5D0A: BD E1 AF       JSR         $E1AF
5D0D: 7D 02 95       TST         $0295
5D10: 2B 03          BMI         $5D15
5D12: BD DE 8B       JSR         $DE8B
5D15: 96 EE          LDA         $EE
5D17: 81 02          CMPA        #$02
5D19: 26 03          BNE         $5D1E
5D1B: BD DF 49       JSR         $DF49
5D1E: BD DE 9C       JSR         $DE9C
5D21: 39             RTS  
------------------------------------------------
5D22: BD E1 AF       JSR         $E1AF
5D25: BD DE 8B       JSR         $DE8B
5D28: 7D 02 C4       TST         $02C4
5D2B: 26 10          BNE         $5D3D
5D2D: FC 01 04       LDD         $0104
5D30: 2B 09          BMI         $5D3B
5D32: 26 04          BNE         $5D38
5D34: 5C             INCB 
5D35: FD 01 04       STD         $0104
5D38: BD DF 71       JSR         $DF71
5D3B: 20 03          BRA         $5D40
------------------------------------------------
5D3D: 7F 02 C4       CLR         $02C4
5D40: BD DE 9C       JSR         $DE9C
5D43: 39             RTS  
------------------------------------------------
5D44: BD E0 F8       JSR         $E0F8
5D47: 5D             TSTB 
5D48: 26 14          BNE         $5D5E
5D4A: B6 02 C1       LDA         $02C1
5D4D: 81 02          CMPA        #$02
5D4F: 26 06          BNE         $5D57
5D51: 96 F9          LDA         $F9
5D53: 81 0C          CMPA        #$0C
5D55: 23 07          BLS         $5D5E
5D57: BD 84 9F       JSR         $849F
5D5A: 39             RTS  
------------------------------------------------
5D5B: BD E0 BE       JSR         $E0BE
5D5E: BD E0 E2       JSR         $E0E2
5D61: BD E1 5D       JSR         $E15D
5D64: BD DF FE       JSR         $DFFE
5D67: FC 02 AC       LDD         $02AC
5D6A: 10 83 00 03    CMPD        #$0003
5D6E: 24 06          BCC         $5D76
5D70: BD 84 9F       JSR         $849F
5D73: 7E D8 89       JMP         $D889
------------------------------------------------
5D76: 86 00          LDA         #$00
5D78: 34 02          PSHS        A
5D7A: EC 24          LDD         +$04,Y
5D7C: C4 7C          ANDB        #$7C
5D7E: 58             LSLB 
5D7F: DA F6          ORB         $F6
5D81: 34 06          PSHS        B,A
5D83: FC 01 1F       LDD         $011F		; get SEQRAM address
5D86: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
5D89: C3 00 01       ADDD        #$0001		; increment SEQRAM address
5D8C: 32 61          LEAS        +$01,S		; get next byte
5D8E: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
5D91: C3 00 01       ADDD        #$0001		; increment SEQRAM address
5D94: 32 61          LEAS        +$01,S		; get next byte
5D96: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
5D99: C3 00 01       ADDD        #$0001		; increment SEQRAM address
5D9C: 32 61          LEAS        +$01,S		; get next byte
5D9E: FD 01 1F       STD         $011F		; write back SEQRAM address
5DA1: 83 00 01       SUBD        #$0001		; -1
5DA4: FD 02 9D       STD         $029D		; store SEQRAM address -1
5DA7: BD DF DB       JSR         $DFDB
5DAA: 73 02 A6       COM         $02A6
5DAD: BD E2 B3       JSR         $E2B3
5DB0: 39             RTS  
------------------------------------------------
5DB1: 96 F9          LDA         $F9
5DB3: 81 0C          CMPA        #$0C
5DB5: 23 04          BLS         $5DBB
5DB7: BD 84 9F       JSR         $849F
5DBA: 39             RTS  
------------------------------------------------
5DBB: BD E0 E2       JSR         $E0E2
5DBE: BD E1 5D       JSR         $E15D
5DC1: 34 20          PSHS        Y
5DC3: 8E 01 1B       LDX         #$011B
5DC6: EE 84          LDU         ,X
5DC8: 11 83 FF FF    CMPU        #$FFFF
5DCC: 27 2B          BEQ         $5DF9
5DCE: A6 44          LDA         +$04,U
5DD0: A1 24          CMPA        +$04,Y
5DD2: 26 1F          BNE         $5DF3
5DD4: EC C4          LDD         ,U
5DD6: ED 84          STD         ,X
5DD8: 2A 03          BPL         $5DDD
5DDA: BF 01 1D       STX         $011D
5DDD: 34 40          PSHS        U
5DDF: A6 43          LDA         +$03,U
5DE1: 2A 03          BPL         $5DE6
5DE3: BD DF FE       JSR         $DFFE
5DE6: 35 20          PULS        Y
5DE8: BD E5 10       JSR         $E510
5DEB: BD 84 9F       JSR         $849F
5DEE: CE FF FF       LDU         #$FFFF
5DF1: 20 04          BRA         $5DF7
------------------------------------------------
5DF3: 30 C4          LEAX        ,U
5DF5: EE C4          LDU         ,U
5DF7: 20 CF          BRA         $5DC8
------------------------------------------------
5DF9: 35 20          PULS        Y
5DFB: BD 84 9F       JSR         $849F
5DFE: 39             RTS  
------------------------------------------------
5DFF: 6D 24          TST         +$04,Y
5E01: 2B 42          BMI         $5E45
5E03: EC 24          LDD         +$04,Y
5E05: 34 06          PSHS        B,A
5E07: BD 84 9F       JSR         $849F
5E0A: 10 8E 00 00    LDY         #$0000
5E0E: BD DF FE       JSR         $DFFE
5E11: FC 02 AC       LDD         $02AC
5E14: 10 83 00 02    CMPD        #$0002
5E18: 24 03          BCC         $5E1D
5E1A: 7E D8 89       JMP         $D889
------------------------------------------------
5E1D: BD E1 5D       JSR         $E15D
5E20: A6 E4          LDA         ,S
5E22: 48             LSLA 
5E23: 48             LSLA 
5E24: 48             LSLA 
5E25: 9A F6          ORA         $F6
5E27: 8B B0          ADDA        #$B0
5E29: A7 E4          STA         ,S
5E2B: FC 01 1F       LDD         $011F		; get SEQRAM address
5E2E: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
5E31: C3 00 01       ADDD        #$0001		; increment SEQRAM address
5E34: 32 61          LEAS        +$01,S		; get next byte
5E36: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
5E39: C3 00 01       ADDD        #$0001		; increment SEQRAM address
5E3C: 32 61          LEAS        +$01,S		; get next byte
5E3E: FD 01 1F       STD         $011F		; write back SEQRAM address
5E41: BD E2 B3       JSR         $E2B3
5E44: 39             RTS  
------------------------------------------------
5E45: BD E0 E2       JSR         $E0E2
5E48: BD DF FE       JSR         $DFFE
5E4B: FC 02 AC       LDD         $02AC
5E4E: 10 83 00 03    CMPD        #$0003
5E52: 24 06          BCC         $5E5A
5E54: BD 84 9F       JSR         $849F
5E57: 7E D8 89       JMP         $D889
------------------------------------------------
5E5A: BD E1 5D       JSR         $E15D
5E5D: EC 24          LDD         +$04,Y
5E5F: 34 04          PSHS        B
5E61: BD 84 9F       JSR         $849F
5E64: D6 F6          LDB         $F6
5E66: CA 80          ORB         #$80
5E68: 8B 58          ADDA        #$58
5E6A: 34 06          PSHS        B,A
5E6C: FC 01 1F       LDD         $011F		; get SEQRAM address
5E6F: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
5E72: C3 00 01       ADDD        #$0001		; increment SEQRAM address
5E75: 32 61          LEAS        +$01,S		; get next byte
5E77: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
5E7A: C3 00 01       ADDD        #$0001		; increment SEQRAM address
5E7D: 32 61          LEAS        +$01,S		; get next byte
5E7F: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
5E82: C3 00 01       ADDD        #$0001		; increment SEQRAM address
5E85: 32 61          LEAS        +$01,S		; get next byte
5E87: FD 01 1F       STD         $011F		; write back SEQRAM address
5E8A: 39             RTS  
------------------------------------------------
5E8B: BD DF 7F       JSR         $DF7F
5E8E: BE 01 02       LDX         $0102
5E91: 30 1F          LEAX        -$01,X
5E93: BF 01 02       STX         $0102
5E96: 26 03          BNE         $5E9B
5E98: BD C9 D2       JSR         $C9D2
5E9B: 39             RTS  
------------------------------------------------
5E9C: 7A 01 0B       DEC         $010B
5E9F: 10 26 00 A5    LBNE        $5F48
5EA3: C6 06          LDB         #$06
5EA5: F7 01 0B       STB         $010B
5EA8: 7A 01 0C       DEC         $010C
5EAB: 26 19          BNE         $5EC6
5EAD: FE 01 11       LDU         $0111
5EB0: 33 41          LEAU        +$01,U
5EB2: FF 01 11       STU         $0111
5EB5: CE C1 ED       LDU         #$C1ED
5EB8: BD D9 E9       JSR         $D9E9
5EBB: BE 01 0F       LDX         $010F
5EBE: E6 02          LDB         +$02,X
5EC0: F7 01 0C       STB         $010C
5EC3: 7F 02 C5       CLR         $02C5
5EC6: 10 BE 01 06    LDY         $0106
5ECA: 31 21          LEAY        +$01,Y
5ECC: 10 BF 01 06    STY         $0106
5ED0: 96 EE          LDA         $EE
5ED2: 81 02          CMPA        #$02
5ED4: 10 26 00 70    LBNE        $5F48
5ED8: 7A 01 08       DEC         $0108
5EDB: 10 26 00 51    LBNE        $5F30
5EDF: FC 02 AC       LDD         $02AC
5EE2: 10 83 00 03    CMPD        #$0003
5EE6: 24 03          BCC         $5EEB
5EE8: 7E D8 89       JMP         $D889
------------------------------------------------
5EEB: 10 8E 00 00    LDY         #$0000
5EEF: BD DF FE       JSR         $DFFE
5EF2: FC 02 AC       LDD         $02AC
5EF5: 10 83 00 03    CMPD        #$0003
5EF9: 24 03          BCC         $5EFE
5EFB: 7E D8 89       JMP         $D889
------------------------------------------------
5EFE: CE 00 00       LDU         #$0000
5F01: 34 40          PSHS        U
5F03: 86 F1          LDA         #$F1
5F05: 34 02          PSHS        A
5F07: FC 01 1F       LDD         $011F		; get SEQRAM address
5F0A: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
5F0D: C3 00 01       ADDD        #$0001		; increment SEQRAM address
5F10: 32 61          LEAS        +$01,S		; get next byte
5F12: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
5F15: C3 00 01       ADDD        #$0001		; increment SEQRAM address
5F18: 32 61          LEAS        +$01,S		; get next byte
5F1A: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
5F1D: C3 00 01       ADDD        #$0001		; increment SEQRAM address
5F20: 32 61          LEAS        +$01,S		; get next byte
5F22: FD 01 1F       STD         $011F
5F25: BD E2 B3       JSR         $E2B3
5F28: BE 01 0F       LDX         $010F
5F2B: A6 04          LDA         +$04,X
5F2D: B7 01 08       STA         $0108
5F30: 10 BE 01 06    LDY         $0106
5F34: 10 8C 3F FF    CMPY        #$3FFF		; end of CARTRIDGE
5F38: 27 09          BEQ         $5F43
5F3A: FC 01 11       LDD         $0111
5F3D: 10 83 03 E7    CMPD        #$03E7
5F41: 26 05          BNE         $5F48
5F43: C6 FF          LDB         #$FF
5F45: BD C7 11       JSR         $C711
5F48: 39             RTS  
------------------------------------------------
5F49: FC 01 04       LDD         $0104
5F4C: C3 00 01       ADDD        #$0001
5F4F: 2A 0A          BPL         $5F5B
5F51: 10 8E 00 00    LDY         #$0000
5F55: BD DF FE       JSR         $DFFE
5F58: CC 00 01       LDD         #$0001
5F5B: FD 01 04       STD         $0104
5F5E: 10 BE 01 1B    LDY         $011B
5F62: 2B 0C          BMI         $5F70
5F64: A6 23          LDA         +$03,Y
5F66: 4C             INCA 
5F67: 27 02          BEQ         $5F6B
5F69: A7 23          STA         +$03,Y
5F6B: 10 AE A4       LDY         ,Y
5F6E: 20 F2          BRA         $5F62
------------------------------------------------
5F70: 39             RTS  
------------------------------------------------
5F71: BE 01 04       LDX         $0104
5F74: 30 1F          LEAX        -$01,X
5F76: BF 01 04       STX         $0104
5F79: 26 03          BNE         $5F7E
5F7B: BD C9 FF       JSR         $C9FF
5F7E: 39             RTS  
------------------------------------------------
5F7F: 8E 01 17       LDX         #$0117
5F82: 10 AE 84       LDY         ,X
5F85: 10 8C 80 00    CMPY        #$8000		; 32k? $7000-table end?
5F89: 24 4F          BCC         $5FDA
5F8B: A6 25          LDA         +$05,Y
5F8D: 81 01          CMPA        #$01
5F8F: 26 3C          BNE         $5FCD
5F91: EE A4          LDU         ,Y
5F93: EF 84          STU         ,X
5F95: 2A 03          BPL         $5F9A
5F97: BF 01 19       STX         $0119
5F9A: 34 50          PSHS        U,X
5F9C: A6 24          LDA         +$04,Y
5F9E: BD CE 01       JSR         $CE01
5FA1: EC 26          LDD         +$06,Y
5FA3: 34 06          PSHS        B,A
5FA5: 6D 05          TST         +$05,X
5FA7: 26 1B          BNE         $5FC4
5FA9: 96 FE          LDA         $FE
5FAB: 26 17          BNE         $5FC4
5FAD: A6 03          LDA         +$03,X
5FAF: 84 40          ANDA        #$40
5FB1: 27 07          BEQ         $5FBA
5FB3: EC E4          LDD         ,S
5FB5: BD CD F4       JSR         $CDF4
5FB8: 20 03          BRA         $5FBD
------------------------------------------------
5FBA: BD 84 9F       JSR         $849F
5FBD: EC E4          LDD         ,S
5FBF: BD 8B 77       JSR         $8B77
5FC2: 20 03          BRA         $5FC7
------------------------------------------------
5FC4: BD 84 9F       JSR         $849F
5FC7: 32 62          LEAS        +$02,S
5FC9: 35 30          PULS        Y,X
5FCB: 20 0B          BRA         $5FD8
------------------------------------------------
5FCD: 4D             TSTA 
5FCE: 2B 03          BMI         $5FD3
5FD0: 4A             DECA 
5FD1: A7 25          STA         +$05,Y
5FD3: 30 A4          LEAX        ,Y
5FD5: 10 AE A4       LDY         ,Y
5FD8: 20 AB          BRA         $5F85
------------------------------------------------
5FDA: 39             RTS  
------------------------------------------------
5FDB: ED 26          STD         +$06,Y
5FDD: 6F 23          CLR         +$03,Y
5FDF: 96 F6          LDA         $F6
5FE1: A7 22          STA         +$02,Y
5FE3: 7D 01 1B       TST         $011B
5FE6: 2A 06          BPL         $5FEE
5FE8: 10 BF 01 1B    STY         $011B
5FEC: 20 06          BRA         $5FF4
------------------------------------------------
5FEE: BE 01 1D       LDX         $011D
5FF1: 10 AF 84       STY         ,X
5FF4: 10 BF 01 1D    STY         $011D
5FF8: CC FF FF       LDD         #$FFFF
5FFB: ED A4          STD         ,Y
5FFD: 39             RTS  
------------------------------------------------
5FFE: FC 01 04       LDD         $0104
6001: 10 27 00 96    LBEQ        $609B
6005: 4D             TSTA 
6006: 26 4E          BNE         $6056
6008: 34 04          PSHS        B
600A: 7D 02 A6       TST         $02A6
600D: 26 24          BNE         $6033
600F: FC 02 AC       LDD         $02AC
6012: 10 83 00 02    CMPD        #$0002
6016: 24 0A          BCC         $6022
6018: 31 A4          LEAY        ,Y
601A: 27 03          BEQ         $601F
601C: BD 84 9F       JSR         $849F
601F: 7E D8 89       JMP         $D889
------------------------------------------------
6022: 86 F5          LDA         #$F5
6024: 34 02          PSHS        A
6026: FC 01 1F       LDD         $011F		; get SEQRAM address
6029: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
602C: C3 00 01       ADDD        #$0001		; increment SEQRAM pointer
602F: 32 61          LEAS        +$01,S		; get next byte
6031: 20 19          BRA         $604C
------------------------------------------------
6033: FC 02 AC       LDD         $02AC
6036: 10 83 00 01    CMPD        #$0001
603A: 24 0A          BCC         $6046
603C: 31 A4          LEAY        ,Y
603E: 27 03          BEQ         $6043
6040: BD 84 9F       JSR         $849F
6043: 7E D8 89       JMP         $D889
------------------------------------------------
6046: FC 01 1F       LDD         $011F		; get SEQRAM address
6049: 7F 02 A6       CLR         $02A6
604C: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
604F: C3 00 01       ADDD        #$0001		; increment SEQRAM pointer
6052: 32 61          LEAS        +$01,S		; select next byte
6054: 20 37          BRA         $608D		; write back & clean up
------------------------------------------------
6056: 34 06          PSHS        B,A
6058: FC 02 AC       LDD         $02AC
605B: 10 83 00 03    CMPD        #$0003
605F: 24 0A          BCC         $606B
6061: 31 A4          LEAY        ,Y
6063: 27 03          BEQ         $6068
6065: BD 84 9F       JSR         $849F
6068: 7E D8 89       JMP         $D889
------------------------------------------------
606B: BD E0 9F       JSR         $E09F
606E: 86 F4          LDA         #$F4
6070: 34 02          PSHS        A
6072: FC 01 1F       LDD         $011F		; get SEQRAM address
6075: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
6078: C3 00 01       ADDD        #$0001		; increment SEQRAM pointer
607B: 32 61          LEAS        +$01,S		; select next byte
607D: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
6080: C3 00 01       ADDD        #$0001		; increment SEQRAM pointer
6083: 32 61          LEAS        +$01,S		; select next byte
6085: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
6088: C3 00 01       ADDD        #$0001		; increment SEQRAM pointer
608B: 32 61          LEAS        +$01,S		; select next byte
608D: FD 01 1F       STD         $011F		; save next SEQRAM address
6090: BD E2 B3       JSR         $E2B3
6093: CC 00 00       LDD         #$0000
6096: FD 01 04       STD         $0104
6099: 20 03          BRA         $609E
------------------------------------------------
609B: BD E0 9F       JSR         $E09F
609E: 39             RTS  
------------------------------------------------
609F: 7D 02 A6       TST         $02A6
60A2: 27 19          BEQ         $60BD
60A4: 7F 02 A6       CLR         $02A6
60A7: FC 02 9D       LDD         $029D
60AA: 32 7F          LEAS        -$01,S		; get previous byte
60AC: BD D8 16       JSR         $D816
60AF: A6 E4          LDA         ,S
60B1: 8A 80          ORA         #$80
60B3: A7 E4          STA         ,S		; byte to transfer
60B5: FC 02 9D       LDD         $029D		; get SEQRAM address
60B8: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
60BB: 32 61          LEAS        +$01,S		; get next byte
60BD: 39             RTS  
------------------------------------------------
60BE: 96 EF          LDA         $EF
60C0: 85 04          BITA        #$04
60C2: 26 05          BNE         $60C9
60C4: BD 84 9F       JSR         $849F
60C7: 35 86          PULS        PC,B,A
------------------------------------------------
60C9: 84 FB          ANDA        #$FB
60CB: 97 EF          STA         $EF
60CD: 86 02          LDA         #$02
60CF: 97 EE          STA         $EE
60D1: 34 20          PSHS        Y
60D3: BD DC 88       JSR         $DC88
60D6: CE AA 83       LDU         #$AA83
60D9: BD D9 E9       JSR         $D9E9
60DC: BD C7 7D       JSR         $C77D
60DF: 35 20          PULS        Y
60E1: 39             RTS  
------------------------------------------------
60E2: A6 24          LDA         +$04,Y
60E4: 84 7F          ANDA        #$7F
60E6: 81 15          CMPA        #$15
60E8: 25 04          BCS         $60EE
60EA: 81 6D          CMPA        #$6D
60EC: 25 05          BCS         $60F3
60EE: BD 84 9F       JSR         $849F
60F1: 35 86          PULS        PC,B,A
------------------------------------------------
60F3: 80 15          SUBA        #$15
60F5: A7 24          STA         +$04,Y
60F7: 39             RTS  
------------------------------------------------
60F8: 7D 02 C3       TST         $02C3
60FB: 2A 58          BPL         $6155
60FD: D6 F9          LDB         $F9
60FF: C1 0C          CMPB        #$0C
6101: 22 0D          BHI         $6110
6103: B6 02 C3       LDA         $02C3
6106: 84 7F          ANDA        #$7F
6108: B7 02 C3       STA         $02C3
610B: CC 00 01       LDD         #$0001
610E: 20 22          BRA         $6132
------------------------------------------------
6110: BD DC 88       JSR         $DC88
6113: CE AA 83       LDU         #$AA83
6116: BD D9 E9       JSR         $D9E9
6119: BD DC 9C       JSR         $DC9C
611C: D0 F9          SUBB        $F9
611E: 26 0C          BNE         $612C
6120: 0F F9          CLR         $F9
6122: 96 EF          LDA         $EF
6124: 8A 20          ORA         #$20
6126: 97 EF          STA         $EF
6128: 20 D9          BRA         $6103
------------------------------------------------
612A: 20 05          BRA         $6131
------------------------------------------------
612C: B6 02 C1       LDA         $02C1
612F: 97 EE          STA         $EE
6131: 4F             CLRA 
6132: 34 06          PSHS        B,A
6134: FE 01 0F       LDU         $010F
6137: E6 44          LDB         +$04,U
6139: EE E4          LDU         ,S
613B: 11 83 00 06    CMPU        #$0006
613F: 25 05          BCS         $6146
6141: 33 5A          LEAU        -$06,U
6143: 5A             DECB 
6144: 20 F5          BRA         $613B
------------------------------------------------
6146: F7 01 08       STB         $0108
6149: 35 06          PULS        B,A
614B: FD 01 04       STD         $0104
614E: BD E4 DD       JSR         $E4DD
6151: C6 FF          LDB         #$FF
6153: 20 07          BRA         $615C
------------------------------------------------
6155: 27 04          BEQ         $615B
6157: C6 FF          LDB         #$FF
6159: 20 01          BRA         $615C
------------------------------------------------
615B: 5F             CLRB 
615C: 39             RTS  
------------------------------------------------
615D: 7D 02 C5       TST         $02C5
6160: 26 03          BNE         $6165
6162: 73 02 C5       COM         $02C5
6165: 39             RTS  
------------------------------------------------
6166: BE 01 0F       LDX         $010F
6169: E6 01          LDB         +$01,X		; $0110
616B: 4F             CLRA 
616C: C1 17          CMPB        #$17
616E: 27 02          BEQ         $6172
6170: 86 02          LDA         #$02
6172: 97 E4          STA         $E4
6174: 5C             INCB 
6175: BD DB 11       JSR         $DB11
6178: 86 FF          LDA         #$FF
617A: B7 02 C6       STA         $02C6
617D: 7D 01 00       TST         $0100
6180: 2B 06          BMI         $6188
6182: 73 01 00       COM         $0100
6185: 7F 01 01       CLR         $0101
6188: BD 84 79       JSR         $8479
618B: 6F 26          CLR         +$06,Y
618D: BD C8 F7       JSR         $C8F7
6190: BD 8C 14       JSR         $8C14
6193: BD DA 9E       JSR         $DA9E
6196: BD DE 9C       JSR         $DE9C
6199: 7E DE 8B       JMP         $DE8B
------------------------------------------------
619C: 7F 02 C6       CLR         $02C6
619F: BD 84 79       JSR         $8479
61A2: CE 00 0C       LDU         #$000C
61A5: EF 22          STU         +$02,Y
61A7: 6F 26          CLR         +$06,Y
61A9: BD 84 AE       JSR         $84AE
61AC: 0B 6D	     fdb	 $0B6D
61AE: 39             RTS
------------------------------------------------
61AF: 0D FE          TST         $FE
61B1: 27 11          BEQ         $61C4
61B3: 34 04          PSHS        B
61B5: A6 E4          LDA         ,S
61B7: 27 07          BEQ         $61C0
61B9: AD F8 01       JSR         [+$01,S]
61BB: 01             FCB 	 $01
61BC: 6A E4          DEC         ,S
61BE: 20 F5          BRA         $61B5
------------------------------------------------
61C0: 35 04          PULS        B
61C2: 20 2D          BRA         $61F1
------------------------------------------------
61C4: 7D 02 C6       TST         $02C6
61C7: 26 05          BNE         $61CE
61C9: BD 84 9F       JSR         $849F
61CC: 20 23          BRA         $61F1
------------------------------------------------
61CE: E6 26          LDB         +$06,Y
61D0: 34 24          PSHS        Y,B
61D2: 6D E4          TST         ,S
61D4: 27 0D          BEQ         $61E3
61D6: BD 8C 14       JSR         $8C14
61D9: BD DA 9E       JSR         $DA9E
61DC: AD F8 03       JSR         [+$03,S]
61DF: 6A E4          DEC         ,S
61E1: 20 F1          BRA         $61D4
------------------------------------------------
61E3: 35 24          PULS        Y,B
61E5: CE B6 4A       LDU         #$B64A
61E8: EF 22          STU         +$02,Y
61EA: BD 84 AE       JSR         $84AE
61ED: 0B 4F	     fdb	 $0B4F
61EF: 32 62          LEAS        +$02,S
61F1: 39             RTS  
------------------------------------------------
61F2: 34 10          PSHS        X
61F4: B6 01 0D       LDA         $010D
61F7: F6 01 0E       LDB         $010E
61FA: FE 01 11       LDU         $0111
61FD: C3 00 00       ADDD        #$0000
6200: 26 0B          BNE         $620D
6202: 30 C4          LEAX        ,U
6204: 27 04          BEQ         $620A
6206: 33 5F          LEAU        -$01,U
6208: 20 03          BRA         $620D
------------------------------------------------
620A: FE 02 A7       LDU         $02A7
620D: 34 06          PSHS        B,A
620F: BE 01 0F       LDX         $010F
6212: A6 01          LDA         +$01,X
6214: A0 E0          SUBA        ,S+
6216: E6 84          LDB         ,X
6218: E0 E0          SUBB        ,S+
621A: 35 90          PULS        PC,X
621C: FC 02 8F       LDD         $028F
621F: B3 02 9F       SUBD        $029F
6222: 27 20          BEQ         $6244
6224: 34 06          PSHS        B,A
6226: FC 01 21       LDD         $0121
6229: B3 02 8F       SUBD        $028F
622C: 1F 01          TFR         D,X
622E: FC 02 8F       LDD         $028F
6231: BD D8 66       JSR         $D866
6234: FC 02 A1       LDD         $02A1
6237: A3 E4          SUBD        ,S
6239: FD 02 A1       STD         $02A1
623C: FC 01 21       LDD         $0121
623F: A3 E1          SUBD        ,S++
6241: FD 01 21       STD         $0121
6244: BD E9 5F       JSR         $E95F
6247: 10 9E F0       LDY         $F0
624A: F3 02 A1       ADDD        $02A1
624D: BD E2 EF       JSR         $E2EF
6250: 34 06          PSHS        B,A
6252: 1F 20          TFR         Y,D		; get SEQRAM address
6254: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
6257: C3 00 01       ADDD        #$0001		; increment SEQRAM address
625A: 32 61          LEAS        +$01,S		; get next byte
625C: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
625F: C3 00 01       ADDD        #$0001		; increment SEQRAM address
6262: 32 61          LEAS        +$01,S		; get next byte
6264: 1F 20          TFR         Y,D
6266: BD E3 4A       JSR         $E34A
6269: F3 02 C7       ADDD        $02C7
626C: FD 02 8F       STD         $028F
626F: FC 01 21       LDD         $0121
6272: FD 01 1F       STD         $011F
6275: BD E2 B3       JSR         $E2B3
6278: BD CD 9E       JSR         $CD9E
627B: CC FF FF       LDD         #$FFFF
627E: FD 01 02       STD         $0102
6281: 7F 02 BF       CLR         $02BF
6284: 39             RTS  
------------------------------------------------
6285: FC 01 21       LDD         $0121
6288: FD 01 1F       STD         $011F
628B: 9E D3          LDX         $D3
628D: 30 1F          LEAX        -$01,X
628F: BF 01 25       STX         $0125
6292: B6 01 25       LDA         $0125
6295: 2A 04          BPL         $629B
6297: 86 08          LDA         #$08
6299: 20 09          BRA         $62A4
------------------------------------------------
629B: 48             LSLA 
629C: 2A 04          BPL         $62A2
629E: 86 04          LDA         #$04
62A0: 20 02          BRA         $62A4
------------------------------------------------
62A2: 86 01          LDA         #$01
62A4: C6 32          LDB         #$32
62A6: 3D             MUL  
62A7: FD 02 CE       STD         $02CE
62AA: FC 01 25       LDD         $0125
62AD: B3 02 CE       SUBD        $02CE
62B0: FD 01 23       STD         $0123
62B3: FC 01 23       LDD         $0123
62B6: B3 01 1F       SUBD        $011F
62B9: 24 0B          BCC         $62C6
62BB: FC 01 1F       LDD         $011F
62BE: FD 01 23       STD         $0123
62C1: CC 00 00       LDD         #$0000
62C4: 20 25          BRA         $62EB
------------------------------------------------
62C6: 34 06          PSHS        B,A
62C8: FC 01 25       LDD         $0125
62CB: B3 02 CE       SUBD        $02CE
62CE: 10 B3 01 23    CMPD        $0123
62D2: 24 15          BCC         $62E9
62D4: 10 B3 01 1F    CMPD        $011F
62D8: 23 0A          BLS         $62E4
62DA: FD 01 23       STD         $0123
62DD: B3 01 1F       SUBD        $011F
62E0: ED E4          STD         ,S
62E2: 20 05          BRA         $62E9
------------------------------------------------
62E4: CC 00 00       LDD         #$0000
62E7: ED E4          STD         ,S
62E9: 35 06          PULS        B,A
62EB: FD 02 AC       STD         $02AC
62EE: 39             RTS  
------------------------------------------------
62EF: 34 26          PSHS        Y,B,A
62F1: 32 7F          LEAS        -$01,S
62F3: 10 BF 02 9F    STY         $029F
62F7: F3 02 9F       ADDD        $029F
62FA: 10 B3 01 21    CMPD        $0121
62FE: 24 3E          BCC         $633E
6300: 1F 02          TFR         D,Y
6302: FD 02 9F       STD         $029F
6305: C3 00 04       ADDD        #$0004
6308: BD D8 16       JSR         $D816
630B: E6 E4          LDB         ,S
630D: C4 7F          ANDB        #$7F
630F: C1 3C          CMPB        #$3C
6311: 25 08          BCS         $631B
6313: C0 3C          SUBB        #$3C
6315: 58             LSLB 
6316: CE 01 9F       LDU         #$019F
6319: 20 04          BRA         $631F
------------------------------------------------
631B: 58             LSLB 
631C: CE 01 27       LDU         #$0127
631F: 10 AF C5       STY         B,U
6322: FC 02 9F       LDD         $029F
6325: 32 7F          LEAS        -$01,S
6327: BD D8 16       JSR         $D816
632A: C3 00 01       ADDD        #$0001
632D: 32 7F          LEAS        -$01,S
632F: BD D8 16       JSR         $D816
6332: C3 00 01       ADDD        #$0001
6335: 35 04          PULS        B
6337: 35 02          PULS        A
6339: F3 02 9F       ADDD        $029F
633C: 20 BC          BRA         $62FA
------------------------------------------------
633E: 10 B3 01 21    CMPD        $0121
6342: 23 02          BLS         $6346
6344: 11 3F          SWI3 			; spurious error
------------------------------------------------
6346: 32 61          LEAS        +$01,S
6348: 35 A6          PULS        PC,Y,B,A
------------------------------------------------
634A: 34 06          PSHS        B,A
634C: 1F 02          TFR         D,Y
634E: C3 00 05       ADDD        #$0005
6351: FD 02 93       STD         $0293
6354: 32 7F          LEAS        -$01,S
6356: BD D8 16       JSR         $D816
6359: C3 00 01       ADDD        #$0001
635C: 32 7F          LEAS        -$01,S
635E: BD D8 16       JSR         $D816
6361: C3 00 01       ADDD        #$0001
6364: 35 04          PULS        B
6366: 35 02          PULS        A
6368: 10 83 00 00    CMPD        #$0000
636C: 26 05          BNE         $6373
636E: B6 02 C3       LDA         $02C3
6371: 27 17          BEQ         $638A
6373: CE E3 8C       LDU         #$E38C
6376: EC E4          LDD         ,S
6378: F3 02 C7       ADDD        $02C7
637B: 1F 02          TFR         D,Y
637D: 34 06          PSHS        B,A
637F: CC 72 6F       LDD         #$726F		; jump to ROMLOW $426f
6382: 34 06          PSHS        B,A		;
6384: CC 0E 08       LDD         #$0E08		;
6387: BD 85 B4       JSR         $85B4		;
638A: 35 86          PULS        PC,B,A
------------------------------------------------

638C: CA B3 CA B3 CA B3 CA B3 CA B3 E3 9C E3 D7 CA B4   ................

------------------------------------------------
639C: EC 02          LDD         +$02,X		; get value
63A1: 1F 02          TFR         D,Y
63A3: B3 02 93       SUBD        $0293
63A6: 34 06          PSHS        B,A		; value to stack
63A8: FC 02 93       LDD         $0293		; transfer 16 bit value 
63AB: BD D7 E6       JSR         $D7E6		;   to SEQRAM
63AE: C3 00 01       ADDD        #$0001		
63B1: 32 61          LEAS        +$01,S		
63B3: BD D7 E6       JSR         $D7E6		
63B6: C3 00 01       ADDD        #$0001		
63B9: 32 61          LEAS        +$01,S		
63BB: 10 BF 02 93    STY         $0293		; write new SEQRAM address
63BF: CC 00 00       LDD         #$0000		; transfer $0000 to SEQRAM [Y] 
63C2: 34 06          PSHS        B,A	
63C4: 1F 20          TFR         Y,D
63C6: BD D7 E6       JSR         $D7E6
63C9: C3 00 01       ADDD        #$0001
63CC: 32 61          LEAS        +$01,S
63CE: BD D7 E6       JSR         $D7E6
63D1: C3 00 01       ADDD        #$0001
63D4: 32 61          LEAS        +$01,S
63D6: 39             RTS  
------------------------------------------------
63D7: 73 02 BE       COM         $02BE
63DA: 39             RTS  
------------------------------------------------
63DB: 7D 02 C3       TST         $02C3
63DE: 27 22          BEQ         $6402
63E0: F6 01 0C       LDB         $010C
63E3: 5A             DECB 
63E4: 86 06          LDA         #$06
63E6: 3D             MUL  
63E7: FB 01 0B       ADDB        $010B
63EA: 4F             CLRA 
63EB: 34 06          PSHS        B,A
63ED: BD E4 51       JSR         $E451
63F0: BD E4 21       JSR         $E421
63F3: BD E4 6E       JSR         $E46E
63F6: FE 01 11       LDU         $0111
63F9: 32 62          LEAS        +$02,S
63FB: 33 5F          LEAU        -$01,U
63FD: FF 02 A7       STU         $02A7
6400: 20 06          BRA         $6408
------------------------------------------------
6402: 7F 02 C5       CLR         $02C5
6405: BD E4 21       JSR         $E421
6408: 10 8E 00 00    LDY         #$0000
640C: BD DF FE       JSR         $DFFE
640F: 86 F3          LDA         #$F3		; transfer #$f3 to SEQRAM
6411: 34 02          PSHS        A
6413: FC 01 1F       LDD         $011F		; SEQRAM address
6416: BD D7 E6       JSR         $D7E6
6419: C3 00 01       ADDD        #$0001		; inc SEQRAM address
641C: FD 01 1F       STD         $011F		; write back SEQRAM address
641F: 35 82          PULS        PC,A
------------------------------------------------
6421: FE 01 1B       LDU         $011B
6424: 11 83 FF FF    CMPU        #$FFFF
6428: 27 20          BEQ         $644A
642A: 34 40          PSHS        U
642C: A6 43          LDA         +$03,U
642E: 2A 09          BPL         $6439
6430: 10 8E 00 00    LDY         #$0000
6434: BD DF FE       JSR         $DFFE
6437: 20 05          BRA         $643E
------------------------------------------------
6439: B0 02 C5       SUBA        $02C5
643C: A7 23          STA         +$03,Y
643E: 35 20          PULS        Y
6440: BD E5 10       JSR         $E510
6443: EE A4          LDU         ,Y
6445: BD 84 9F       JSR         $849F
6448: 20 DA          BRA         $6424
------------------------------------------------
644A: FF 01 1B       STU         $011B
644D: FF 01 1D       STU         $011D
6450: 39             RTS  
------------------------------------------------
6451: 7D 02 C5       TST         $02C5
6454: 26 17          BNE         $646D
6456: BD DC 9C       JSR         $DC9C
6459: E0 63          SUBB        +$03,S
645B: C1 0C          CMPB        #$0C
645D: 22 0E          BHI         $646D
645F: 50             NEGB 
6460: BE 01 04       LDX         $0104
6463: 30 85          LEAX        B,X
6465: BF 01 04       STX         $0104
6468: 8E 00 00       LDX         #$0000
646B: AF 62          STX         +$02,S
646D: 39             RTS  
------------------------------------------------
646E: AE 62          LDX         +$02,S
6470: 27 11          BEQ         $6483
6472: 27 07          BEQ         $647B
6474: BD DF 49       JSR         $DF49
6477: 30 1F          LEAX        -$01,X
6479: 20 F7          BRA         $6472
------------------------------------------------
647B: FE 01 11       LDU         $0111
647E: 33 41          LEAU        +$01,U
6480: FF 01 11       STU         $0111
6483: 39             RTS  
------------------------------------------------
6484: 96 F6          LDA         $F6
6486: BD CE 01       JSR         $CE01

------------------------------------------------
6489: C6 06          LDB         #$06
648B: 3A             ABX  
648C: C6 05          LDB         #$05
648E: 10 8E E4 D7    LDY         #$E4D7
6492: A6 A5          LDA         B,Y
6494: A1 85          CMPA        B,X
6496: 27 3B          BEQ         $64D3
6498: C1 01          CMPB        #$01
649A: 26 18          BNE         $64B4
649C: 34 36          PSHS        Y,X,B,A
649E: BD 84 79       JSR         $8479
64A1: CC 7B 62       LDD         #$7B62		; VDB handler to $2b62
64A4: ED 22          STD         +$02,Y		;
64A6: 1F 10          TFR         X,D
64A8: 83 00 06       SUBD        #$0006
64AB: ED 24          STD         +$04,Y
64AD: BD 84 AE       JSR         $84AE
64B0: 0B 5E	     fdb 	 $0B5E
64B2: 35 36          PULS        Y,X,B,A
64B4: A7 85          STA         B,X
64B6: 34 36          PSHS        Y,X,B,A
64B8: 30 1A          LEAX        -$06,X
64BA: 1E 89          EXG         A,B
64BC: 81 00          CMPA        #$00
64BE: 26 05          BNE         $64C5
64C0: BD 8B A5       JSR         $8BA5		; pitch bend
64C3: 20 0C          BRA         $64D1
------------------------------------------------
64C5: 81 05          CMPA        #$05
64C7: 26 05          BNE         $64CE
64C9: BD 8A E5       JSR         $8AE5
64CC: 20 03          BRA         $64D1
------------------------------------------------
64CE: BD 8B B5       JSR         $8BB5
64D1: 35 36          PULS        Y,X,B,A
64D3: 5A             DECB 
64D4: 2A BC          BPL         $6492
64D6: 39             RTS  
------------------------------------------------

64D7: 40 00 00 00 00 00                                 @.....

------------------------------------------------
64DD: 34 20          PSHS        Y
64DF: 96 F6          LDA         $F6
64E1: BD CE 01       JSR         $CE01
64E4: C6 06          LDB         #$06
64E6: 3A             ABX  
64E7: 86 05          LDA         #$05
64E9: 10 8E E4 D7    LDY         #$E4D7
64ED: 81 03          CMPA        #$03
64EF: 26 08          BNE         $64F9
64F1: 0D DB          TST         $DB
64F3: 27 04          BEQ         $64F9
64F5: E6 06          LDB         +$06,X
64F7: 20 06          BRA         $64FF
------------------------------------------------
64F9: E6 86          LDB         A,X
64FB: E1 A6          CMPB        A,Y
64FD: 27 07          BEQ         $6506
64FF: 34 32          PSHS        Y,X,A
6501: BD E5 0B       JSR         $E50B
6504: 35 32          PULS        Y,X,A
6506: 4A             DECA 
6507: 2A E4          BPL         $64ED
6509: 35 A0          PULS        PC,Y
------------------------------------------------
650B: 34 06          PSHS        B,A
650D: 7E DE 0A       JMP         $DE0A
------------------------------------------------
6510: 34 10          PSHS        X
6512: A6 23          LDA         +$03,Y
6514: 4D             TSTA 
6515: 2B 1B          BMI         $6532
6517: 26 01          BNE         $651A
6519: 4C             INCA 
651A: 34 02          PSHS        A
651C: EC 26          LDD         +$06,Y
651E: 32 7F          LEAS        -$01,S
6520: BD D8 16       JSR         $D816
6523: A6 E4          LDA         ,S
6525: AA 61          ORA         +$01,S
6527: A7 E4          STA         ,S		; byte to transfer
6529: EC 26          LDD         +$06,Y		; get SEQRAM address
652B: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
652E: 32 62          LEAS        +$02,S	
6530: 20 35          BRA         $6567
------------------------------------------------
6532: A6 22          LDA         +$02,Y
6534: 34 02          PSHS        A
6536: A6 24          LDA         +$04,Y
6538: 8B 58          ADDA        #$58
653A: 34 02          PSHS        A
653C: FC 02 AC       LDD         $02AC
653F: 10 83 00 02    CMPD        #$0002
6543: 24 06          BCC         $654B
6545: BD 84 9F       JSR         $849F
6548: 7E D8 89       JMP         $D889
------------------------------------------------
654B: BD E0 9F       JSR         $E09F
654E: FC 01 1F       LDD         $011F		; get SEQRAM address
6551: BD D7 E6       JSR         $D7E6		; two bytes from stack
6554: C3 00 01       ADDD        #$0001		;   to SEQRAM
6557: 32 61          LEAS        +$01,S
6559: BD D7 E6       JSR         $D7E6
655C: C3 00 01       ADDD        #$0001
655F: 32 61          LEAS        +$01,S
6561: FD 01 1F       STD         $011F		; write back SEQRAM address
6564: BD E2 B3       JSR         $E2B3
6567: 35 90          PULS        PC,X
------------------------------------------------
6569: 34 02          PSHS        A
656B: FC 02 AC       LDD         $02AC
656E: 10 83 00 21    CMPD        #$0021
6572: 25 7E          BCS         $65F2
6574: A6 E4          LDA         ,S
6576: C6 7F          LDB         #$7F
6578: E7 86          STB         A,X
657A: 97 F2          STA         $F2
657C: 7C 02 AE       INC         $02AE
657F: D6 E8          LDB         $E8
6581: 1C FE          ANDCC       #$FE		; clear carry
6583: 56             RORB 
6584: 56             RORB 
6585: DA F7          ORB         $F7
6587: 96 EC          LDA         $EC
6589: A7 E4          STA         ,S
658B: 34 04          PSHS        B
658D: 6F E2          CLR         ,-S
658F: 6F E2          CLR         ,-S
6591: C4 7F          ANDB        #$7F
6593: 86 05          LDA         #$05
6595: 3D             MUL  
6596: 8E D4 0F       LDX         #$D40F
6599: 30 8B          LEAX        D,X
659B: BF 01 0F       STX         $010F
659E: BD DB 58       JSR         $DB58
65A1: D6 F2          LDB         $F2
65A3: 34 04          PSHS        B
65A5: CC 00 00       LDD         #$0000
65A8: 34 06          PSHS        B,A
65AA: FD 02 A7       STD         $02A7
65AD: FD 01 11       STD         $0111
65B0: CC 00 21       LDD         #$0021
65B3: FD 02 C7       STD         $02C7
65B6: 7F 02 C9       CLR         $02C9
65B9: 34 06          PSHS        B,A
65BB: 10 8E 00 09    LDY         #$0009
65BF: FC 01 21       LDD         $0121		; get SEQRAM address
65C2: DD F0          STD         $F0		; to $f0
65C4: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
65C7: C3 00 01       ADDD        #$0001
65CA: 32 61          LEAS        +$01,S
65CC: 31 3F          LEAY        -$01,Y
65CE: 26 F4          BNE         $65C4
65D0: 0F F6          CLR         $F6
65D2: FC 01 21       LDD         $0121
65D5: BD D3 80       JSR         $D380
65D8: 1F 03          TFR         D,U
65DA: 8E 01 27       LDX         #$0127
65DD: D6 F2          LDB         $F2
65DF: 58             LSLB 
65E0: EF 85          STU         B,X
65E2: DC F0          LDD         $F0
65E4: F3 02 C7       ADDD        $02C7
65E7: FD 01 21       STD         $0121
65EA: FD 01 1F       STD         $011F
65ED: BD E2 B3       JSR         $E2B3
65F0: 20 08          BRA         $65FA
------------------------------------------------
65F2: 32 61          LEAS        +$01,S
65F4: CE AA DF       LDU         #$AADF
65F7: BD D9 E9       JSR         $D9E9
65FA: 39             RTS  
------------------------------------------------
65FB: 34 02          PSHS        A
65FD: 8E 01 C7       LDX         #$01C7
6600: 6D 86          TST         A,X
6602: 10 2B 00 3F    LBMI        $6645
6606: C6 FF          LDB         #$FF
6608: E7 86          STB         A,X
660A: 48             LSLA 
660B: 8E 01 27       LDX         #$0127
660E: EC 86          LDD         A,X
6610: BD E6 86       JSR         $E686
6613: FC 01 21       LDD         $0121
6616: FD 01 1F       STD         $011F
6619: BD E2 B3       JSR         $E2B3
661C: 7A 02 AE       DEC         $02AE
661F: 26 09          BNE         $662A
6621: 4F             CLRA 
6622: 8E 01 C7       LDX         #$01C7
6625: BD E5 69       JSR         $E569
6628: 20 1B          BRA         $6645
------------------------------------------------
662A: 96 F2          LDA         $F2
662C: A1 E4          CMPA        ,S
662E: 26 0C          BNE         $663C
6630: 86 FF          LDA         #$FF
6632: 8E 01 C7       LDX         #$01C7
6635: 4C             INCA 
6636: 6D 86          TST         A,X
6638: 2B FB          BMI         $6635
663A: 97 F2          STA         $F2
663C: BD D3 BB       JSR         $D3BB
663F: CC FF FF       LDD         #$FFFF
6642: FD 01 02       STD         $0102
6645: 35 82          PULS        PC,A
------------------------------------------------
6647: 34 02          PSHS        A
6649: 80 3C          SUBA        #$3C
664B: 81 14          CMPA        #$14
664D: 25 04          BCS         $6653
664F: 80 14          SUBA        #$14
6651: 20 F8          BRA         $664B
------------------------------------------------
6653: 8E 02 03       LDX         #$0203
6656: 6D 86          TST         A,X
6658: 10 2B 00 28    LBMI        $6684
665C: C6 FF          LDB         #$FF
665E: E7 86          STB         A,X
6660: 48             LSLA 
6661: 8E 01 9F       LDX         #$019F
6664: EC 86          LDD         A,X
6666: BD E6 86       JSR         $E686
6669: FC 01 21       LDD         $0121
666C: FD 01 1F       STD         $011F
666F: BD E2 B3       JSR         $E2B3
6672: 86 FF          LDA         #$FF
6674: B7 01 00       STA         $0100
6677: 7F 01 01       CLR         $0101
667A: B6 00 F5       LDA         $00F5
667D: 8A 80          ORA         #$80
667F: B7 00 F5       STA         $00F5
6682: 20 AC          BRA         $6630
------------------------------------------------
6684: 35 82          PULS        PC,A
------------------------------------------------
6686: BD 86 02       JSR         $8602
6689: 1F 02          TFR         D,Y
668B: 32 7F          LEAS        -$01,S
668D: BD D8 16       JSR         $D816
6690: C3 00 01       ADDD        #$0001
6693: 32 7F          LEAS        -$01,S
6695: BD D8 16       JSR         $D816
6698: 35 06          PULS        B,A
669A: 1E 89          EXG         A,B
669C: 34 06          PSHS        B,A
669E: FD 02 A1       STD         $02A1
66A1: 1F 20          TFR         Y,D
66A3: E3 E4          ADDD        ,S
66A5: FD 02 9F       STD         $029F
66A8: FC 01 21       LDD         $0121
66AB: B3 02 9F       SUBD        $029F
66AE: 1F 01          TFR         D,X
66B0: FC 02 9F       LDD         $029F
66B3: BD D8 66       JSR         $D866
66B6: 32 62          LEAS        +$02,S
66B8: FC 01 21       LDD         $0121
66BB: B3 02 A1       SUBD        $02A1
66BE: FD 01 21       STD         $0121
66C1: 4F             CLRA 
66C2: 5F             CLRB 
66C3: BD E2 EF       JSR         $E2EF
66C6: 7E 86 93       JMP         $8693
------------------------------------------------
66C9: FC 01 21       LDD         $0121		; SEQRAM address
66CC: 32 7F          LEAS        -$01,S		; byte address
66CE: BD D8 16       JSR         $D816		; transfer SEQRAM to stack
66D1: C3 00 01       ADDD        #$0001		; byte #2
66D4: 32 7F          LEAS        -$01,S
66D6: BD D8 16       JSR         $D816	
66D9: C3 00 01       ADDD        #$0001		; byte #3 
66DC: 32 7F          LEAS        -$01,S
66DE: BD D8 16       JSR         $D816
66E1: C3 00 01       ADDD        #$0001		; byte #4
66E4: 32 7F          LEAS        -$01,S
66E6: BD D8 16       JSR         $D816
66E9: C3 00 01       ADDD        #$0001		; byte #5
66EC: 32 7F          LEAS        -$01,S
66EE: BD D8 16       JSR         $D816
66F1: 8E 01 C7       LDX         #$01C7
66F4: C6 3C          LDB         #$3C
66F6: 5A             DECB 
66F7: 6D 85          TST         B,X
66F9: 2B 04          BMI         $66FF
66FB: C1 FF          CMPB        #$FF
66FD: 26 F7          BNE         $66F6
66FF: 5D             TSTB 
6700: 2B 4E          BMI         $6750
6702: 34 04          PSHS        B
6704: D7 F2          STB         $F2
6706: EC 62          LDD         +$02,S
6708: 10 83 00 00    CMPD        #$0000
670C: 26 04          BNE         $6712
670E: 86 7F          LDA         #$7F
6710: 20 01          BRA         $67
------------------------------------------------
6712: 4F             CLRA 
6713: E6 E4          LDB         ,S
6715: A7 85          STA         B,X
6717: 58             LSLB 
6718: 8E 01 27       LDX         #$0127
671B: FE 01 21       LDU         $0121
671E: EF 85          STU         B,X
6720: A6 61          LDA         +$01,S
6722: 84 80          ANDA        #$80
6724: AA E0          ORA         ,S+
6726: A7 E4          STA         ,S
6728: FC 01 21       LDD         $0121		; SEQRAM address
672B: C3 00 04       ADDD        #$0004		; increase by 4
672E: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
6731: EC 63          LDD         +$03,S
6733: 1E 89          EXG         A,B
6735: F3 01 21       ADDD        $0121
6738: FD 01 21       STD         $0121
673B: FD 01 1F       STD         $011F
673E: BD E2 B3       JSR         $E2B3
6741: 0F CD          CLR         $CD
6743: 7C 02 AE       INC         $02AE
6746: B6 00 F5       LDA         $00F5
6749: 8A 80          ORA         #$80
674B: B7 00 F5       STA         $00F5
674E: 20 04          BRA         $6754
------------------------------------------------
6750: 86 05          LDA         #$05
6752: 97 0D          STA         $0D
6754: 32 65          LEAS        +$05,S
6756: 39             RTS  
------------------------------------------------
6757: 81 3C          CMPA        #$3C
6759: 25 06          BCS         $6761
675B: 80 3C          SUBA        #$3C
675D: 81 3C          CMPA        #$3C
675F: 20 F8          BRA         $6759
------------------------------------------------
6761: 8E 01 C7       LDX         #$01C7
6764: 6D 86          TST         A,X
6766: 2A 7D          BPL         $67E5
6768: 34 02          PSHS        A
676A: BD E9 5F       JSR         $E95F
676D: 10 B3 02 AC    CMPD        $02AC
6771: 24 6B          BCC         $67DE
6773: 34 06          PSHS        B,A
6775: BD 86 02       JSR         $8602
6778: 0D CD          TST         $CD
677A: 27 05          BEQ         $6781
677C: 0F CD          CLR         $CD
677E: BD D3 05       JSR         $D305
6781: AE E4          LDX         ,S		; number of bytes to transfer
6783: FC 01 21       LDD         $0121		; SEQRAM address
6786: 93 F0          SUBD        $F0		; subtract by $f0
6788: 34 06          PSHS        B,A		; to stack
678A: DC F0          LDD         $F0		; SEQRAM address
678C: E3 62          ADDD        +$02,S		; increase by stacked value
678E: BD D8 46       JSR         $D846		; X byte SEQRAM transfer
6791: DC F0          LDD         $F0		;
6793: C3 00 04       ADDD        #$0004
6796: 32 7F          LEAS        -$01,S
6798: BD D8 16       JSR         $D816		; byte from SEQRAM to stack
679B: 35 02          PULS        A
679D: 84 80          ANDA        #$80
679F: AA 64          ORA         +$04,S
67A1: 34 02          PSHS        A
67A3: FC 01 21       LDD         $0121
67A6: C3 00 04       ADDD        #$0004
67A9: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
67AC: F6 00 F2       LDB         $00F2
67AF: 8E 01 C7       LDX         #$01C7
67B2: A6 85          LDA         B,X
67B4: 35 04          PULS        B
67B6: A7 85          STA         B,X
67B8: 58             LSLB 
67B9: 8E 01 27       LDX         #$0127
67BC: FE 01 21       LDU         $0121
67BF: EF 85          STU         B,X
67C1: 32 62          LEAS        +$02,S
67C3: FC 01 21       LDD         $0121
67C6: E3 E1          ADDD        ,S++
67C8: FD 01 21       STD         $0121
67CB: FC 01 21       LDD         $0121
67CE: FD 01 1F       STD         $011F
67D1: BD E2 B3       JSR         $E2B3
67D4: 7C 02 AE       INC         $02AE
67D7: BD 86 93       JSR         $8693
67DA: 4F             CLRA 
67DB: 5F             CLRB 
67DC: 20 03          BRA         $67E1
------------------------------------------------
67DE: 86 FF          LDA         #$FF
67E0: 5F             CLRB 
67E1: 32 61          LEAS        +$01,S
67E3: 20 03          BRA         $67E8
------------------------------------------------
67E5: C6 FF          LDB         #$FF
67E7: 4F             CLRA 
67E8: 39             RTS  
------------------------------------------------
67E9: 81 3C          CMPA        #$3C
67EB: 25 06          BCS         $67F3
67ED: 80 3C          SUBA        #$3C
67EF: 81 3C          CMPA        #$3C
67F1: 20 F8          BRA         $67EB
------------------------------------------------
67F3: 8E 01 C7       LDX         #$01C7
67F6: 6D 86          TST         A,X
67F8: 10 26 00 26    LBNE        $6822
67FC: BD 86 02       JSR         $8602
67FF: 34 06          PSHS        B,A
6801: CC 7B 8D       LDD         #$7B8D		; jump to ROMLOW $4b8d
6804: 34 06          PSHS        B,A		;
6806: CC 0E 08       LDD         #$0E08		;
6809: BD 85 B4       JSR         $85B4		;
680C: 34 06          PSHS        B,A
680E: 10 AE E4       LDY         ,S
6811: 26 03          BNE         $6816
6813: BD E2 1C       JSR         $E21C
6816: BD 86 93       JSR         $8693
6819: DC F0          LDD         $F0
681B: BD D2 22       JSR         $D222
681E: 35 06          PULS        B,A
6820: 20 03          BRA         $6825
------------------------------------------------
6822: C6 FF          LDB         #$FF
6824: 4F             CLRA 
6825: 39             RTS  
------------------------------------------------
6826: C6 01          LDB         #$01
6828: F7 02 BF       STB         $02BF
682B: 20 03          BRA         $6830
------------------------------------------------
682D: 7F 02 BF       CLR         $02BF
6830: 1F 89          TFR         A,B
6832: 4F             CLRA 
6833: FD 01 06       STD         $0106
6836: FF 01 09       STU         $0109
6839: F6 01 07       LDB         $0107
683C: 86 02          LDA         #$02
683E: 3D             MUL  
683F: C3 00 A0       ADDD        #$00A0
6842: 10 B3 02 AC    CMPD        $02AC
6846: 24 26          BCC         $686E
6848: BD 86 02       JSR         $8602
684B: 34 06          PSHS        B,A
684D: CC 78 6B       LDD         #$786B		; jump tp ROMLOW $486b
6850: 34 06          PSHS        B,A		;
6852: CC 0E 08       LDD         #$0E08		;
6855: BD 85 B4       JSR         $85B4		;
6858: 34 06          PSHS        B,A
685A: CC 7C AC       LDD         #$7CAC		; jump to ROMLOW $4cac
685D: 34 06          PSHS        B,A		;
685F: CC 0E 08       LDD         #$0E08		;
6862: BD 85 B4       JSR         $85B4		;
6865: BD E2 1C       JSR         $E21C
6868: BD 86 93       JSR         $8693
686B: 4F             CLRA 
686C: 20 02          BRA         $6870
------------------------------------------------
686E: 86 FF          LDA         #$FF
6870: 34 02          PSHS        A
6872: 7F 02 BF       CLR         $02BF
6875: BD CD 9E       JSR         $CD9E
6878: CC FF FF       LDD         #$FFFF
687B: FD 01 02       STD         $0102
687E: 35 82          PULS        PC,A
------------------------------------------------
6880: B7 02 C0       STA         $02C0
6883: BD CE 01       JSR         $CE01
6886: A6 03          LDA         +$03,X
6888: 84 20          ANDA        #$20
688A: 26 05          BNE         $6891
688C: BD E8 C8       JSR         $E8C8
688F: 20 03          BRA         $6894
------------------------------------------------
6891: C6 FF          LDB         #$FF
6893: 4F             CLRA 
6894: 39             RTS  
------------------------------------------------
6895: 96 F6          LDA         $F6
6897: B7 02 C0       STA         $02C0
689A: BD CE 01       JSR         $CE01
689D: A6 03          LDA         +$03,X
689F: 84 20          ANDA        #$20
68A1: 27 1C          BEQ         $68BF
68A3: BD 86 02       JSR         $8602
68A6: 34 06          PSHS        B,A
68A8: CC 77 6B       LDD         #$776B		; jump to ROMLOW $476b
68AB: 34 06          PSHS        B,A		;
68AD: CC 0E 08       LDD         #$0E08		;
68B0: BD 85 B4       JSR         $85B4		;
68B3: CC 00 00       LDD         #$0000
68B6: FD 02 A1       STD         $02A1
68B9: BD E2 1C       JSR         $E21C
68BC: BD 86 93       JSR         $8693
68BF: BD E9 9F       JSR         $E99F
68C2: 5F             CLRB 
68C3: 4F             CLRA 
68C4: 39             RTS  
------------------------------------------------
68C5: B7 02 C0       STA         $02C0
68C8: 34 06          PSHS        B,A
68CA: CC 76 C2       LDD         #$76C2		; jump to ROMLOW $46c2
68CD: 34 06          PSHS        B,A		;
68CF: CC 0E 08       LDD         #$0E08		;
68D2: BD 85 B4       JSR         $85B4		;
68D5: 10 B3 02 AC    CMPD        $02AC
68D9: 22 2F          BHI         $690A
68DB: BD 86 02       JSR         $8602
68DE: 34 06          PSHS        B,A	
68E0: CC 76 1D       LDD         #$761D		; jump to ROMLOW $461d
68E3: 34 06          PSHS        B,A		;
68E5: CC 0E 08       LDD         #$0E08		;
68E8: BD 85 B4       JSR         $85B4		;
68EB: BD E2 1C       JSR         $E21C
68EE: B6 02 C0       LDA         $02C0
68F1: BD CE 01       JSR         $CE01
68F4: A6 03          LDA         +$03,X
68F6: 84 20          ANDA        #$20
68F8: 26 09          BNE         $6903
68FA: BD E9 75       JSR         $E975
68FD: F6 02 C0       LDB         $02C0
6900: BD D3 34       JSR         $D334
6903: BD 86 93       JSR         $8693
6906: 4F             CLRA 
6907: 5F             CLRB 
6908: 20 03          BRA         $690D
------------------------------------------------
690A: 86 FF          LDA         #$FF
690C: 5F             CLRB 
690D: 39             RTS  
------------------------------------------------
690E: B7 01 01       STA         $0101
6911: 96 F6          LDA         $F6
6913: BD CE 01       JSR         $CE01
6916: A6 03          LDA         +$03,X
6918: 84 20          ANDA        #$20
691A: 27 13          BEQ         $692F
691C: BD 86 02       JSR         $8602
691F: 34 06          PSHS        B,A
6921: CC 77 01       LDD         #$7701		; jump to ROMLOW $4701
6924: 34 06          PSHS        B,A		;
6926: CC 0E 08       LDD         #$0E08		;
6929: BD 85 B4       JSR         $85B4		;
692C: BD 86 93       JSR         $8693		;
692F: 4F             CLRA 
6930: 5F             CLRB 
6931: 39             RTS  
------------------------------------------------
6932: 96 F6          LDA         $F6
6934: B7 02 C0       STA         $02C0
6937: BD CE 01       JSR         $CE01
693A: A6 03          LDA         +$03,X
693C: 85 20          BITA        #$20
693E: 27 1C          BEQ         $695C
6940: BD 86 02       JSR         $8602
6943: 34 06          PSHS        B,A
6945: CC 78 0C       LDD         #$780C		; jump to ROMLOW $480c
6948: 34 06          PSHS        B,A		;
694A: CC 0E 08       LDD         #$0E08		;
694D: BD 85 B4       JSR         $85B4		;
6950: CC 00 00       LDD         #$0000
6953: FD 02 A1       STD         $02A1
6956: BD E2 1C       JSR         $E21C
6959: BD 86 93       JSR         $8693
695C: 4F             CLRA 
695D: 5F             CLRB 
695E: 39             RTS  
------------------------------------------------
695F: DC F0          LDD         $F0
6961: 32 7F          LEAS        -$01,S
6963: BD D8 16       JSR         $D816		; byte from SEQRAM to stack
6966: C3 00 01       ADDD        #$0001
6969: 32 7F          LEAS        -$01,S
696B: BD D8 16       JSR         $D816		; byte from SEQRAM to stack
696E: C3 00 01       ADDD        #$0001
6971: 35 04          PULS        B
6973: 35 82          PULS        PC,A
------------------------------------------------
6975: B6 02 C0       LDA         $02C0
6978: BD CE 01       JSR         $CE01
697B: 34 10          PSHS        X
697D: 96 F6          LDA         $F6
697F: BD CE 01       JSR         $CE01
6982: 35 20          PULS        Y
6984: C6 0C          LDB         #$0C
6986: A6 85          LDA         B,X
6988: A7 A5          STA         B,Y
698A: 5A             DECB 
698B: 2A F9          BPL         $6986
698D: 39             RTS  
------------------------------------------------
698E: 96 F6          LDA         $F6
6990: BD CE 01       JSR         $CE01
6993: A6 03          LDA         +$03,X
6995: 8A 20          ORA         #$20
6997: A7 03          STA         +$03,X
6999: BD D3 05       JSR         $D305
699C: 0F CD          CLR         $CD
699E: 39             RTS  
------------------------------------------------
699F: B6 02 C0       LDA         $02C0
69A2: BD CE 01       JSR         $CE01
69A5: A6 03          LDA         +$03,X
69A7: 84 CF          ANDA        #$CF
69A9: A7 03          STA         +$03,X
69AB: 86 FF          LDA         #$FF
69AD: A7 02          STA         +$02,X
69AF: 34 02          PSHS        A
69B1: DC F0          LDD         $F0
69B3: C3 00 09       ADDD        #$0009
69B6: 34 06          PSHS        B,A
69B8: B6 02 C0       LDA         $02C0
69BB: F6 02 C9       LDB         $02C9
69BE: CB 03          ADDB        #$03
69C0: 3D             MUL  
69C1: E3 E1          ADDD        ,S++
69C3: BD D7 E6       JSR         $D7E6		; byte from stack to SEQRAM
69C6: 4F             CLRA 
69C7: BD CE 01       JSR         $CE01
69CA: A6 03          LDA         +$03,X
69CC: 84 30          ANDA        #$30
69CE: 26 12          BNE         $69E2
69D0: 30 88 1B       LEAX        +$1B,X
69D3: 8C 03 C7       CMPX        #$03C7
69D6: 26 F2          BNE         $69CA
69D8: B6 00 F2       LDA         $00F2
69DB: C6 7F          LDB         #$7F
69DD: 8E 01 C7       LDX         #$01C7
69E0: E7 86          STB         A,X
69E2: 35 82          PULS        PC,A

--- master play routine (?)
--- check for envelope restart
------------------------------------------------
69E4: E6 C8 24       LDB         +$24,U		; check ENV. RESET bit
69E7: 2A 0E          BPL         $69F7		; if not set skip init

--- master play routine
--- envelope restart
------------------------------------------------
69E9: CC 00 00       LDD         #$0000		; initialize envelopes
69EC: ED 2A          STD         +$0A,Y		; start level 1 to 0
69EE: ED A8 1C       STD         +$1C,Y		; start level 2 to 0
69F1: ED A8 2E       STD         +$2E,Y		; start level 3 to 0
69F4: ED A8 40       STD         +$40,Y		; start level 4 to 0
69F7: BD F3 8B       JSR         $F38B
69FA: BD EE EA       JSR         $EEEA		; envelope master routine
69FD: BD EB 48       JSR         $EB48
6A00: BD F2 11       JSR         $F211		; LFO processing
6A03: BD F3 FD       JSR         $F3FD
6A06: AE A8 C7       LDX         -$39,Y		; DOC address
6A09: 1A 10          ORCC        #$10		; disable IRQ
6A0B: A6 88 21       LDA         +$21,X		; get channel address bits
6A0E: 84 F0          ANDA        #$F0
6A10: 9A 66          ORA         $66		; mix in rest of osc control
6A12: A7 88 21       STA         +$21,X		; store back
6A15: AE A8 D9       LDX         -$27,Y		; same for osc #2 w/o mix 
6A18: A6 88 21       LDA         +$21,X
6A1B: 84 F0          ANDA        #$F0
6A1D: A7 88 21       STA         +$21,X
6A20: AE A8 EB       LDX         -$15,Y		; same for osc #3 w/o mix
6A23: A6 88 21       LDA         +$21,X
6A26: 84 F0          ANDA        #$F0
6A28: A7 88 21       STA         +$21,X
6A2B: BD F1 AB       JSR         $F1AB
6A2E: A6 38          LDA         -$08,Y		; set panning
6A30: A7 84          STA         ,X
6A32: A7 88 C0       STA         -$40,X
6A35: A7 84          STA         ,X
6A37: A7 36          STA         -$0A,Y
6A39: A6 3D          LDA         -$03,Y		; set filter
6A3B: A7 84          STA         ,X
6A3D: A7 18          STA         -$08,X
6A3F: A7 84          STA         ,X
6A41: A7 3B          STA         -$05,Y
6A43: 1C EF          ANDCC       #$EF		; enable IRQ
6A45: CC 00 00       LDD         #$0000		; zero PAN and FF increment
6A48: ED 39          STD         -$07,Y
6A4A: ED 3E          STD         -$02,Y
6A4C: 39             RTS  

------------------------------------------------
--- master routine (4) via $f773 ---------------
--- S: $0fbd	   ROMLOW: $0000 ---------------
------------------------------------------------
6A4D: 10 8E 40 70    LDY         #$4070		; start of voice data blocks
6A51: 10 9F 61       STY         $61
6A54: 86 05          LDA         #$05
6A56: BD 84 60       JSR         $8460		; 5 to [$0e]+12
6A59: 10 8E 40 70    LDY         #$4070		; start of voice data blocks
6A5D: 10 9F 63       STY         $63
6A60: BD F3 FD       JSR         $F3FD
6A63: BD F1 9B       JSR         $F19B	
6A66: 31 A9 00 E7    LEAY        +$00E7,Y	; next voice data block
6A6A: BD F1 AB       JSR         $F1AB
6A6D: 10 9F 63       STY         $63		; store current vdb
6A70: 03 65          COM         $65
6A72: 26 07          BNE         $6A7B
6A74: AD 9F 0D AC    JSR         [$0DAC]
6A78: BD F1 DE       JSR         $F1DE
6A7B: BD 83 F3       JSR         $83F3
6A7E: 10 9E 63       LDY         $63		; get current vdb
6A81: 31 A9 00 E7    LEAY        +$00E7,Y	; next voice data block
6A85: 10 8C 47 A8    CMPY        #$47A8		; repeat until last block
6A89: 25 D2          BCS         $6A5D		;   processed
6A8B: BD 84 4B       JSR         $844B
6A8E: 86 05          LDA         #$05
6A90: BD 84 60       JSR         $8460
6A93: 10 8E 40 70    LDY         #$4070		; voice data block base
6A97: BD F1 AB       JSR         $F1AB
6A9A: 31 A9 00 E7    LEAY        +$00E7,Y	; next voice data block
6A9E: 10 9F 63       STY         $63		; store current vdb
6AA1: BD F3 FD       JSR         $F3FD
6AA4: BD F1 9B       JSR         $F19B
6AA7: 10 9F 63       STY         $63		; store current vdb
6AAA: 03 65          COM         $65
6AAC: 26 07          BNE         $6AB5
6AAE: AD 9F 0D AC    JSR         [$0DAC]
6AB2: BD F1 DE       JSR         $F1DE
6AB5: BD 83 F3       JSR         $83F3
6AB8: 10 9E 63       LDY         $63		; get current vdb
6ABB: 31 A9 00 E7    LEAY        +$00E7,Y	; next voice data block
6ABF: 10 8C 47 A8    CMPY        #$47A8		; repeat until last block
6AC3: 25 D2          BCS         $6A97		;   processed
6AC5: 10 9E 61       LDY         $61		; get vdb base
6AC8: BD F2 3B       JSR         $F23B
6ACB: 31 A9 00 E7    LEAY        +$00E7,Y	; next voice data block
6ACF: 10 9F 61       STY         $61		; store current vdb
6AD2: BD 84 4B       JSR         $844B
6AD5: 10 9E 61       LDY         $61		; get current vdb
6AD8: 10 8C 47 A8    CMPY        #$47A8		; repeat until last block
6ADC: 10 25 FF 74    LBCS        $6A54		;   processed
6AE0: B6 64 0D       LDA         $640D		; get inport status
6AE3: D6 D6          LDB         $D6
6AE5: 26 0A          BNE         $6AF1
6AE7: 84 04          ANDA        #$04		; if bit 2 not set
6AE9: 27 04          BEQ         $6AEF		;   goto $eaef
6AEB: C6 04          LDB         #$04
6AED: D7 D6          STB         $D6
6AEF: 20 37          BRA         $6B28
------------------------------------------------
6AF1: C1 02          CMPB        #$02
6AF3: 26 0D          BNE         $6B02
6AF5: 84 04          ANDA        #$04
6AF7: 26 07          BNE         $6B00
6AF9: C6 00          LDB         #$00
6AFB: D7 D6          STB         $D6
6AFD: 4F             CLRA 
6AFE: 20 19          BRA         $6B19
------------------------------------------------
6B00: 20 26          BRA         $6B28
------------------------------------------------
6B02: 84 04          ANDA        #$04
6B04: 26 06          BNE         $6B0C
6B06: C6 00          LDB         #$00
6B08: D7 D6          STB         $D6
6B0A: 20 1C          BRA         $6B28
------------------------------------------------
6B0C: B6 3F FF       LDA         $3FFF		; ramcard inserted?
6B0F: 81 01          CMPA        #$01	
6B11: 26 15          BNE         $6B28
6B13: C6 02          LDB         #$02		; $d5/$d6 = $ff02
6B15: D7 D6          STB         $D6
6B17: 86 FF          LDA         #$FF
6B19: 97 D5          STA         $D5
6B1B: BD 84 79       JSR         $8479
6B1E: CC 7A 63       LDD         #$7A63		; ROMLOW $0a63
6B21: ED 22          STD         +$02,Y
6B23: BD 84 AE       JSR         $84AE
6B26: 0B 4F	     fdb	 $0B4F
6B28: 7E EA 4D       JMP         $EA4D		; loop $ea4d

------------------------------------------------
--- CARTRIDGE detection & vector setting -------
------------------------------------------------
6B2B: B6 64 0D       LDA         $640D		; get input port
6B2E: 84 04          ANDA        #$04		; get bit 2
6B30: 27 0D          BEQ         $6B3F		; not inserted -> $eb3f
6B32: B6 3F FF       LDA         $3FFF		; get last byte of cartridge
6B35: 81 01          CMPA        #$01
6B37: 26 06          BNE         $6B3F		; not formatted -> $eb3f
6B39: C6 02          LDB         #$02		; vector to $ff02
6B3B: 86 FF          LDA         #$FF
6B3D: 20 03          BRA         $6B42
------------------------------------------------
6B3F: C6 00          LDB         #$00		; vector to $0000	
6B41: 4F             CLRA 
6B42: D7 D6          STB         $D6		; $ff02 if cartridge present
6B44: 97 D5          STA         $D5		; $0000 if not
6B46: 39             RTS  

--- ???
------------------------------------------------
6B47: 00

------------------------------------------------
6B48: 34 40          PSHS        U
6B49: 40             NEGA 
6B4A: EE 24          LDU         +$04,Y
6B4C: 30 A8 9D       LEAX        -$63,Y		; LFO 1 current value
6B4F: 9F 68          STX         $68
6B51: 30 A8 AB       LEAX        -$55,Y		; LFO 2 current value
6B54: 9F 6A          STX         $6A
6B56: 30 A8 B9       LEAX        -$47,Y		; LFO 3 current value
6B59: 9F 6C          STX         $6C
6B5B: 30 2A          LEAX        +$0A,Y		; envelope 1 current value
6B5D: 9F 6E          STX         $6E
6B5F: 30 A8 1C       LEAX        +$1C,Y		; envelope 2 current value
6B62: 9F 70          STX         $70
6B64: 30 A8 2E       LEAX        +$2E,Y		; envelope 3 current value
6B67: 9F 72          STX         $72
6B69: 30 A8 40       LEAX        +$40,Y		; envelope 4 current value
6B6C: 9F 74          STX         $74
6B6E: 30 A8 62       LEAX        +$62,Y		; offset for $fa1d/$fa9d access
6B71: 9F 76          STX         $76
6B73: 30 A8 66       LEAX        +$66,Y
6B76: 9F 78          STX         $78
6B78: 30 A8 67       LEAX        +$67,Y
6B7B: 9F 7A          STX         $7A
6B7D: 30 A8 65       LEAX        +$65,Y
6B80: 9F 7C          STX         $7C
6B82: 30 48          LEAX        +$08,U		; am modamt #1
6B84: 9F 7E          STX         $7E
6B86: 30 49          LEAX        +$09,U		; am modamt #2
6B88: 9F 80          STX         $80
6B8A: 30 4A          LEAX        +$0A,U		; next semitone
6B8C: 9F 82          STX         $82
6B8E: 30 A8 63       LEAX        +$63,Y
6B91: 9F 84          STX         $84
6B93: 8E EB 47       LDX         #$EB47
6B96: 9F 86          STX         $86
6B98: 30 46          LEAX        +$06,U		; AM / DCA
6B9A: AF A8 5E       STX         +$5E,Y
6B9D: 30 4C          LEAX        +$0C,U		; FM src 1/2 for next osc.
6B9F: AF A8 73       STX         +$73,Y
6BA2: 35 40          PULS        U
6BA4: 8E 00 68       LDX         #$0068		; RAM variables for voice
6BA7: A6 A8 6E       LDA         +$6E,Y		; voice number pointer
6BAA: E6 C8 1F       LDB         +$1F,U		; check SYNC bit
6BAD: 2A 12          BPL         $6BC1		; no sync

--- oscillator synchronization
------------------------------------------------
6BAF: C4 7F          ANDB        #$7F		; set filter frequency
6BB1: E7 A8 59       STB         +$59,Y		; 
6BB4: 8A 04          ORA         #$04		; set SYNC 
6BB6: E6 A8 6D       LDB         +$6D,Y		; DOC segment
6BB9: C5 01          BITB        #$01		; check for odd oscillator
6BBB: 26 1D          BNE         $6BDA
6BBD: 20 0E          BRA         $6BCD
------------------------------------------------
6BBF: 20 24          BRA         $6BE5

--- no oscillator synchronization
------------------------------------------------
6BC1: C4 7F          ANDB        #$7F		; set filter frequency
6BC3: E7 A8 59       STB         +$59,Y		;
6BC6: E6 A8 6D       LDB         +$6D,Y		; DOC segment
6BC9: C5 01          BITB        #$01		; check for odd oscillator
6BCB: 27 0D          BEQ         $6BDA

--- odd oscillator
------------------------------------------------
6BCD: E7 A8 EC       STB         -$14,Y		; increment DOC address for
6BD0: 5C             INCB 			;   osc #1 to #3
6BD1: E7 A8 C8       STB         -$38,Y		;   starting with odd osc.
6BD4: 5C             INCB 
6BD5: E7 A8 DA       STB         -$26,Y
6BD8: 20 0B          BRA         $6BE5

--- even oscillator
------------------------------------------------
6BDA: E7 A8 C8       STB         -$38,Y		; increment DOC address for
6BDD: 5C             INCB 			;   osc #1 to #3
6BDE: E7 A8 DA       STB         -$26,Y		;   starting with even osc.
6BE1: 5C             INCB 
6BE2: E7 A8 EC       STB         -$14,Y

--- AM checking
------------------------------------------------
6BE5: E6 C8 1E       LDB         +$1E,U		; check AM bit
6BE8: 58             LSLB 			; 
6BE9: 24 02          BCC         $6BED		;

--- AM
------------------------------------------------
6BEB: 8A 04          ORA         #$04		; set SYNC (!?)

--- no AM
------------------------------------------------
6BED: 97 66          STA         $66
6BEF: CB 03          ADDB        #$03
6BF1: E7 A8 75       STB         +$75,Y
6BF4: 84 F0          ANDA        #$F0		; clear low nibble
6BF6: E6 C8 25       LDB         +$25,U		; check OSC WAVE RESET
6BF9: 2A 02          BPL         $6BFD

--- osc wave reset
------------------------------------------------
6BFB: 8A 03          ORA         #$03		; set one-shot/halt

--- no osc wave reset
------------------------------------------------
6BFD: 97 67          STA         $67
6BFF: E6 C8 21       LDB         +$21,U		; get filter mod src #1 address
6C02: C4 0F          ANDB        #$0F		;
6C04: 58             LSLB 			; get filter mod src #1 
6C05: EC 85          LDD         B,X		; 
6C07: ED A8 52       STD         +$52,Y		; set filter mod src #1
6C0A: E6 C8 22       LDB         +$22,U		; get filter modamt #1
6C0D: 58             LSLB 			; 
6C0E: E7 A8 54       STB         +$54,Y		; set filter modamt #1
6C11: E6 C8 21       LDB         +$21,U		; get filter mod src #2 address
6C14: C4 F0          ANDB        #$F0		;
6C16: 54             LSRB 			;
6C17: 54             LSRB 			;
6C18: 54             LSRB 			;
6C19: EC 85          LDD         B,X		; get filter mod src #2 
6C1B: ED A8 55       STD         +$55,Y		; set filter mod src #2
6C1E: E6 C8 23       LDB         +$23,U		; get filter modamt #2
6C21: 58             LSLB 			;
6C22: E7 A8 57       STB         +$57,Y		; set filter modamt #2
6C25: E6 C8 24       LDB         +$24,U		; get keytrack (ff mod src #3)
6C28: 58             LSLB 			;
6C29: E7 A8 58       STB         +$58,Y		; set filter mod src #3
6C2C: E6 C8 20       LDB         +$20,U		; get filter resonance
6C2F: 58             LSLB 			;
6C30: 58             LSLB 			;
6C31: E7 A8 5A       STB         +$5A,Y		; set filter resonance
6C34: E6 C8 2A       LDB         +$2A,U		; get pan value
6C37: C4 F0          ANDB        #$F0		;
6C39: E7 30          STB         -$10,Y		; set pan value
6C3B: E6 C8 2A       LDB         +$2A,U		; get pan mod src address
6C3E: C4 0F          ANDB        #$0F		;
6C40: 58             LSLB 			;
6C41: EC 85          LDD         B,X		; get pan mod src
6C43: ED 33          STD         -$0D,Y		; set pan mod src
6C45: E6 C8 2B       LDB         +$2B,U		; get pan modamt
6C48: 58             LSLB 			;
6C49: E7 35          STB         -$0B,Y		; set pan modamt
6C4B: A6 A8 61       LDA         +$61,Y
6C4E: 80 24          SUBA        #$24		; 36
6C50: 34 02          PSHS        A
6C52: CC 0C 02       LDD         #$0C02		; outport = $0c02
6C55: FD 64 0E       STD         $640E		;
6C58: BD EC B3       JSR         $ECB3		; process oscillator #1
6C5B: A6 88 21       LDA         +$21,X		; merge oscillator control #1
6C5E: 9A 67          ORA         $67		;   with run-mode
6C60: A7 88 21       STA         +$21,X		; 
6C63: 31 A8 12       LEAY        +$12,Y		; next VDB oscillator block
6C66: 33 4A          LEAU        +$0A,U		; next PCB oscillator block
6C68: BD EC B3       JSR         $ECB3		; process oscillator #2
6C6B: A6 88 21       LDA         +$21,X		; merge oscillator control #2		
6C6E: 9A 67          ORA         $67		;   with run-mode
6C70: A7 88 21       STA         +$21,X		; 
6C73: 31 A8 12       LEAY        +$12,Y		; next VDB oscillator block
6C76: 33 4A          LEAU        +$0A,U		; next PCB oscillator block
6C78: BD EC B3       JSR         $ECB3		; process oscillator #3
6C7B: A6 88 21       LDA         +$21,X		; merge oscillator control #3
6C7E: 9A 67          ORA         $67		;   with run-mode
6C80: A7 88 21       STA         +$21,X		; 
6C83: 31 A8 DC       LEAY        -$24,Y		; restore VDB pointer
6C86: 33 C8 EC       LEAU        -$14,U		; restore PCB pointer
6C89: 35 82          PULS        PC,A

--- U: points to PCB, first oscillator block
------------------------------------------------
6C8B: A6 A8 61       LDA         +$61,Y
6C8E: 80 24          SUBA        #$24		; 36
6C90: 34 02          PSHS        A		; rescue A
6C92: CC 0C 02       LDD         #$0C02		; outport = $0c02
6C95: FD 64 0E       STD         $640E		;
6C98: BD ED 0B       JSR         $ED0B		; process oscillator #1
6C9B: 31 A8 12       LEAY        +$12,Y		; next VDB oscillator block
6C9E: 33 4A          LEAU        +$0A,U		; next PCB oscillator block
6CA0: BD ED 0B       JSR         $ED0B		; process oscillator #2
6CA3: 31 A8 12       LEAY        +$12,Y		; next VDB oscillator block
6CA6: 33 4A          LEAU        +$0A,U		; next PCB oscillator block
6CA8: BD ED 0B       JSR         $ED0B		; process oscillator #3
6CAB: 31 A8 DC       LEAY        -$24,Y		; restore VDB pointer
6CAE: 33 C8 EC       LEAU        -$14,U		; restore PCB pointer
6CB1: 35 82          PULS        PC,A

------------------------------------------------
6CB3: 8E 00 68       LDX         #$0068		; actual voice parameter base
6CB6: E6 46          LDB         +$06,U
6CB8: 58             LSLB 			; if bit 7 set (AM bit?)
6CB9: 25 0C          BCS         $6CC7		;   goto $6cc7
6CBB: 5F             CLRB 			;
6CBC: E7 A8 C6       STB         -$3A,Y		; zero amplitude stuff (?)
6CBF: E7 A8 C2       STB         -$3E,Y		; zero AM modamt #1
6CC2: E7 A8 C5       STB         -$3B,Y		; zero AM modamt #2
6CC5: 20 24          BRA         $6CEB
------------------------------------------------
6CC7: 54             LSRB 
6CC8: E7 A8 C6       STB         -$3A,Y		; set amplitude stuff (?)
6CCB: E6 47          LDB         +$07,U		; get AM src #1
6CCD: C4 0F          ANDB        #$0F
6CCF: 58             LSLB 
6CD0: EC 85          LDD         B,X		; get AM src #1 address
6CD2: ED A8 C0       STD         -$40,Y
6CD5: E6 48          LDB         +$08,U		; get AM modamt #1
6CD7: E7 A8 C2       STB         -$3E,Y
6CDA: E6 47          LDB         +$07,U		; get AM src #2 
6CDC: C4 F0          ANDB        #$F0		
6CDE: 54             LSRB 			
6CDF: 54             LSRB 
6CE0: 54             LSRB 
6CE1: EC 85          LDD         B,X		; get AM src #2 address
6CE3: ED A8 C3       STD         -$3D,Y
6CE6: E6 49          LDB         +$09,U		; get AM modamt #2
6CE8: E7 A8 C5       STB         -$3B,Y
6CEB: E6 42          LDB         +$02,U		; fm src #1
6CED: C4 0F          ANDB        #$0F
6CEF: 58             LSLB 
6CF0: EC 85          LDD         B,X		; fm src #1 address
6CF2: ED A8 BA       STD         -$46,Y
6CF5: E6 43          LDB         +$03,U		; fm modamt #1
6CF7: E7 A8 BC       STB         -$44,Y
6CFA: E6 42          LDB         +$02,U		; fm src #2
6CFC: C4 F0          ANDB        #$F0
6CFE: 54             LSRB 
6CFF: 54             LSRB 
6D00: 54             LSRB 
6D01: EC 85          LDD         B,X		; fm src #2 address
6D03: ED A8 BD       STD         -$43,Y
6D06: E6 44          LDB         +$04,U		; fm modamt #2
6D08: E7 A8 BF       STB         -$41,Y

6D0B: E6 C4          LDB         ,U		; semitone
6D0D: EB 62          ADDB        +$02,S		; + modulators (?)
6D0F: 28 02          BVC         $6D13		; if overflow set maximum
6D11: C6 7F          LDB         #$7F		;   to 127 semitones
6D13: 54             LSRB 			; create wave pointer
6D14: 54             LSRB 			;   0-16
6D15: 54             LSRB 
6D16: 34 04          PSHS        B		; wave pointer to stack
6D18: E6 45          LDB         +$05,U		; waveform
6D1A: C1 36          CMPB        #$36		; below wave 54?
6D1C: 25 06          BCS         $6D24

--- transient waveforms
------------------------------------------------
6D1E: 96 67          LDA         $67		; set one-shot/IRQ (?)
6D20: 8A 03          ORA         #$03		; one-shot/IRQ (?)
6D22: 97 67          STA         $67

--- looped waveforms
------------------------------------------------
6D24: 86 10          LDA         #$10		; waveform no. * 16
6D26: 3D             MUL  
6D27: EB E0          ADDB        ,S+		; add semitone offset
6D29: 8E 70 00       LDX         #$7000		; get wave offset  
6D2C: E6 8B          LDB         D,X		;   from ROMLOW $1000
6D2E: 4F             CLRA			; offset * 4
6D2F: 58             LSLB 			 
6D30: 49             ROLA 			
6D31: 58             LSLB 
6D32: 49             ROLA 
6D33: C3 74 B0       ADDD        #$74B0		; get wave parameters
6D36: 1F 01          TFR         D,X		; resulting address to X
6D38: EC 02          LDD         +$02,X		; second word to stack
6D3A: 34 06          PSHS        B,A
6D3C: EC 84          LDD         ,X		; first byte to DOC
6D3E: AE A8 C7       LDX         -$39,Y		; DOC address
6D41: A7 01          STA         +$01,X		; wavetable ptr (?)
6D43: A6 C4          LDA         ,U		; semitone
6D45: AB E0          ADDA        ,S+		; sample semitone shift
6D47: 80 24          SUBA        #$24		; wave octave is 0-3
6D49: 2D 09          BLT         $6D54		;
6D4B: 81 18          CMPA        #$18		; wave octave is 3-5
6D4D: 2D 03          BLT         $6D52		;

--- wave octave is <0
------------------------------------------------
6D4F: 5A             DECB 			; adjust address bus resolution
6D50: 20 11          BRA         $6D63

--- wave octave is 3-5
------------------------------------------------
6D52: 20 0D          BRA         $6D61

--- wave octave is 0-3
------------------------------------------------
6D54: 5C             INCB 			; adjust address bus resolution
6D55: 8B 0C          ADDA        #$0C		; +1 octave
6D57: 2C 08          BGE         $6D61
6D59: 5C             INCB 			; adjust address bus resolution
6D5A: 8B 0C          ADDA        #$0C		; +1 octave
6D5C: 2C 03          BGE         $6D61
6D5E: 5C             INCB			; adjust address bus resolution 
6D5F: 8B 0C          ADDA        #$0C		; +1 octave

--- wave octave is 3-5
6D61: 8B 0C          ADDA        #$0C		; +1 octave

--- wave octave is <0
6D63: A7 A8 C9       STA         -$37,Y		: set DOC frequency MSB
6D66: A6 41          LDA         +$01,U		; get fine tune
6D68: AB E0          ADDA        ,S+		; sample fine tune 
6D6A: A7 A8 CA       STA         -$36,Y		; set DOC frequency LSB
6D6D: 24 03          BCC         $6D72
6D6F: 6C A8 C9       INC         -$37,Y		; increment DOC frequency MSB
6D72: A7 A8 CA       STA         -$36,Y		; set DOC frequency LSB
6D75: 8C 60 7F       CMPX        #$607F		; DOC address
6D78: 26 03          BNE         $6D7D
6D7A: 30 88 18       LEAX        +$18,X		; inc. oscillator ptr. by 24
6D7D: A6 88 20       LDA         +$20,X		; get wavetable pointer
6D80: 5D             TSTB 			;
6D81: 2A 04          BPL         $6D87
6D83: 8A 80          ORA         #$80		; select upper 32kB of waverom
6D85: 20 02          BRA         $6D89
------------------------------------------------
6D87: 84 7F          ANDA        #$7F		; select lower 32kB of waverom
6D89: A7 88 20       STA         +$20,X		; set wavetable pointer
6D8C: AE A8 C7       LDX         -$39,Y		; get DOC address				
6D8F: E7 88 41       STB         +$41,X		; set osc. control register
6D92: 39             RTS  

--- envelope processing
------------------------------------------------
6D93: AD B8 11       JSR         [+$11,Y]	; process envelope 1
6D96: 31 A8 12       LEAY        +$12,Y		; next VDB envelope block
6D99: AD B8 11       JSR         [+$11,Y]	; process envelope 2
6D9C: 31 A8 12       LEAY        +$12,Y		; next VDB envelope block
6D9F: AD B8 11       JSR         [+$11,Y]	; process envelope 3
6DA2: 31 A8 12       LEAY        +$12,Y		; next VDB envelope block
6DA5: AD B8 11       JSR         [+$11,Y]	; process envelope 4
6DA8: 31 A8 CA       LEAY        -$36,Y		; restore Y
6DAB: 8C FF FF       CMPX        #$FFFF		; X underrun?	
6DAE: 26 18          BNE         $6DC8		; no -> $edc8
6DB0: E6 A8 6D       LDB         +$6D,Y		; DOC segment
6DB3: 86 60          LDA         #$60		; DOC base
6DB5: 1F 01          TFR         D,X		; DOC address to X
6DB7: 6C 88 21       INC         +$21,X		; increment wavetable pointers
6DBA: 6C 88 22       INC         +$22,X		
6DBD: 6C 88 23       INC         +$23,X
6DC0: 6F A8 5A       CLR         +$5A,Y		; clear filter resonance
6DC3: 6F 35          CLR         -$0B,Y		; clear pan modulation amt.
6DC5: BD 85 A7       JSR         $85A7		; jump to ROMLOW $2b2b
6DC8: 7E EF B4       JMP         $EFB4		; oscillator master routine

------------------------------------------------
--- clear X register (by [+$11,Y]) -------------
------------------------------------------------
6DCB: 8E 00 00       LDX         #$0000
6DCE: 39             RTS  

------------------------------------------------
--- increment envelope -------------------------
------------------------------------------------
6DCF: EC 2A          LDD         +$0A,Y		; envelope current value
6DD1: E3 2C          ADDD        +$0C,Y		; increment by delta y
6DD3: 29 04          BVS         $6DD9		; overflow -> final value
6DD5: A1 2E          CMPA        +$0E,Y		; final value reached?
6DD7: 2F 03          BLE         $6DDC		; no -> store back
6DD9: A6 2E          LDA         +$0E,Y		; yes, set final value
6DDB: 5F             CLRB 
6DDC: ED 2A          STD         +$0A,Y		; write back envelope value
6DDE: AE 2F          LDX         +$0F,Y		; decrement delta t
6DE0: 30 1F          LEAX        -$01,X
6DE2: AF 2F          STX         +$0F,Y
6DE4: 26 08          BNE         $6DEE		; time not expired -> return
6DE6: A6 2E          LDA         +$0E,Y		; time expired ->
6DE8: 5F             CLRB 			; envelope value = destination
6DE9: ED 2A          STD         +$0A,Y
6DEB: 6E B8 13       JMP         [+$13,Y]	; next envelope stage
------------------------------------------------
6DEE: 39             RTS  

------------------------------------------------
--- decrement envelope -------------------------
------------------------------------------------
6DEF: EC 2A          LDD         +$0A,Y		; envelope current value
6DF1: A3 2C          SUBD        +$0C,Y		; decrement by delta y
6DF3: 29 04          BVS         $6DF9		; underrun -> final value
6DF5: A1 2E          CMPA        +$0E,Y		; final value reached?
6DF7: 2C 03          BGE         $6DFC		; no -> write back
6DF9: A6 2E          LDA         +$0E,Y		; yes, set final value
6DFB: 5F             CLRB 
6DFC: ED 2A          STD         +$0A,Y		; write back envelope value
6DFE: AE 2F          LDX         +$0F,Y		; decrement delta t
6E00: 30 1F          LEAX        -$01,X
6E02: AF 2F          STX         +$0F,Y
6E04: 26 08          BNE         $6E0E		; time not expired -> return
6E06: A6 2E          LDA         +$0E,Y		; time expired ->
6E08: 5F             CLRB 			; envelope value = destination
6E09: ED 2A          STD         +$0A,Y
6E0B: 6E B8 13       JMP         [+$13,Y]	; next envelope stage
------------------------------------------------
6E0E: 39             RTS  


--- by envelope jump vector [+$13,Y] 
------------------------------------------------
6E0F: 8E EE 35       LDX         #$EE35		; envelope vector = $ee35
6E12: AF A8 13       STX         +$13,Y		;
6E15: A6 A8 18       LDA         +$18,Y		; get t2
6E18: A0 A8 1B       SUBA        +$1B,Y		; subtract tk
6E1B: 2A 01          BPL         $6E1E		; zero time if underrun
6E1D: 4F             CLRA 			;
6E1E: 97 88          STA         $88		; store delta T
6E20: A6 A8 15       LDA         +$15,Y		; get l1
6E23: 2A 09          BPL         $6E2E
6E25: E6 A8 17       LDB         +$17,Y		; throw in lv
6E28: 3D             MUL  			;
6E29: A0 A8 17       SUBA        +$17,Y		;
6E2C: 20 04          BRA         $6E32
------------------------------------------------
6E2E: E6 A8 17       LDB         +$17,Y		; thow in lv
6E31: 3D             MUL  			;
6E32: 7E EF 7E       JMP         $EF7E


--- by envelope jump vector [+$13,Y] 
------------------------------------------------
6E35: 8E EE 5B       LDX         #$EE5B		; envelope vector = $ee5b
6E38: AF A8 13       STX         +$13,Y
6E3B: A6 A8 19       LDA         +$19,Y
6E3E: A0 A8 1B       SUBA        +$1B,Y
6E41: 2A 01          BPL         $6E44
6E43: 4F             CLRA 
6E44: 97 88          STA         $88
6E46: A6 A8 16       LDA         +$16,Y
6E49: 2A 09          BPL         $6E54
6E4B: E6 A8 17       LDB         +$17,Y
6E4E: 3D             MUL  
6E4F: A0 A8 17       SUBA        +$17,Y
6E52: 20 04          BRA         $6E58
------------------------------------------------
6E54: E6 A8 17       LDB         +$17,Y
6E57: 3D             MUL  
6E58: 7E EF 7E       JMP         $EF7E


--- by envelope jump vector [+$13,Y] 
------------------------------------------------
6E5B: 6D 2A          TST         +$0A,Y		; envelope value = 0
6E5D: 27 41          BEQ         $6EA0		; -> $eea0
6E5F: BE 00 63       LDX         $0063		; gate bit set?
6E62: A6 88 5B       LDA         +$5B,X		;
6E65: 2B 07          BMI         $6E6E		; yes -> release processing
6E67: 8E ED CB       LDX         #$EDCB		; envelope subr. = $edcb
6E6A: AF A8 11       STX         +$11,Y
6E6D: 39             RTS  

------------------------------------------------
--- envelope release ---------------------------
------------------------------------------------
6E6E: A6 A8 1A       LDA         +$1A,Y		; get 2R/T4
6E71: 2B 0D          BMI         $6E80		; 2nd-release set?

------------------------------------------------
--- normal release -----------------------------
------------------------------------------------
6E73: 84 3F          ANDA        #$3F		; separate T4
6E75: 97 88          STA         $88		; 
6E77: 8E EE A0       LDX         #$EEA0		; envelope vector = $eea0 
6E7A: AF A8 13       STX         +$13,Y		;
6E7D: 4F             CLRA 
6E7E: 20 0F          BRA         $6E8F

------------------------------------------------
--- second release -----------------------------
------------------------------------------------
6E80: 84 3F          ANDA        #$3F		; separate T4
6E82: 97 88          STA         $88		;
6E84: 8E EE 92       LDX         #$EE92		; envelope vector = $ee92
6E87: AF A8 13       STX         +$13,Y
6E8A: A6 2A          LDA         +$0A,Y		; envelope value
6E8C: 47             ASRA 			; /2
6E8D: 80 0C          SUBA        #$0C		; -12
6E8F: 7E EF 7E       JMP         $EF7E		; finish envelope processing

--- by envelope jump vector [+$13,Y] 
------------------------------------------------
6E92: 86 27          LDA         #$27
6E94: 97 88          STA         $88
6E96: 8E EE A0       LDX         #$EEA0		; envelope vector = $eea0
6E99: AF A8 13       STX         +$13,Y
6E9C: 4F             CLRA 
6E9D: 7E EF 7E       JMP         $EF7E

--- by envelope jump vector [+$13,Y] 
------------------------------------------------
6EA0: 8E ED CB       LDX         #$EDCB		; envelope subroutine = $edcb
6EA3: AF A8 11       STX         +$11,Y
6EA6: 8E FF FF       LDX         #$FFFF
6EA9: 39             RTS  

------------------------------------------------
--- envelope master routine --------------------
------------------------------------------------
6EAA: A6 A8 5B       LDA         +$5B,Y		; CYCLE bit set?
6EAD: 2B 18          BMI         $6EC7		; yes -> skip this
6EAF: BD EE 6E       JSR         $EE6E		; process envelope #1
6EB2: 31 A8 12       LEAY        +$12,Y		; next VDB envelope block
6EB5: BD EE 6E       JSR         $EE6E		; process envelope #2
6EB8: 31 A8 12       LEAY        +$12,Y		; next VDB envelope block
6EBB: BD EE 6E       JSR         $EE6E		; process envelope #3
6EBE: 31 A8 12       LEAY        +$12,Y		; next VDB envelope block
6EC1: BD EE 6E       JSR         $EE6E		; process envelope #4
6EC4: 31 A8 CA       LEAY        -$36,Y		; restore Y
6EC7: 39             RTS  

------------------------------------------------
--- init envelopes -----------------------------
------------------------------------------------
6EC8: BD EE E1       JSR         $EEE1		; init envelope #1
6ECB: 31 A8 12       LEAY        +$12,Y		; next VDB envelope block		
6ECE: BD EE E1       JSR         $EEE1		; init envelope #2
6ED1: 31 A8 12       LEAY        +$12,Y		; next VDB envelope block
6ED4: BD EE E1       JSR         $EEE1		; init envelope #3
6ED7: 31 A8 12       LEAY        +$12,Y		; next VDB envelope block
6EDA: BD EE E1       JSR         $EEE1		; init envelope #4
6EDD: 31 A8 CA       LEAY        -$36,Y		; restore Y
6EE0: 39             RTS  

------------------------------------------------
--- envelope subroutine handler = $edcb --------
--- clear envelope value -----------------------
------------------------------------------------
6EE1: 8E ED CB       LDX         #$EDCB		; envelope subroutine = $edcb		
6EE4: AF A8 11       STX         +$11,Y	
6EE7: 6F 2A          CLR         +$0A,Y		; clear envelope value
6EE9: 39             RTS  

------------------------------------------------
6EEA: A6 A8 61       LDA         +$61,Y
6EED: 80 24          SUBA        #$24		; -36
6EEF: 2A 01          BPL         $6EF2
6EF1: 4F             CLRA			; underrun: a=0 
6EF2: 48             LSLA 
6EF3: 97 8A          STA         $8A
6EF5: A6 C8 2B       LDA         +$2B,U		; CYCLE + pan modamt
6EF8: A7 A8 5B       STA         +$5B,Y
6EFB: A6 A8 66       LDA         +$66,Y
6EFE: 48             LSLA 
6EFF: 97 68          STA         $68
6F01: BD EF 23       JSR         $EF23		; process envelope #1
6F04: 31 A8 12       LEAY        +$12,Y		; next VDB envelope block
6F07: 33 4A          LEAU        +$0A,U		; next PCB envelope block
6F09: BD EF 23       JSR         $EF23		; process envelope #2
6F0C: 31 A8 12       LEAY        +$12,Y		; next VDB envelope block
6F0F: 33 4A          LEAU        +$0A,U		; next PCB envelope block
6F11: BD EF 23       JSR         $EF23		; process envelope #3
6F14: 31 A8 12       LEAY        +$12,Y		; next VDB envelope block
6F17: 33 4A          LEAU        +$0A,U		; next PCB envelope block
6F19: BD EF 23       JSR         $EF23		; process envelope #4
6F1C: 31 A8 CA       LEAY        -$36,Y		; restore VDB pointer
6F1F: 33 C8 E2       LEAU        -$1E,U		; restore PCB pointer
6F22: 39             RTS  

--- fetch envelope parameters
------------------------------------------------
6F23: EC C8 CD       LDD         -$33,U		; get L1 & L2
6F26: ED A8 15       STD         +$15,Y
6F29: E6 C8 D0       LDB         -$30,U		; get T2
6F2C: E7 A8 18       STB         +$18,Y
6F2F: E6 C8 D1       LDB         -$2F,U		; get T3
6F32: E7 A8 19       STB         +$19,Y
6F35: E6 C8 D2       LDB         -$2E,U		; get 2R/T4
6F38: E7 A8 1A       STB         +$1A,Y
6F3B: E6 C8 D5       LDB         -$2B,U		; get TK
6F3E: 96 8A          LDA         $8A		; multiply by key (?)
6F40: 3D             MUL  			;
6F41: A7 A8 1B       STA         +$1B,Y
6F44: A6 C8 D3       LDA         -$2D,U		; get LV / L/E
6F47: 97 89          STA         $89
6F49: 44             LSRA 			; check for L/E bit
6F4A: 24 04          BCC         $6F50
------------------------------------------------; exponential mode
6F4C: D6 68          LDB         $68		; exponential multiplier 
6F4E: 20 02          BRA         $6F52
------------------------------------------------; linear mode
6F50: D6 8B          LDB         $8B		; linear multiplier
6F52: 48             LSLA 			; restore LV
6F53: 3D             MUL  			; perform LV operation
6F54: 90 89          SUBA        $89
6F56: 4A             DECA 
6F57: A7 A8 17       STA         +$17,Y		; write back LV/LE
6F5A: D6 8B          LDB         $8B
6F5C: A6 C8 D4       LDA         -$2C,U		; get T1V
6F5F: 3D             MUL  
6F60: 40             NEGA 
6F61: AB C8 CF       ADDA        -$31,U
6F64: 2A 01          BPL         $6F67
6F66: 4F             CLRA 
6F67: 97 88          STA         $88
6F69: 8E EE 0F       LDX         #$EE0F		; envelope vector = $ee0f
6F6C: AF A8 13       STX         +$13,Y		;
6F6F: E6 A8 17       LDB         +$17,Y		; LV
6F72: A6 C8 CC       LDA         -$34,U		; L1
6F75: 2A 06          BPL         $6F7D
6F77: 3D             MUL  
6F78: A0 A8 17       SUBA        +$17,Y		; LV
6F7B: 20 01          BRA         $6F7E
------------------------------------------------
6F7D: 3D             MUL  

------------------------------------------------
--- finish envelope processing -----------------
------------------------------------------------
6F7E: A7 2E          STA         +$0E,Y		; L1*LV 
6F80: A0 2A          SUBA        +$0A,Y		; current env. value MSB
6F82: 26 08          BNE         $6F8C
6F84: 8E ED FE       LDX         #$EDFE		; envelope subr. = $edfe
6F87: AF A8 11       STX         +$11,Y		;
6F8A: 20 1D          BRA         $6FA9
------------------------------------------------
6F8C: 2C 06          BGE         $6F94
6F8E: 8E ED EF       LDX         #$EDEF		; envelope subr.: decrement
6F91: 40             NEGA 
6F92: 20 03          BRA         $6F97
------------------------------------------------
6F94: 8E ED CF       LDX         #$EDCF		; envelope subr.: increment
6F97: AF A8 11       STX         +$11,Y		;
6F9A: 8E FB 9D       LDX         #$FB9D		; get delta y table offset
6F9D: A6 86          LDA         A,X		;
6F9F: 90 88          SUBA        $88
6FA1: 48             LSLA 
6FA2: 8E FC 9D       LDX         #$FC9D		; get delta y value
6FA5: EC 86          LDD         A,X
6FA7: ED 2C          STD         +$0C,Y
6FA9: 8E FF 1D       LDX         #$FF1D		; get delta t value
6FAC: 96 88          LDA         $88		;   actual T
6FAE: 48             LSLA 			;   adjust pointer
6FAF: EC 86          LDD         A,X		;   get delta T from table
6FB1: ED 2F          STD         +$0F,Y		;   store delta T
6FB3: 39             RTS  

------------------------------------------------
--- oscillator master routine ------------------
------------------------------------------------
6FB4: 86 0E          LDA         #$0E		; ROMLOW $7000
6FB6: B7 64 0F       STA         $640F
6FB9: BD F0 9C       JSR         $F09C		; process oscillator 1
6FBC: 31 A8 12       LEAY        +$12,Y		; next oscillator block
6FBF: BD F0 9C       JSR         $F09C		; process oscillator 2
6FC2: 31 A8 12       LEAY        +$12,Y		; next oscillator block
6FC5: BD F0 9C       JSR         $F09C		; process oscillator 3
6FC8: 31 A8 DC       LEAY        -$24,Y		; restore Y
6FCB: A6 A8 40       LDA         +$40,Y		; envelope 4 value
6FCE: 2A 03          BPL         $6FD3
6FD0: 4F             CLRA 			; output volume = 0
6FD1: 20 01          BRA         $6FD4
------------------------------------------------
6FD3: 48             LSLA 			; output volume * 2
6FD4: E6 B8 73       LDB         [+$73,Y]	; * table
6FD7: 3D             MUL  
6FD8: E6 A8 75       LDB         +$75,Y		; * value
6FDB: 3D             MUL  	
6FDC: CE F9 1D       LDU         #$F91D		; PAN position table
6FDF: A6 C6          LDA         A,U
6FE1: A7 38          STA         -$08,Y		; current pan
6FE3: 5F             CLRB 
6FE4: E7 37          STB         -$09,Y		; 
6FE6: A0 36          SUBA        -$0A,Y		; last pan value
6FE8: 46             RORA 
6FE9: 56             RORB 
6FEA: 47             ASRA 
6FEB: 56             RORB 
6FEC: ED 39          STD         -$07,Y
6FEE: A6 B8 F3       LDA         [-$0D,Y]	; PAN modulator
6FF1: 2A 0E          BPL         $7001
6FF3: E6 35          LDB         -$0B,Y		; PAN modamt
6FF5: 2A 05          BPL         $6FFC
6FF7: 40             NEGA 
6FF8: 50             NEGB 
6FF9: 3D             MUL  			; PAN modulator * amount
6FFA: 20 10          BRA         $700C
------------------------------------------------
6FFC: 3D             MUL  			
6FFD: A0 35          SUBA        -$0B,Y		; PAN modamt
6FFF: 20 0B          BRA         $700C
------------------------------------------------
7001: E6 35          LDB         -$0B,Y		; PAN modamt
7003: 2A 06          BPL         $700B
7005: 3D             MUL  
7006: A0 B8 F3       SUBA        [-$0D,Y]	; PAN modulator
7009: 20 01          BRA         $700C
------------------------------------------------
700B: 3D             MUL  
700C: 58             LSLB			; PAN modulation *2 
700D: 49             ROLA 
700E: 2A 07          BPL         $7017
7010: AB 30          ADDA        -$10,Y
7012: 25 01          BCS         $7015
7014: 4F             CLRA 
7015: 20 06          BRA         $701D		; set DCA value
------------------------------------------------
7017: AB 30          ADDA        -$10,Y
7019: 24 02          BCC         $701D		; set DCA value if no overflow
701B: 86 FF          LDA         #$FF		; DCA value overflow -> max
701D: A7 32          STA         -$0E,Y
701F: A6 B8 52       LDA         [+$52,Y]	; filter mod src #1
7022: 2A 10          BPL         $7034
7024: E6 A8 54       LDB         +$54,Y		; filter modamt #1
7027: 2A 05          BPL         $702E
7029: 40             NEGA 
702A: 50             NEGB 
702B: 3D             MUL  
702C: 20 12          BRA         $7040
------------------------------------------------
702E: 3D             MUL  
702F: A0 A8 54       SUBA        +$54,Y		; filter modamt #1
7032: 20 0C          BRA         $7040
------------------------------------------------
7034: E6 A8 54       LDB         +$54,Y		; filter modamt #1
7037: 2A 06          BPL         $703F
7039: 3D             MUL  
703A: A0 B8 52       SUBA        [+$52,Y]	; filter mod src #1
703D: 20 01          BRA         $7040
------------------------------------------------
703F: 3D             MUL  
7040: DD 93          STD         $93		; overal filter mod. #1
7042: A6 B8 55       LDA         [+$55,Y]	; filter mod src #2
7045: 2A 10          BPL         $7057
7047: E6 A8 57       LDB         +$57,Y		; filter modamt #2
704A: 2A 05          BPL         $7051
704C: 40             NEGA 
704D: 50             NEGB 
704E: 3D             MUL  
704F: 20 12          BRA         $7063
------------------------------------------------
7051: 3D             MUL  
7052: A0 A8 57       SUBA        +$57,Y		; filter modamt #2
7055: 20 0C          BRA         $7063
------------------------------------------------
7057: E6 A8 57       LDB         +$57,Y		; filter modamt #2
705A: 2A 06          BPL         $7062
705C: 3D             MUL  
705D: A0 B8 55       SUBA        [+$55,Y]	; filter mod src #2
7060: 20 01          BRA         $7063
------------------------------------------------
7062: 3D             MUL  
7063: D3 93          ADDD        $93		; overall filter mod
7065: DD 93          STD         $93		; overall filter mod
7067: A6 A8 58       LDA         +$58,Y		; filter keytrack
706A: E6 A8 67       LDB         +$67,Y
706D: 3D             MUL  
706E: D3 93          ADDD        $93		; overall filter mod
7070: 29 05          BVS         $7077
7072: AB A8 59       ADDA        +$59,Y
7075: 28 09          BVC         $7080
7077: 24 03          BCC         $707C
7079: 4F             CLRA 
707A: 20 02          BRA         $707E
------------------------------------------------
707C: 86 FF          LDA         #$FF		; filter frequency = max
707E: 20 0E          BRA         $708E
------------------------------------------------
7080: 2A 03          BPL         $7085
7082: 4F             CLRA 
7083: 20 09          BRA         $708E		; set filter frequency
------------------------------------------------
7085: 58             LSLB 
7086: 49             ROLA 
7087: AB A8 5D       ADDA        +$5D,Y
708A: 24 02          BCC         $708E		; if overflow set max ff.
708C: 86 FF          LDA         #$FF
708E: A7 3D          STA         -$03,Y		; set filter frequency
7090: 5F             CLRB 
7091: E7 3C          STB         -$04,Y
7093: A0 3B          SUBA        -$05,Y
7095: 46             RORA 
7096: 56             RORB 
7097: 47             ASRA 
7098: 56             RORB 
7099: ED 3E          STD         -$02,Y
709B: 39             RTS  

------------------------------------------------
--- process FM / AM for one oscillator ---------
------------------------------------------------
709C: A6 B8 C0       LDA         [-$40,Y]	; AM src #1
709F: 2A 10          BPL         $70B1
70A1: E6 A8 C2       LDB         -$3E,Y		; AM modamt #1
70A4: 2A 05          BPL         $70AB
70A6: 40             NEGA 
70A7: 50             NEGB 
70A8: 3D             MUL  
70A9: 20 12          BRA         $70BD
------------------------------------------------
70AB: 3D             MUL  
70AC: A0 A8 C2       SUBA        -$3E,Y		; AM modamt #1
70AF: 20 0C          BRA         $70BD
------------------------------------------------
70B1: E6 A8 C2       LDB         -$3E,Y		; AM modamt #1
70B4: 2A 06          BPL         $70BC
70B6: 3D             MUL  
70B7: A0 B8 C0       SUBA        [-$40,Y]	; AM src #1
70BA: 20 01          BRA 	 $70BD
------------------------------------------------
70BC: 3D             MUL  
70BD: DD 91          STD         $91		; store overall AM #1
70BF: A6 B8 C3       LDA         [-$3D,Y]	; AM src #2
70C2: 2A 10          BPL         $70D4
70C4: E6 A8 C5       LDB         -$3B,Y		; AM modamt #2
70C7: 2A 05          BPL         $70CE
70C9: 40             NEGA 
70CA: 50             NEGB 
70CB: 3D             MUL  
70CC: 20 12          BRA         $70E0
------------------------------------------------
70CE: 3D             MUL  
70CF: A0 A8 C5       SUBA        -$3B,Y		; AM modamt #2
70D2: 20 0C          BRA         $70E0
------------------------------------------------
70D4: E6 A8 C5       LDB         -$3B,Y		; AM modamt #2
70D7: 2A 06          BPL         $70DF
70D9: 3D             MUL  
70DA: A0 B8 C3       SUBA        [-$3D,Y]	; AM src #2
70DD: 20 01          BRA         $70E0
------------------------------------------------
70DF: 3D             MUL  
70E0: D3 91          ADDD        $91		; overall AM #1
70E2: 2A 0F          BPL         $70F3
70E4: 58             LSLB 			; normalize final AM
70E5: 49             ROLA 
70E6: 28 03          BVC         $70EB
70E8: 4F             CLRA 
70E9: 20 06          BRA         $70F1
------------------------------------------------
70EB: AB A8 C6       ADDA        -$3A,Y
70EE: 2A 01          BPL         $70F1
70F0: 4F             CLRA 
70F1: 20 0F          BRA         $7102
------------------------------------------------
70F3: 58             LSLB 			; normalize final AM
70F4: 49             ROLA 
70F5: 28 04          BVC         $70FB
70F7: 86 7F          LDA         #$7F		; maximum AM
70F9: 20 07          BRA         $7102
------------------------------------------------
70FB: AB A8 C6       ADDA        -$3A,Y
70FE: 28 02          BVC         $7102
7100: 86 7F          LDA         #$7F		; maximum AM
7102: 8E F9 9D       LDX         #$F99D		; set overall AM
7105: A6 86          LDA         A,X
7107: A7 A8 CB       STA         -$35,Y
710A: A6 B8 BA       LDA         [-$46,Y]	; FM src #1
710D: 2A 10          BPL         $711F
710F: E6 A8 BC       LDB         -$44,Y		; FM modamt #1
7112: 2A 05          BPL         $7119
7114: 40             NEGA 
7115: 50             NEGB 
7116: 3D             MUL  
7117: 20 12          BRA         $712B
------------------------------------------------
7119: 3D             MUL  
711A: A0 A8 BC       SUBA        -$44,Y		; FM modamt #1
711D: 20 0C          BRA         $712B	
------------------------------------------------
711F: E6 A8 BC       LDB         -$44,Y		; FM modamt #1
7122: 2A 06          BPL         $712A
7124: 3D             MUL  
7125: A0 B8 BA       SUBA        [-$46,Y]	; FM src #1
7128: 20 01          BRA         $712B
------------------------------------------------
712A: 3D             MUL  
712B: 47             ASRA 
712C: 56             RORB 
712D: DD 8F          STD         $8F		; overall FM #1
712F: A6 B8 BD       LDA         [-$43,Y]	; FM src #2
7132: 2A 10          BPL         $7144
7134: E6 A8 BF       LDB         -$41,Y		; FM modamt #2
7137: 2A 05          BPL         $713E
7139: 40             NEGA 
713A: 50             NEGB 
713B: 3D             MUL  
713C: 20 12          BRA         $7150
------------------------------------------------
713E: 3D             MUL  
713F: A0 A8 BF       SUBA        -$41,Y		; FM modamt #2
7142: 20 0C          BRA         $7150
------------------------------------------------
7144: E6 A8 BF       LDB         -$41,Y		; FM modamt #2
7147: 2A 06          BPL         $714F
7149: 3D             MUL  
714A: A0 B8 BD       SUBA        [-$43,Y]	; FM src #2
714D: 20 01          BRA         $7150
------------------------------------------------
714F: 3D             MUL  
7150: 47             ASRA			; normalize 
7151: 56             RORB 
7152: D3 8F          ADDD        $8F		; overall FM #1
7154: D3 8D          ADDD        $8D		; overall FM #2
7156: E3 A8 C9       ADDD        -$37,Y		; actual frequency
7159: 2A 0E          BPL         $7169
715B: 29 07          BVS         $7164
715D: FC 70 00       LDD         $7000		; underrun: 
7160: 20 21          BRA         $7183		;   set lowest frequency 
------------------------------------------------
7162: 20 05          BRA         $7169
------------------------------------------------
7164: 83 0C 00       SUBD        #$0C00		; overflow correction
7167: 28 FB          BVC         $7164
7169: 8E 6F FE       LDX         #$6FFE		; frequency table base
716C: 47             ASRA 			; normalize frequency offset
716D: 56             RORB 
716E: 47             ASRA 
716F: 56             RORB 
7170: 47             ASRA 
7171: 56             RORB 
7172: 57             ASRB 
7173: 25 05          BCS         $717A
7175: 58             LSLB 
7176: EC 8B          LDD         D,X		; get frequency 
7178: 20 09          BRA         $7183
------------------------------------------------
717A: 58             LSLB 
717B: 30 8B          LEAX        D,X		; get in-between frequency
717D: EC 02          LDD         +$02,X
717F: E3 84          ADDD        ,X
7181: 46             RORA 			; normalize frequency
7182: 56             RORB 
7183: AE A8 C7       LDX         -$39,Y		; get DOC base
7186: 1A 10          ORCC        #$10		; disable IRQ
7188: E7 88 81       STB         -$7F,X		; set low frequency
718B: A7 88 A1       STA         -$5F,X		; set high frequency
718E: 1C EF          ANDCC       #$EF		; enable IRQ
7190: A6 A8 CB       LDA         -$35,Y		; get AM
7193: AB 88 C1       ADDA        -$3F,X		; add actual DOC volume
7196: 46             RORA 			; normalize
7197: A7 88 C1       STA         -$3F,X		; set new DOC volume
719A: 39             RTS  

------------------------------------------------
--- set VCA control voltage --------------------
------------------------------------------------
719B: AE A8 6F       LDX         +$6F,Y		; get DAC base/voice
719E: A6 32          LDA         -$0E,Y		; get new volume		
71A0: AB 31          ADDA        -$0F,Y		; add actual volume
71A2: 46             RORA 			; normalize
71A3: A7 84          STA         ,X		; store new volume to VCA
71A5: A7 88 E0       STA         -$20,X		; (envelope 4)
71A8: A7 84          STA         ,X
71AA: 39             RTS  

------------------------------------------------
--- set DCAs, Q and VCA ------------------------
------------------------------------------------
71AB: AE A8 C7       LDX         -$39,Y		; get DOC address
71AE: A6 A8 CB       LDA         -$35,Y		; get AM 
71B1: A7 88 C1       STA         -$3F,X		; set DOC volume
71B4: AE A8 D9       LDX         -$27,Y		; dito, osc 2
71B7: A6 A8 DD       LDA         -$23,Y
71BA: A7 88 C1       STA         -$3F,X
71BD: AE A8 EB       LDX         -$15,Y		; dito, osc 3
71C0: A6 A8 EF       LDA         -$11,Y
71C3: A7 88 C1       STA         -$3F,X
71C6: AE A8 6F       LDX         +$6F,Y		; get DAC base
71C9: A6 A8 5A       LDA         +$5A,Y		; get Q value
71CC: A7 84          STA         ,X		; set Q
71CE: A7 10          STA         -$10,X
71D0: A7 84          STA         ,X
71D2: A6 32          LDA         -$0E,Y		; get VCA value
71D4: A7 84          STA         ,X		; set VCA/ENV4
71D6: A7 88 E0       STA         -$20,X
71D9: A7 84          STA         ,X
71DB: A7 31          STA         -$0F,Y		; save value
71DD: 39             RTS  

------------------------------------------------
--- set FF and panning -------------------------
--- sample analog voltage to $0db6 buffer ------
------------------------------------------------
71DE: 10 8E 40 70    LDY         #$4070		; voice block base
71E2: CE 0D B6       LDU         #$0DB6		; ADC buffer
71E5: EC 36          LDD         -$0A,Y		; last panning value		
71E7: E3 39          ADDD        -$07,Y		; add new panning value
71E9: ED 36          STD         -$0A,Y		; store back
71EB: AE A8 6F       LDX         +$6F,Y		; get DAC base
71EE: A7 84          STA         ,X		; set panning
71F0: A7 88 C0       STA         -$40,X
71F3: A7 84          STA         ,X
71F5: EC 3B          LDD         -$05,Y		; last FF value
71F7: E3 3E          ADDD        -$02,Y		; add new value
71F9: ED 3B          STD         -$05,Y		; store back
71FB: A7 84          STA         ,X		; set FF
71FD: A7 18          STA         -$08,X
71FF: A7 84          STA         ,X
7201: F6 60 E2       LDB         $60E2		; get A/D conversion result
7204: E7 C0          STB         ,U+		; to buffer
7206: 31 A9 00 E7    LEAY        +$00E7,Y	; next voice block
720A: 10 8C 47 A8    CMPY        #$47A8		; end of voice block area?
720E: 25 D5          BCS         $71E5
7210: 39             RTS  

------------------------------------------------
--- LFO processing: set LFO waves --------------
------------------------------------------------
7211: BD F2 65       JSR         $F265		; set LFO #1 wave
7214: 31 2E          LEAY        +$0E,Y		; next LFO block in VDB
7216: 33 44          LEAU        +$04,U		; next LFO section in PCB
7218: BD F2 65       JSR         $F265		; set LFO #2 wave
721B: 31 2E          LEAY        +$0E,Y		; next LFO block in VDB
721D: 33 44          LEAU        +$04,U		; next LFO section in PCB
721F: BD F2 65       JSR         $F265		; set LFO #3 wave
7222: 31 A8 E4       LEAY        -$1C,Y		; restore VDB pointer
7225: 33 58          LEAU        -$08,U		; restore PCB pointer
7227: 39             RTS  

------------------------------------------------
--- LFO processing: set LFO depths -------------
------------------------------------------------
7228: BD F2 D6       JSR         $F2D6		; set LFO #1 depth
722B: 31 2E          LEAY        +$0E,Y		; next LFO block
722D: BD F2 D6       JSR         $F2D6		; set LFO #2 depth
7230: 31 2E          LEAY        +$0E,Y		; next LFO block
7232: BD F2 D6       JSR         $F2D6		; set LFO #3 depth
7235: 31 A8 E4       LEAY        -$1C,Y		; restore Y
7238: 7E ED 93       JMP         $ED93

------------------------------------------------
--- LFO processing: compute LFO levels ---------
------------------------------------------------
723B: AD B8 9A       JSR         [-$66,Y]	; set LFO #1 level
723E: 31 2E          LEAY        +$0E,Y		; next LFO block
7240: AD B8 9A       JSR         [-$66,Y]	; set LFO #2 level
7243: 31 2E          LEAY        +$0E,Y		; next LFO block
7245: AD B8 9A       JSR         [-$66,Y]	; set LFO #3 level
7248: 31 A8 E4       LEAY        -$1C,Y		; restore Y
724B: 39             RTS  

------------------------------------------------
--- init LFOs ----------------------------------
------------------------------------------------
724C: 8E F3 0C       LDX         #$F30C		; set LFO waveform routines 
724F: AF A8 92       STX         -$6E,Y		;   (init to TRI waveform)
7252: AF A8 A0       STX         -$60,Y		;
7255: AF A8 AE       STX         -$52,Y		;
7258: 8E F3 6A       LDX         #$F36A		; set LFO subroutine #2 vectors
725B: AF A8 9A       STX         -$66,Y		;
725E: AF A8 A8       STX         -$58,Y		;
7261: AF A8 B6       STX         -$4A,Y		;
7264: 39             RTS  

------------------------------------------------
--- set LFO waveform ---------------------------
------------------------------------------------
7265: E6 54          LDB         -$0C,U		; get LFO wave
7267: 58             LSLB 			; check W1 
7268: 24 0D          BCC         $7277		;
726A: 58             LSLB 			; check W0
726B: 24 05          BCC         $7272

------------------------------------------------
--- LFO wave = %11 (noise) ---------------------
------------------------------------------------
726D: 8E F3 14       LDX         #$F314		; LFO wave routine to $f314
7270: 20 03          BRA         $7275

------------------------------------------------
--- LFO wave = %10 (sqr) -----------------------
------------------------------------------------
7272: 8E F3 1F       LDX         #$F31F		; LFO wave routine to $f31f
7275: 20 0B          BRA         $7282

------------------------------------------------
--- LFO wave = %0x -----------------------------
------------------------------------------------
7277: 58             LSLB 			; check W0
7278: 24 05          BCC         $727F

------------------------------------------------
--- LFO wave = %01 (saw) -----------------------
------------------------------------------------
727A: 8E F3 1B       LDX         #$F31B		; LFO wave routine to $f31b
727D: 20 03          BRA         $7282

------------------------------------------------
--- LFO wave = %00 (tri) -----------------------
------------------------------------------------
727F: 8E F3 0C       LDX         #$F30C		; LFO wave routine to $f30c
7282: AF A8 92       STX         -$6E,Y

------------------------------------------------
--- prepare LFO humanization -------------------
------------------------------------------------
7285: 54             LSRB 			; LFO frequency
7286: 54             LSRB 
7287: A6 57          LDA         -$09,U		; get humanize bit
7289: 84 40          ANDA        #$40		;
728B: 48             LSLA 			;
728C: C1 06          CMPB        #$06		; humanize only for freq<7
728E: 2E 05          BGT         $7295
7290: 8E FF 9D       LDX         #$FF9D		; humanize table
7293: AA 85          ORA         B,X		; merge humanize value
7295: A7 A8 9C       STA         -$64,Y		; store humanize value
7298: E7 A8 91       STB         -$6F,Y		; store LFO frequency

------------------------------------------------
--- set LFO levels & modulator -----------------
------------------------------------------------
729B: 4F             CLRA 
729C: E6 55          LDB         -$0B,U		; LFO mod #1 / L1
729E: 58             LSLB 			; m1/m0 to a
729F: 49             ROLA 
72A0: 58             LSLB 
72A1: 49             ROLA 
72A2: 54             LSRB 			; L1 0-127 step 2 to B
72A3: E7 A8 95       STB         -$6B,Y		; set LFO L1
72A6: E6 56          LDB         -$0A,U		; LFO mod #2 / L2
72A8: 58             LSLB 			; m1/m0, m3/m2 to a
72A9: 49             ROLA 
72AA: 58             LSLB 
72AB: 49             ROLA 
72AC: 54             LSRB 			; L2 0-127 step 2 to B
72AD: E7 A8 97       STB         -$69,Y		; set LFO L2
72B0: 48             LSLA 			; prepare mod for word offset
72B1: 8E 00 68       LDX         #$0068		; base for current modulators
72B4: AE 86          LDX         A,X		; get modulator value
72B6: AF A8 98       STX         -$68,Y		; store to LFO modulator

------------------------------------------------
--- set LFO mod level routine ------------------
------------------------------------------------
72B9: E1 A8 95       CMPB        -$6B,Y
72BC: 2F 05          BLE         $72C3
------------------------------------------------; L1<L2
72BE: 8E F3 32       LDX         #$F332		; LFO subroutine #2 to $f332
72C1: 20 03          BRA         $72C6
------------------------------------------------; L1>=L2
72C3: 8E F3 43       LDX         #$F343		; LFO subroutine #2 to $f343
72C6: AF A8 9A       STX         -$66,Y

------------------------------------------------
--- LFO resetting ------------------------------
------------------------------------------------
72C9: E6 57          LDB         -$09,U		; LFO reset bit?
72CB: 2A 03          BPL         $72D0		;
------------------------------------------------; reset LFO
72CD: 6F A8 90       CLR         -$70,Y
------------------------------------------------; don't reset LFO
72D0: C4 3F          ANDB        #$3F
72D2: E7 A8 96       STB         -$6A,Y
72D5: 39             RTS  

------------------------------------------------
--- set LFO depth ------------------------------
------------------------------------------------
72D6: E6 B8 98       LDB         [-$68,Y]	; get LFO modulator value
72D9: 2A 01          BPL         $72DC
72DB: 5F             CLRB 
72DC: EB A8 95       ADDB        -$6B,Y		; +L1
72DF: D7 95          STB         $95		; store LFO depth

------------------------------------------------
--- humanize LFO -------------------------------
------------------------------------------------
72E1: A6 A8 91       LDA         -$6F,Y		; get LFO frequency
72E4: 80 06          SUBA        #$06		; shall be humanized?
72E6: 2E 1B          BGT         $7303		; no -> 7303
72E8: A6 A8 9C       LDA         -$64,Y		; get "human factor"
72EB: 47             ASRA
72EC: 24 0B          BCC         $72F9
------------------------------------------------; human factor is odd
72EE: 8A 40          ORA         #$40		; set bit 6
72F0: A7 A8 9C       STA         -$64,Y		; store back "human factor"
72F3: A6 A8 90       LDA         -$70,Y		; increment wave pointer
72F6: 4C             INCA 			;
72F7: 20 08          BRA         $7301
------------------------------------------------; human factor is even
72F9: 84 BF          ANDA        #$BF
72FB: A7 A8 9C       STA         -$64,Y		; store back "human factor"
72FE: A6 A8 90       LDA         -$70,Y		; don't increment wave pointer
7301: 20 03          BRA         $7306

------------------------------------------------
--- no LFO humanization ------------------------
------------------------------------------------
7303: AB A8 90       ADDA        -$70,Y		; add to wave pointer
7306: A7 A8 90       STA         -$70,Y		; store wave pointer
7309: 6E B8 92       JMP         [-$6E,Y]	; jump to waveform generator

------------------------------------------------
--- LFO waveform generator: TRI ----------------
------------------------------------------------
730C: 2A 01          BPL         $730F		; complement phase pointer
730E: 43             COMA 			;   if negative
730F: 80 40          SUBA        #$40		; -64
7311: 48             LSLA 			; *2
7312: 20 12          BRA         $7326

------------------------------------------------
--- LFO waveform generator: NOISE --------------
------------------------------------------------
7314: 8E FD 9D       LDX         #$FD9D		; noise base
7317: A6 86          LDA         A,X		; get noise value
7319: 20 0B          BRA         $7326

------------------------------------------------
--- LFO waveform generator: SAW ----------------
------------------------------------------------
731B: 8B 80          ADDA        #$80		; +128
731D: 20 07          BRA         $7326

------------------------------------------------
--- LFO waveform generator: SQUARE -------------
------------------------------------------------
731F: 2A 03          BPL         $7324		; zero pointer if negative
7321: 4F             CLRA 			;
7322: 20 02          BRA         $7326
------------------------------------------------
7324: 86 7F          LDA         #$7F		; 127 if positive

------------------------------------------------
--- LFO waveform generator (main) -------------- 
------------------------------------------------
7326: 2A 05          BPL         $732D		
7328: 3D             MUL  			
7329: 90 95          SUBA        $95		; depth
732B: 20 01          BRA         $732E
------------------------------------------------	
732D: 3D             MUL  			
732E: A7 A8 9D       STA         -$63,Y		; write LFO current wave
7331: 39             RTS  

------------------------------------------------
--- LFO level processor (l1>l2) ----------------
------------------------------------------------
7332: E6 A8 96       LDB         -$6A,Y		; get delta l/t
7335: EB A8 95       ADDB        -$6B,Y		; add l1
7338: 29 1A          BVS         $7354
733A: E1 A8 97       CMPB        -$69,Y		; l2 reached?
733D: 24 15          BCC         $7354		; yes -> $f354
733F: E7 A8 95       STB         -$6B,Y		; write back to l1
7342: 39             RTS  

------------------------------------------------
--- LFO level processor (l1<=l2) ---------------
------------------------------------------------
7343: E6 A8 95       LDB         -$6B,Y		; get l2
7346: E0 A8 96       SUBB        -$6A,Y		; sub delta l/t
7349: 2B 09          BMI         $7354
734B: E1 A8 97       CMPB        -$69,Y		; l2 reached?
734E: 23 04          BLS         $7354		; no -> $f354
7350: E7 A8 95       STB         -$6B,Y		; yes, write back to l1
7353: 39             RTS  

------------------------------------------------
--- end of L1 phase ----------------------------
------------------------------------------------
7354: E6 A8 97       LDB         -$69,Y		; get l2
7357: E7 A8 95       STB         -$6B,Y		; store to l1
735A: A6 A8 9C       LDA         -$64,Y		; humanization?
735D: 2A 05          BPL         $7364		; yes ->
735F: 8E F3 6B       LDX         #$F36B		;   prepare humanization
7362: 20 03          BRA         $7367
------------------------------------------------; no ->
7364: 8E F3 6A       LDX         #$F36A		;   RTS
7367: AF A8 9A       STX         -$66,Y

------------------------------------------------
--- LFO level processor (init / final level) ---
------------------------------------------------
736A: 39             RTS  

------------------------------------------------
--- LFO frequency humanization -----------------
------------------------------------------------
736B: A6 A8 94       LDA         -$6C,Y		; increment LFO timebase
736E: 4C             INCA 			;
736F: A7 A8 94       STA         -$6C,Y		;
7372: 8E FE 9D       LDX         #$FE9D		; human factor table base
7375: E6 A8 91       LDB         -$6F,Y		; get frequency
7378: EB 86          ADDB        A,X		; humanize frequency
737A: E7 A8 91       STB         -$6F,Y		;
737D: 39             RTS  

------------------------------------------------
737E: A6 A8 61       LDA         +$61,Y
7381: A1 A8 67       CMPA        +$67,Y
7384: 23 03          BLS         $7389
7386: BD EC 8B       JSR         $EC8B
7389: 20 0B          BRA         $7396

------------------------------------------------
738B: A6 C8 23       LDA         +$23,U		; check for monophonic mode
738E: 2A 06          BPL         $7396
------------------------------------------------; monophonic mode
7390: A6 A8 61       LDA         +$61,Y		
7393: A7 A8 67       STA         +$67,Y
------------------------------------------------; polyphonic mode
7396: E6 A8 62       LDB         +$62,Y
7399: 8E FA 1D       LDX         #$FA1D		; linear mapping: 256->128
739C: A6 85          LDA         B,X
739E: 48             LSLA 
739F: 97 8B          STA         $8B
73A1: 8E FA 9D       LDX         #$FA9D		; exp. mapping:   256->128
73A4: A6 85          LDA         B,X
73A6: A7 A8 66       STA         +$66,Y
73A9: A6 A8 61       LDA         +$61,Y
73AC: 80 40          SUBA        #$40
73AE: 81 E0          CMPA        #$E0
73B0: 2C 02          BGE         $73B4
73B2: 86 E0          LDA         #$E0
73B4: 81 1F          CMPA        #$1F
73B6: 2F 02          BLE         $73BA
73B8: 86 1F          LDA         #$1F
73BA: 48             LSLA 
73BB: 48             LSLA 
73BC: A7 A8 65       STA         +$65,Y
73BF: E6 C8 25       LDB         +$25,U
73C2: C4 3F          ANDB        #$3F
73C4: 27 08          BEQ         $73CE
73C6: A6 A8 61       LDA         +$61,Y
73C9: A0 A8 67       SUBA        +$67,Y
73CC: 26 11          BNE         $73DF
73CE: 8E F4 79       LDX         #$F479		; jump vector to $f479
73D1: AF A8 6B       STX         +$6B,Y
73D4: A6 A8 61       LDA         +$61,Y
73D7: A7 A8 67       STA         +$67,Y
73DA: 6F A8 68       CLR         +$68,Y
73DD: 20 1D          BRA         $73FC
------------------------------------------------
73DF: 2F 05          BLE         $73E6
73E1: 8E F4 29       LDX         #$F429		; jump vector to $f429
73E4: 20 04          BRA         $73EA
------------------------------------------------
73E6: 8E F4 51       LDX         #$F451		; jump vector to $f451
73E9: 40             NEGA 
73EA: AF A8 6B       STX         +$6B,Y
73ED: 50             NEGB 
73EE: 8E FB 9D       LDX         #$FB9D		; envelope scaling/delta y
73F1: EB 86          ADDB        A,X
73F3: 58             LSLB 
73F4: 8E FC 9D       LDX         #$FC9D		; envelope delta y
73F7: EC 85          LDD         B,X
73F9: ED A8 69       STD         +$69,Y
73FC: 39             RTS  
------------------------------------------------
73FD: D6 DC          LDB         $DC
73FF: 96 DD          LDA         $DD
7401: 27 0B          BEQ         $740E
7403: A6 29          LDA         +$09,Y
7405: 84 02          ANDA        #$02
7407: 26 05          BNE         $740E
7409: A6 A8 5C       LDA         +$5C,Y
740C: 20 08          BRA         $7416
------------------------------------------------
740E: A6 B8 5E       LDA         [+$5E,Y]
7411: 80 40          SUBA        #$40
7413: A7 A8 5C       STA         +$5C,Y
7416: 2A 05          BPL         $741D
7418: 3D             MUL  
7419: 90 DC          SUBA        $DC
741B: 20 07          BRA         $7424
------------------------------------------------
741D: 81 3F          CMPA        #$3F		
741F: 26 02          BNE         $7423
7421: 86 40          LDA         #$40		; *64
7423: 3D             MUL  
7424: D3 D8          ADDD        $D8
7426: 6E B8 6B       JMP         [+$6B,Y]

--- via jump vector [+6B,Y]
------------------------------------------------
7429: DD 96          STD         $96
742B: EC A8 67       LDD         +$67,Y
742C: A8 67          EORA        +$07,S
742E: E3 A8 69       ADDD        +$69,Y
7431: A1 A8 61       CMPA        +$61,Y
7434: 25 11          BCS         $7447
7436: A6 A8 61       LDA         +$61,Y
7439: 5F             CLRB 
743A: ED A8 67       STD         +$67,Y
743D: D3 96          ADDD        $96
743F: 8E F4 79       LDX         #$F479		; jump vector to $f479
7442: AF A8 6B       STX         +$6B,Y
7445: 20 05          BRA         $744C
------------------------------------------------
7447: ED A8 67       STD         +$67,Y
744A: D3 96          ADDD        $96
744C: DD 8D          STD         $8D
744E: 7E F2 28       JMP         $F228

--- via jump vector [+6B,Y]
------------------------------------------------
7451: DD 96          STD         $96
7453: EC A8 67       LDD         +$67,Y
7456: A3 A8 69       SUBD        +$69,Y
7459: A1 A8 61       CMPA        +$61,Y
745C: 24 11          BCC         $746F
745E: A6 A8 61       LDA         +$61,Y
7461: 5F             CLRB 
7462: ED A8 67       STD         +$67,Y
7465: D3 96          ADDD        $96
7467: 8E F4 79       LDX         #$F479		; jump vector to $f479
746A: AF A8 6B       STX         +$6B,Y
746D: 20 05          BRA         $7474
------------------------------------------------
746F: ED A8 67       STD         +$67,Y
7472: D3 96          ADDD        $96
7474: DD 8D          STD         $8D		; FM #1
7476: 7E F2 28       JMP         $F228		; set LFO depths

--- via jump vector [$6B,Y]
------------------------------------------------
7479: AB A8 61       ADDA        +$61,Y	
747C: DD 8D          STD         $8D		; FM #1
747E: 7E F2 28       JMP         $F228		; set LFO depths

------------------------------------------------
--- DOC 5503 A/D conversion --------------------
------------------------------------------------
7481: B6 60 E2       LDA         $60E2		; start A/D conversion
7484: 86 64          LDA         #$64		; wait 31ms
7486: 4A             DECA 
7487: 26 FD          BNE         $7486
7489: B6 60 E2       LDA         $60E2		; get conversion result
748C: 39             RTS  

------------------------------------------------
--- correlated A/D conversion ------------------
------------------------------------------------
748D: 8E 0D AE       LDX         #$0DAE
7490: 5F             CLRB 			; step through ROMLOW
7491: 86 0E          LDA         #$0E		;   0-7000
7493: B7 64 0E       STA         $640E
7496: F7 64 0F       STB         $640F
7499: 8D E6          BSR         $7481		; ADC conversion
749B: 8D E4          BSR         $7481		; ADC conversion
749D: A7 80          STA         ,X+		; to buffer $0dae - $0dbd
749F: CB 02          ADDB        #$02
74A1: C1 10          CMPB        #$10
74A3: 25 EC          BCS         $7491

------------------------------------------------
--- correlated 3 point A/D conversion ----------
------------------------------------------------
74A5: CC 0E 04       LDD         #$0E04		; ROMLOW $2000
74A8: FD 64 0E       STD         $640E
74AB: 8D D4          BSR         $7481		; do A/D conversion
74AD: 8D D2          BSR         $7481		; do A/D conversion
74AF: 97 A1          STA         $A1		; result -> $a1
74B1: 8D CE          BSR         $7481		; do A/D conversion
74B3: 97 A0          STA         $A0		; result -> $a0
74B5: 8D CA          BSR         $7481		; do A/D conversion
74B7: 97 9F          STA         $9F		; result -> $9f
74B9: 1F 89          TFR         A,B
74BB: 4F             CLRA 
74BC: DB A0          ADDB        $A0		; interpolate results 
74BE: 89 00          ADCA        #$00
74C0: DB A1          ADDB        $A1
74C2: 89 00          ADCA        #$00
74C4: 47             ASRA 			; normalize
74C5: 56             RORB 
74C6: 47             ASRA 
74C7: 56             RORB 
74C8: D7 D7          STB         $D7		; interpolation -> $d7
74CA: 8E 0D AE       LDX         #$0DAE		; reset buffer pointer
74CD: 7E 85 A0       JMP         $85A0		; restore outport

--- via vector [$0dac] (1)
------------------------------------------------
74D0: BD F6 11       JSR         $F611		; interpolate $0db7 to $0dbb
74D3: D7 9F          STB         $9F		; result -> $9f
74D5: 4F             CLRA 
74D6: DB A0          ADDB        $A0		; interpolate with $a0/$a1
74D8: 89 00          ADCA        #$00
74DA: DB A1          ADDB        $A1
74DC: 89 00          ADCA        #$00
74DE: 47             ASRA 
74DF: 56             RORB 
74E0: 47             ASRA 
74E1: 56             RORB 
74E2: D0 D7          SUBB        $D7		; previous result
74E4: 2A 07          BPL         $74ED		; value increased -> $f4ed
74E6: CB 08          ADDB        #$08		; underrun check
74E8: 2B 01          BMI         $74EB		; underrun -> $f4eb ($f4f2)
74EA: 5F             CLRB 			
74EB: 20 05          BRA         $74F2
------------------------------------------------
74ED: C0 08          SUBB        #$08
74EF: 2A 01          BPL         $74F2
74F1: 5F             CLRB 
74F2: CB 40          ADDB        #$40
74F4: 28 02          BVC         $74F8
74F6: C6 7F          LDB         #$7F
74F8: 2A 01          BPL         $74FB
74FA: 5F             CLRB 
74FB: D1 98          CMPB        $98
74FD: 27 0D          BEQ         $750C
74FF: D7 98          STB         $98
7501: 9E C1          LDX         $C1
7503: E7 06          STB         +$06,X
7505: 4F             CLRA 
7506: BD F6 3A       JSR         $F63A
7509: BD 8B A5       JSR         $8BA5		; pitch bend
750C: CC 0E 06       LDD         #$0E06		; ROMLOW $3000
750F: FD 64 0E       STD         $640E
7512: 8E F5 1D       LDX         #$F51D		; vector to $f51d		
7515: BF 0D AC       STX         $0DAC
7518: DC 9F          LDD         $9F		; shift through actual
751A: DD A0          STD         $A0		;   result
751C: 39             RTS  

--- via vector [$0dac] (2)
------------------------------------------------
751D: BD F6 11       JSR         $F611
7520: 54             LSRB 
7521: D1 99          CMPB        $99
7523: 23 0A          BLS         $752F
7525: D7 99          STB         $99
7527: C0 03          SUBB        #$03
7529: D7 9A          STB         $9A
752B: CB 03          ADDB        #$03
752D: 20 0C          BRA         $753B
------------------------------------------------
752F: D1 9A          CMPB        $9A
7531: 24 14          BCC         $7547
7533: D7 9A          STB         $9A
7535: CB 03          ADDB        #$03
7537: D7 99          STB         $99
7539: C0 03          SUBB        #$03
753B: 9E C1          LDX         $C1
753D: E7 08          STB         +$08,X
753F: 86 02          LDA         #$02
7541: BD F6 3A       JSR         $F63A
7544: BD 8B B5       JSR         $8BB5
7547: 86 0E          LDA         #$0E
7549: B7 64 0E       STA         $640E
754C: 8E F5 53       LDX         #$F553		; vector to $f553
754F: BF 0D AC       STX         $0DAC
7552: 39             RTS  

--- via vector [$0dac] (3)
------------------------------------------------
7553: BD F6 11       JSR         $F611
7556: 54             LSRB 
7557: D1 9B          CMPB        $9B
7559: 23 0A          BLS         $7565
755B: D7 9B          STB         $9B
755D: C0 04          SUBB        #$04
755F: D7 9C          STB         $9C
7561: CB 04          ADDB        #$04
7563: 20 0C          BRA         $7571
------------------------------------------------
7565: D1 9C          CMPB        $9C
7567: 2C 37          BGE         $75A0
7569: D7 9C          STB         $9C
756B: CB 04          ADDB        #$04
756D: D7 9B          STB         $9B
756F: C0 04          SUBB        #$04
7571: F7 0D AB       STB         $0DAB
7574: D4 C8          ANDB        $C8
7576: F1 0D AA       CMPB        $0DAA
7579: 27 15          BEQ         $7590
757B: F7 0D AA       STB         $0DAA
757E: BD 84 79       JSR         $8479
7581: F6 0D AB       LDB         $0DAB
7584: E7 24          STB         +$04,Y
7586: CC 74 5F       LDD         #$745F
7589: ED 22          STD         +$02,Y
758B: BD 84 AE       JSR         $84AE
758E: 0B 4F	     fdb	 $0B4F
7590: 86 07          LDA         #$07
7592: F6 0D AB       LDB         $0DAB
7595: 8E 02 D4       LDX         #$02D4		; track table base
7598: BD 8B B5       JSR         $8BB5
759B: 86 32          LDA         #$32
759D: B7 0D AE       STA         $0DAE
75A0: CC 0E 02       LDD         #$0E02		; ROMLOW $1000
75A3: FD 64 0E       STD         $640E
75A6: 8E F5 C0       LDX         #$F5C0		; vector to $f5c0
75A9: BF 0D AC       STX         $0DAC
75AC: 7A 0D AE       DEC         $0DAE
75AF: 26 0E          BNE         $75BF
75B1: F6 0D AB       LDB         $0DAB
75B4: CB 04          ADDB        #$04
75B6: D7 9B          STB         $9B
75B8: F6 0D AB       LDB         $0DAB
75BB: C0 04          SUBB        #$04
75BD: D7 9C          STB         $9C
75BF: 39             RTS  

--- via vector [$0dac] (4)
------------------------------------------------
75C0: 8D 4F          BSR         $7611
75C2: 54             LSRB 
75C3: D1 9D          CMPB        $9D
75C5: 23 0A          BLS         $75D1
75C7: D7 9D          STB         $9D
75C9: C0 03          SUBB        #$03
75CB: D7 9E          STB         $9E
75CD: CB 03          ADDB        #$03
75CF: 20 0C          BRA         $75DD
------------------------------------------------
75D1: D1 9E          CMPB        $9E
75D3: 24 2F          BCC         $7604
75D5: D7 9E          STB         $9E
75D7: CB 03          ADDB        #$03
75D9: D7 9D          STB         $9D
75DB: C0 03          SUBB        #$03
75DD: 50             NEGB 
75DE: CB 7F          ADDB        #$7F
75E0: 9E C1          LDX         $C1
75E2: 86 03          LDA         #$03
75E4: 8D 54          BSR         $763A
75E6: 0D DB          TST         $DB
75E8: 27 15          BEQ         $75FF
75EA: BD 84 79       JSR         $8479
75ED: CE 80 E0       LDU         #$80E0		; handler = $80e0
75F0: EF 22          STU         +$02,Y
75F2: AF 26          STX         +$06,Y
75F4: BD 84 AE       JSR         $84AE
75F7: 0B 4F	     fdb	 $0B4F
75F9: E7 0C          STB         +$0C,X
75FB: 86 06          LDA         #$06
75FD: 20 02          BRA         $7601
------------------------------------------------
75FF: E7 09          STB         +$09,X
7601: BD 8B B5       JSR         $8BB5
7604: CC 0E 04       LDD         #$0E04		; ROMLOW $2000
7607: FD 64 0E       STD         $640E
760A: 8E F4 D0       LDX         #$F4D0		; vector to $f4d0 (-> loop)
760D: BF 0D AC       STX         $0DAC
7610: 39             RTS  

------------------------------------------------
--- interpolate data at $0db7-$0dbd ------------
--- set buffer pointer to $0db7 ----------------
------------------------------------------------
7611: 8E 0D B7       LDX         #$0DB7		; result base -> x
7614: 4F             CLRA 
7615: E6 84          LDB         ,X		; interpolate results
7617: EB 84          ADDB        ,X
7619: 89 00          ADCA        #$00
761B: EB 01          ADDB        +$01,X
761D: 89 00          ADCA        #$00
761F: EB 02          ADDB        +$02,X
7621: 89 00          ADCA        #$00
7623: EB 03          ADDB        +$03,X
7625: 89 00          ADCA        #$00
7627: EB 04          ADDB        +$04,X
7629: 89 00          ADCA        #$00
762B: EB 05          ADDB        +$05,X
762D: 89 00          ADCA        #$00
762F: EB 06          ADDB        +$06,X
7631: 89 00          ADCA        #$00
7633: 47             ASRA 			; normalize			
7634: 56             RORB 
7635: 47             ASRA 
7636: 56             RORB 
7637: 47             ASRA 
7638: 56             RORB 
7639: 39             RTS  			; return result in D

------------------------------------------------
763A: BD 84 79       JSR         $8479
763D: ED 24          STD         +$04,Y
763F: CE 00 14       LDU         #$0014		; VDB handler to $0014
7642: EF 22          STU         +$02,Y		;
7644: BD 84 AE       JSR         $84AE
7647: 0B 6D	     fdb	 $0B6D
7649: 39	     RTS

------------------------------------------------
764A: 34 20          PSHS        Y
764C: BD 86 02       JSR         $8602
764F: 86 0E          LDA         #$0E		; select ROMLOW $4000
7651: C6 08          LDB         #$08
7653: FD 64 0E       STD         $640E
7656: 10 AE E4       LDY         ,S
7659: 8D 12          BSR         $766D
765B: A6 A8 5D       LDA         +$5D,Y
765E: E6 64          LDB         +$04,S
7660: 8E 0D BF       LDX         #$0DBF
7663: A7 85          STA         B,X
7665: BD 86 93       JSR         $8693
7668: F6 0D BE       LDB         $0DBE
766B: 35 A0          PULS        PC,Y

------------------------------------------------
--- filter tuning ------------------------------
------------------------------------------------
766D: 86 C0          LDA         #$C0		; initialize tuning counter
766F: B7 0D BE       STA         $0DBE
7672: 86 40          LDA         #$40		; filter frequency
7674: C6 FF          LDB         #$FF		; set maximum filter resonance
7676: E7 A8 5A       STB         +$5A,Y		
7679: 7D 0D BE       TST         $0DBE		; end of tuning?
767C: 27 31          BEQ         $76AF
767E: 7A 0D BE       DEC         $0DBE		; decrement tuning counter
7681: BD F6 E5       JSR         $F6E5		; set filter CV
7684: 8E 00 00       LDX         #$0000		; sample filter response
7687: 8D 37          BSR         $76C0
7689: 8E 00 00       LDX         #$0000		; sample filter response
768C: 8D 32          BSR         $76C0
768E: 8D 30          BSR         $76C0
7690: 8D 2E          BSR         $76C0
7692: 8D 2C          BSR         $76C0
7694: 8C 00 00       CMPX        #$0000
7697: 27 15          BEQ         $76AE
7699: 8C 03 E8       CMPX        #$03E8
769C: 24 10          BCC         $76AE
769E: 8C 00 21       CMPX        #$0021
76A1: 25 03          BCS         $76A6
76A3: 4C             INCA			; increment filter frequency 
76A4: 20 D3          BRA         $7679
------------------------------------------------
76A6: 8C 00 1C       CMPX        #$001C
76A9: 22 04          BHI         $76AF
76AB: 4A             DECA 			; decrement filter frequency
76AC: 20 CB          BRA         $7679
------------------------------------------------
76AE: 4F             CLRA 
76AF: B7 0D BE       STA         $0DBE		; clear counter
76B2: 27 05          BEQ         $76B9
76B4: 80 90          SUBA        #$90		; -112
76B6: 2A 01          BPL         $76B9
76B8: 4F             CLRA 
76B9: A7 A8 5D       STA         +$5D,Y		; Q correction value
76BC: 6F A8 5A       CLR         +$5A,Y		; no filter resonance
76BF: 39             RTS  

------------------------------------------------
--- filter tuning: sample filter response ------
------------------------------------------------
76C0: F6 60 E2       LDB         $60E2		; start A/D conversion
76C3: BD F6 E5       JSR         $F6E5
76C6: 30 01          LEAX        +$01,X		; inc. calibrate counter
76C8: 27 16          BEQ         $76E0		; 65536 runs?
76CA: F6 60 E2       LDB         $60E2		; get conversion result,
76CD: C1 90          CMPB        #$90		;   start new conversion
76CF: 25 F2          BCS         $76C3		; result >(112) do again
76D1: BD F6 E5       JSR         $F6E5
76D4: 30 01          LEAX        +$01,X		; inc. calibrate counter
76D6: 27 08          BEQ         $76E0		; 65536 runs?
76D8: F6 60 E2       LDB         $60E2		; get conversion result
76DB: C1 70          CMPB        #$70
76DD: 22 F2          BHI         $76D1		; result >112 do again
76DF: 39             RTS  

------------------------------------------------
--- end of filter response sampling ------------
------------------------------------------------
76E0: 4F             CLRA 
76E1: 32 62          LEAS        +$02,S		; skip return address (?)
76E3: 20 CA          BRA         $76AF

------------------------------------------------
--- filter tuning: set filter control voltages -
------------------------------------------------
76E5: EE A8 71       LDU         +$71,Y		; DAC base
76E8: A7 C4          STA         ,U		; filter frequency
76EA: A7 58          STA         -$08,U
76EC: A7 C4          STA         ,U
76EE: E6 A8 5A       LDB         +$5A,Y		; filter resonance
76F1: E7 C4          STB         ,U
76F3: E7 50          STB         -$10,U
76F5: E7 C4          STB         ,U
76F7: 39             RTS  

------------------------------------------------
--- FIRQ: input port change interrupt  ---------
------------------------------------------------
76F8: 34 16          PSHS        X,B,A
76FA: B6 64 05       LDA         $6405		; get IRQ status register
76FD: 85 80          BITA        #$80		; input port change?
76FF: 27 35          BEQ         $7736		; no -> $f736
7701: B6 64 04       LDA         $6404		; get input port change
7704: 96 05          LDA         $05
7706: 27 07          BEQ         $770F
7708: B6 64 0E       LDA         $640E		; start counter
770B: 0F 05          CLR         $05
770D: 20 25          BRA         $7734
------------------------------------------------
770F: B6 64 0F       LDA         $640F		; stop counter
7712: FC 64 06       LDD         $6406		; get counter value
7715: 43             COMA 			; complement counter value
7716: 53             COMB 
7717: 34 06          PSHS        B,A		; save on stack
7719: F3 10 06       ADDD        $1006		; add counter value to last
771C: FD 10 06       STD         $1006		;   value and write back
771F: 35 06          PULS        B,A		; restore value
7721: 10 93 07       CMPD        $07		; higher than limit?
7724: 22 06          BHI         $772C		; -> $f72c
7726: 86 01          LDA         #$01
7728: 97 05          STA         $05		; init $05 with 1
772A: 20 06          BRA         $7732		; init $00 with 1
------------------------------------------------
772C: B6 64 0E       LDA         $640E		; start counter
772F: 0F 05          CLR         $05		; init $05
7731: 4F             CLRA 			
7732: 97 00          STA         $00		; init $00
7734: 20 25          BRA         $775B

------------------------------------------------
--- FIRQ: counter interrupt --------------------
------------------------------------------------
7736: 85 08          BITA        #$08		; counter ready?
7738: 27 21          BEQ         $775B		; no
773A: B6 64 0F       LDA         $640F		; stop counter
773D: 6E 9F 10 0A    JMP         [$100A]

------------------------------------------------
--- FIRQ handler 1 -----------------------------
------------------------------------------------
7741: 96 0A          LDA         $0A		; offset for DUART
7743: 8E F7 4A       LDX         #$F74A		; prepare FIRQ handler 2
7746: 21 FE          BRN         $7746		; delay!?
7748: 20 07          BRA         $7751

------------------------------------------------
--- FIRQ handler 2 -----------------------------
------------------------------------------------
774A: 96 09          LDA         $09		; offset for DUART
774C: 8E F7 41       LDX         #$F741		; prepare FIRQ handler 1
774F: 0F 0B          CLR         $0B
7751: BF 10 0A       STX         $100A		; store handler address
7754: 8E 64 0F       LDX         #$640F		; DUART outport
7757: C6 C0          LDB         #$C0		; outport pattern
7759: E7 86          STB         A,X		; to DUART

------------------------------------------------
--- FIRQ: spurious / return --------------------
------------------------------------------------
775B: 35 16          PULS        X,B,A
775D: 3B             RTI  

------------------------------------------------
--- Table (accessed by $83CF) ------------------
--- stack, romlow address, romlow page, step ---
------------------------------------------------
---                S        D        D      A
------------------------------------------------
775E: 	FCB	$0E,$90, $71,$1B, $0E,$00, $00	; ROMLOW $011B
7765:	FCB	$0E,$F4, $7A,$3D, $0E,$04, $01	; ROMLOW $2A3D
776C:	FCB	$0F,$58, $D9,$CD, $0E,$00, $02	; $D9CD, ROMLOW $1000
7773:	FCB	$0F,$BC, $EA,$4D, $0E,$00, $03	; $EA4D, ROMLOW $1000

------------------------------------------------
--- display positions for 10 parameter screens -
------------------------------------------------
777A:	FDB	$86, $8D, $94, $9B, $A2, $AE, $B5, $BC, $C3, $CA

------------------------------------------------
--- display positions for 8 parameter screens --
------------------------------------------------
7784:	FDB	$84, $8C, $94, $9D, $A5, $B4, $BC, $C4

------------------------------------------------
--- display hooks (ROMLOW $5000) ---------------
------------------------------------------------
778C:   FDB     $7CD3				; ENV menu
778E:   FDB     $7D00				; LFO menu
7790:   FDB     $7D31				; OSC menu
7792:   FDB     $7D56				; DCA menu
7794:   FDB     $7D73				; DCA4 menu
7796:   FDB     $7D9E				; FILT menu
7798:   FDB     $7DC3				; MODE menu
779A:   FDB     $7DFB				; SPLIT/LAYER menu
779C:   FDB     $7E21				; MASTER menu
779E:   FDB     $7E54				; MIDI menu
77A0:   FDB     $7E84				; CONTROL menu

------------------------------------------------
--- button handlers (ROMLOW $0000) -------------
------------------------------------------------
77A2:   FDB     $7233   ; button parsing (all keys)
77A4:   FDB     $738A   ; RTS
77A6:   FDB     $7286   ; button parsing (banks, data entry, softkeys only)
77A8:   FDB     $72BB   ; button parsing (sequencer-while-play)
77AA:   FDB     $737F   ; button parsing (softkeys only)
77AC:   FDB     $7233   ; button parsing (all keys)
77AE:   FDB     $738A   ; RTS
77B0:   FDB     $7374   ; button parsing (data entry, softkeys only)
77B2:   FDB     $7374   ; button parsing (data entry, softkeys only)
77B4:   FDB     $7374   ; button parsing (data entry, softkeys only)

------------------------------------------------
--- parameter 0-9 INC/DEC handlers -------------
------------------------------------------------
77B6:   FDB 	$74A7, $77CC, $75D3, $75EE, $77CC   
77C0:   FDB 	$74A7, $74A7, $77CE, $75D3, $77D6                    

------------------------------------------------
--- bank copy menu -----------------------------
------------------------------------------------
77CA: D6 42 41 4E 4B 20 43 4F 50 59 8B 43 41 52 54 20   .BANK COPY.CART 
77DA: 41 20 54 4F 20 49 4E 54 9B 49 4E 54 20 54 4F 20   A TO INT.INT TO 
77EA: 43 41 52 54 20 41 B3 43 41 52 54 20 42 20 54 4F   CART A.CART B TO
77FA: 20 49 4E 54 C3 49 4E 54 20 54 4F 20 43 41 52 54    INT.INT TO CART
780A: 20 42 00                                           B.

------------------------------------------------
--- cartridge access error vectors -------------
------------------------------------------------
780D:	FDB	$7500	; NO CARTRIDGE INSTALLED
780F:	FDB	$7518	; CART A BANK PROGRAMS DO NOT EXIST
7811:	FDB	$753B	; CART B BANK PROGRAMS DO NOT EXIST
7813:	FDB	$755E	; ILLEGAL CARTRIDGE TYPE

------------------------------------------------
--- screen positions ---------------------------
------------------------------------------------
7814: 	FCB 	$8A, $92, $9A, $A2, $B2, $BA, $C2, $CA 

------------------------------------------------
--- misc text ----------------------------------
------------------------------------------------
781D: D6 46 49 4C 54 45 52 A8 54 55 4E 49 4E 47 00      .FILTER.TUNING.
782C: 53 45 51 2D 00                                    SEQ-.
7831: 58 58 58 2D 00                                    XXX-.

------------------------------------------------
--- track mix menu & parameter positions -------
------------------------------------------------
7836: D6 54 52 41 43 4B 20 4D 49 58 AE 2A 4D 4F 52 45   .TRACK MIX.*MORE
7846: 2A 00                                             *.

7848:	FCB	$8E, $95, $9C, $A3, $B6, $BD, $C4, $CB

------------------------------------------------
--- track midi chan menu & parameter positions -
------------------------------------------------
7850: D6 54 52 41 43 4B 20 4D 49 44 49 20 43 48 41 4E   .TRACK MIDI CHAN
7860: AE 2A 4D 4F 52 45 2A 00                           .*MORE*.

7868:	FCB	$91, $98, $9F, $A6, $B9, $C0, $C7, $CE

------------------------------------------------
--- track status menu & parameter positions ----
------------------------------------------------
7870: D6 54 52 41 43 4B 20 53 54 41 54 55 53 AE 2A 4D   .TRACK STATUS.*M
7880: 4F 52 45 2A 00                                    ORE*.

7885:	FCB	$8E, $95, $9C, $A3, $B6, $BD, $C4, $CB

------------------------------------------------
--- track prog num menu & parameter positions --
------------------------------------------------
788D: D6 54 52 41 43 4B 20 50 52 4F 47 20 4E 55 4D AE   .TRACK PROG NUM.
789D: 2A 4D 4F 52 45 2A 00                              *MORE*.

78A4:	FCB	$90, $97, $9E, $A5, $B8, $BF, $C6, $CD

------------------------------------------------
--- track prog/type/chan unused ----------------
------------------------------------------------
78AC: 58 58 58 00                                       XXX.

------------------------------------------------
--- track menu (static part) -------------------
------------------------------------------------
78B0: D6 54 52 41 43 4B 53 AD 54 4D 50 3D 00            .TRACKS.TMP=.

------------------------------------------------
--- track type / display positions -------------
------------------------------------------------
78BD: 2A 4D 49 44 49 2A                                 *MIDI*
78C3: 2A 53 45 51 2D 2A                                 *SEQ-*
78C9: 55 4E 55 53 45 44                                 UNUSED
78CF: 2A 43 41 52 54 2A                                 *CART*

78D5: 	FCB 	$8D, $94, $9B, $A2, $B5, $BC, $C3, $CA

------------------------------------------------

; accessed by ROMLOW $012e (8 bit)
78DD: 29 27 28 26 22 23 24 25 17 18 19 16 2A 2B 2C 2D   )'(&"#$%....*+,-
78ED: 2F 30 31 32 33 2E 05 02 12 1A 1C 1F 15 1B 1E 20   /0123.......... 
78FD: 13 14 1D 21 08 09 0A 01 0B 0C 0D 06 07 0F 04 03   ...!............
790D: 0E 10 11 00 00 00 00 00 00 00 00 00 00 00 00 00   ................

; AM / PAN modulation adders
791D: 09 0A 0A 0A 0B 0B 0B 0C 0C 0C 0D 0D 0D 0E 0E 0E   ................
792D: 0F 0F 10 10 11 11 12 12 13 14 14 15 15 16 17 17   ................
793D: 18 19 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26   ......... !"#$%&
794D: 27 28 29 2B 2C 2D 2E 30 32 34 36 38 3A 3C 3E 40   '()+,-.02468:<>@
795D: 42 44 46 48 4A 4C 4E 50 52 54 56 58 5A 5C 5E 60	BDFHJLNPRTVXZ\^
796D: 62 65 68 6B 6E 71 74 77 7A 7D 80 83 86 89 8C 8F	behknqtwz}......
797D: 92 95 98 9B 9E A2 A6 AA AE B2 B6 BA BE C2 C6 CA   ................
798D: CE D2 D6 DA DE E2 E6 EA F2 F6 FA FE FF FF FF FF   ................

; accessed by $f102 (size: $7f, byte)
799D: 00 04 08 0A 0B 0C 0C 0C 0D 0D 0D 0D 0E 0E 0E 0E   ................
79AD: 0F 0F 0F 0F 10 10 10 10 11 11 11 11 12 12 12 12   ................
79BD: 13 13 13 13 14 14 14 14 14 15 15 15 16 16 16 17   ................
79CD: 17 17 18 18 19 19 1A 1A 1B 1C 1C 1D 1E 1E 1F 20   ............... 
79DD: 21 21 22 23 24 25 26 27 29 2A 2B 2C 2E 2F 31 32   !!"#$%&')*+,./12
79ED: 34 36 38 3A 3C 3E 40 42 45 47 4A 4D 4F 52 56 59   468:<>@BEGJMORVY
79FD: 5C 60 64 68 6C 70 75 79 7E 83 89 8E 94 9B A1 A8   \hlpuy~.......
7A0D: AF B6 BE C6 CE D7 E1 EA F4 FF FF FF FF FF FF FF   ................

; accessed by $f399 (linear)
7A1D: 01 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F   ................
7A2D: 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F   ................
7A3D: 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F    !"#$%&'()*+,-./
7A4D: 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F   0123456789:;<=>?
7A5D: 40 41 42 43 43 44 45 46 47 47 48 49 4A 4B 4B 4C   @ABCCDEFGGHIJKKL
7A6D: 4D 4E 4F 4F 50 51 52 53 53 54 55 56 57 57 58 59   MNOOPQRSSTUVWWXY
7A7D: 5A 5B 5B 5C 5D 5E 5F 5F 60 61 62 63 64 65 66 67   Z[[\]^__bcdefg
7A8D: 69 6A 6B 6C 6D 6F 70 71 72 73 75 77 79 7B 7D 7F   ijklmopqrsuwy{}.

; accessed by $f3xx (exponential)
7A9D: 00 00 00 00 00 00 00 00 01 01 01 01 01 01 01 01   ................
7AAD: 02 02 02 02 02 02 02 02 03 03 03 03 03 03 03 03   ................
7ABD: 04 04 04 04 05 05 05 05 06 06 06 06 07 07 07 07   ................
7ACD: 08 08 08 08 09 09 09 09 0A 0A 0A 0A 0B 0B 0B 0B   ................
7ADD: 0C 0D 0E 0F 10 11 12 13 14 15 16 17 18 19 1A 1B   ................
7AED: 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B   .... !"#$%&'()*+
7AFD: 2C 2E 30 32 34 36 38 3A 3C 3E 40 42 44 46 48 4A   ,.02468:<>@BDFHJ
7B0D: 4D 50 53 56 5A 5E 60 64 68 6C 70 74 78 7D 7E 7F   MPSVZ^hlptx}~.

; accessed by $ef9a / $f3ee (envelope scaling, negative offset)
7B1D: 6A 6A 6A 6A 6A 6A 6A 6A 6B 6B 6B 6B 6B 6B 6B 6B   jjjjjjjjkkkkkkkk
7B2D: 6B 6B 6B 6B 6B 6B 6B 6B 6B 6C 6C 6C 6C 6C 6C 6C   kkkkkkkkklllllll
7B3D: 6C 6C 6C 6C 6C 6C 6C 6C 6C 6C 6C 6D 6D 6D 6D 6D   lllllllllllmmmmm
7B4D: 6D 6D 6D 6D 6D 6D 6D 6D 6D 6D 6D 6D 6D 6D 6D 6D   mmmmmmmmmmmmmmmm
7B5D: 6E 6E 6E 6E 6E 6E 6E 6E 6E 6E 6E 6E 6E 6E 6E 6E   nnnnnnnnnnnnnnnn
7B6D: 6E 6E 6E 6E 6E 6E 6E 6E 6F 6F 6F 6F 6F 6F 6F 6F   nnnnnnnnoooooooo
7B7D: 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F 6F   oooooooooooooooo
7B8D: 6F 6F 70 70 70 70 70 70 70 70 70 70 70 70 70 70   oopppppppppppppp
	
; accessed by $ef9a / $f3ee (envelope scaling, positive offset)
7B9D: 40 40 46 4A 4C 4E 50 51 52 53 54 55 56 56 57 57   @@FJLNPQRSTUVVWW
7BAD: 58 59 59 59 5A 5A 5B 5B 5C 5C 5C 5D 5D 5D 5D 5E   XYYYZZ[[\\\]]]]^
7BBD: 5E 5E 5F 5F 5F 5F 5F 60 60 60 60 61 61 61 61 61   ^^_____``aaaaa
7BCD: 62 62 62 62 62 62 63 63 63 63 63 63 63 64 64 64   bbbbbbcccccccddd
7BDD: 64 64 64 64 65 65 65 65 65 65 65 65 65 66 66 66   ddddeeeeeeeeefff
7BED: 66 66 66 66 66 66 67 67 67 67 67 67 67 67 67 67   ffffffgggggggggg
7BFD: 68 68 68 68 68 68 68 68 68 68 68 68 69 69 69 69   hhhhhhhhhhhhiiii
7C0D: 69 69 69 69 69 69 69 69 69 6A 6A 6A 6A 6A 6A 6A   iiiiiiiiijjjjjjj

; envelope delta y values (16bit, negative offset)
7C1D: 00 B5 00 CB 00 E4 01 00 01 1F 01 43 01 6A 01 96   ...........C.j..
7C2D: 01 C8 02 00 02 3F 02 85 02 D4 03 2D 03 90 04 00   .....?.....-....
7C3D: 04 7D 05 0A 05 A8 06 59 07 21 08 00 08 FB 0A 14   .}.....Y.!......
7C4D: 0B 50 0C B3 0E 41 10 00 11 F6 14 29 16 A1 19 66   .P...A.....)...f
7C5D: 1C 82 20 00 23 EB 28 51 2D 41 32 CC 39 04 40 00   .. .#.(Q-A2.9.@.
7C6D: 47 D6 50 A3 5A 82 65 98 72 09 80 00 8F AD A1 45   G.P.Z.e.r......E
7C7D: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................
7C8D: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00   ................

; envelope delta y values (16bit, positive offset)
7C9D: 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 01   ................
7CAD: 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 01   ................
7CBD: 00 01 00 01 00 01 00 01 00 01 00 01 00 01 00 02   ................
7CCD: 00 02 00 02 00 02 00 03 00 03 00 03 00 04 00 04   ................
7CDD: 00 04 00 05 00 06 00 06 00 07 00 08 00 09 00 0A   ................
7CED: 00 0B 00 0D 00 0E 00 10 00 12 00 14 00 17 00 19   ................
7CFD: 00 1D 00 20 00 24 00 28 00 2D 00 33 00 39 00 40   ... .$.(.-.3.9.@
7D0D: 00 48 00 51 00 5B 00 66 00 72 00 80 00 90 00 A1   .H.Q.[.f.r......

; LFO noise table (negative offset)
7D1D: D7 CE BF CE D2 CA C4 BF BA BF C7 CE DC E6 E9 E2   ................
7D2D: D9 DB E0 EC F6 00 0A 17 38 4E 56 60 45 2E 26 23   ........8NV.&#
7D3D: 1D 2B 34 3B 2F 23 28 14 08 0F 20 31 38 2B 21 16   .+4;/#(... 18+!.
7D4D: 27 35 3E 4D 44 49 4E 50 4C 53 41 3E 47 43 3A 2D   '5>MDINPLSA>GC:-
7D5D: 2B 29 20 23 1D 14 1A 14 0C 1E 29 32 3A 30 20 28   +) #......)2:0 (
7D6D: 1E 18 10 02 F7 F2 F8 05 FF EF E7 E1 DC D5 CC BE   ................
7D7D: B3 A7 A1 9C 92 96 91 88 92 9C A6 AA B8 C3 CD CF   ................
7D8D: E2 D8 DB D1 D0 DF E4 D9 E4 F2 EA F2 FE F5 ED FA   ................

; LFO noise table (positive offset)
7D9D: 00 F5 EE EC DF EB EF F3 1D 25 2F 38 2D 30 38 3D   .........%/8-08=
7DAD: 3F 39 31 35 3E 4E 45 4F 45 3B 2C 36 3E 4E 3D 45   ?915>NEOE;,6>N=E
7DBD: 3C 3A 2C DF EA E5 E4 0F 05 0F 15 17 26 1B 20 2E   <:,.........&. .
7DCD: 32 2C 23 15 17 10 08 FB F3 01 FD FB 07 0A 04 FA   2,#.............
7DDD: F2 EC F6 F4 E9 DA D1 DA E5 EA DE D9 DE E7 F1 E8   ................
7DED: F2 EC E4 F4 FB F8 02 07 0C 1C 23 28 33 3D 36 2C   ..........#(3=6,
7DFD: 1F 2A 26 2F 34 31 22 1A 12 08 FF F5 EC E0 D2 CC   .*&/41".........
7E0D: C6 C2 C8 D6 CB D3 C8 BD B9 C3 BE BE CC CF CF D3   ................

; LFO humanization (negative offset)
7E1D: 01 00 00 00 00 FF 00 00 00 00 00 00 00 01 00 00   ................
7E2D: FF 00 00 00 00 00 00 00 00 00 00 01 00 00 FF 00   ................
7E3D: 01 00 00 00 FF 00 00 00 00 00 00 00 00 00 01 00   ................
7E4D: FF 00 00 00 00 00 01 00 00 00 00 FF 00 00 00 00   ................
7E5D: 01 00 00 00 00 00 00 FF 00 00 00 00 00 00 00 00   ................
7E6D: 01 00 00 00 FF 00 00 00 00 01 00 00 00 00 FF 00   ................
7E7D: 01 00 00 00 00 00 FF 00 00 00 00 00 00 01 00 00   ................
7E8D: FF 00 00 01 00 00 00 00 00 FF 00 00 00 00 00 00   ................

; LFO humanization (positive offset)
7E9D: 01 00 00 00 00 00 FF 00 00 00 00 01 00 00 00 00   ................
7EAD: FF 00 00 00 00 00 00 00 00 01 00 00 00 00 00 00   ................
7EBD: 01 00 00 00 00 FF 00 00 00 00 00 FF 00 00 00 00   ................
7ECD: 01 00 00 00 00 00 00 00 FF 00 00 01 00 00 00 FF   ................
7EDD: 00 00 00 01 00 00 00 00 00 00 FF 00 00 00 00 00   ................
7EED: 01 00 00 00 00 00 00 00 00 00 FF 00 00 00 00 00   ................
7EFD: 01 00 00 00 00 00 00 00 00 00 FF 00 00 00 00 00   ................
7F0D: 01 00 00 00 FF 00 00 00 01 00 00 00 00 FF 00 00   ................

; envelope delta t values (16bit)
7F1D: 00 01 00 01 00 01 00 02 00 02 00 03 00 03 00 03   ................
7F2D: 00 04 00 04 00 04 00 05 00 06 00 06 00 07 00 08   ................
7F3D: 00 09 00 0A 00 0B 00 0D 00 0E 00 10 00 12 00 14   ................
7F4D: 00 17 00 19 00 1D 00 20 00 24 00 28 00 2D 00 33   ....... .$.(.-.3
7F5D: 00 39 00 40 00 48 00 51 00 5B 00 66 00 72 00 80   .9.@.H.Q.[.f.r..
7F6D: 00 90 00 A1 00 B5 00 CB 00 E4 01 00 01 1F 01 43   ...............C
7F7D: 01 6A 01 96 01 C8 02 00 02 3F 02 85 02 D4 03 2D   .j.......?.....-
7F8D: 03 90 04 00 04 7D 05 0A 05 A8 06 59 07 21 08 00   .....}.....Y.!..

; LFO "human factors" for LFO speeds 0-6
7F9D: 00 01 11 25 2D 37 77                              ...%-7w

------------------------------------------------
--- spare --------------------------------------
------------------------------------------------
7FA4: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF   ................
7FB4: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF   ................
7FC4: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF   ................
7FD4: FF FF FF FF FF FF FF FF FF FF FF FF               ............

------------------------------------------------
--- Ensoniq Kernel Vectors ---------------------
------------------------------------------------
7FE0: 00 00		FDB	$0000
7FE2: 84 79		FDB	$8479
7FE4: 84 9F		FDB	$849F
7FE6: D9 39		FDB	$D939
7FE8: D9 24		FDB	$D924
7FEA: D9 0F		FDB	$D90F
7FEC: D8 FC		FDB	$D8FC
7FEE: BB 01		FDB	$BB01

------------------------------------------------
--- 6809 Hardware Vectors ----------------------
------------------------------------------------
7FF0: 83 0A		FDB	$830A		; reserved -> reset
7FF2: 83 03		FDB	$8303		; swi3 vector
7FF4: 82 FF		FDB	$82FF		; swi2 vector
7FF6: F6 F8		FDB	$F6F8		; firq vector
7FF8: 85 3D		FDB	$853D		; irq vector
7FFA: 83 0A		FDB	$830A		; swi vector -> reset
7FFC: 77 19		FDB	$7719		; nmi vector (ROMLOW $2000?)
7FFE: 83 0A		FDB	$830A		; reset vector
