Index: alcyon/wsdsp.s
===================================================================
--- alcyon/wsdsp.s	(revision 7bf3856f4ff505a2174d89c937caf328029e3574)
+++ alcyon/wsdsp.s	(revision 7bf3856f4ff505a2174d89c937caf328029e3574)
@@ -0,0 +1,1513 @@
+.globl _io_time
+.globl _io_lcd
+.globl _io_ser
+.globl _io_midi
+.globl _io_disk
+.globl _io_tone
+.globl _io_leds
+.globl _io_kbrd
+.globl _lcd_a0
+.globl _lcd_a1
+.globl _io_vreg
+.globl _io_vraw
+.globl _io_vram
+.globl _io_fpu
+.globl _v_regs
+.globl _v_odtab
+.globl _v_actab
+.globl _v_ct0
+.globl _v_gt1
+.globl _v_score
+.globl _v_cgtab
+.globl _v_curs0
+.globl _v_curs1
+.globl _v_curs2
+.globl _v_curs3
+.globl _v_curs4
+.globl _v_curs5
+.globl _v_curs6
+.globl _v_curs7
+.globl _v_tcur
+.globl _v_kbobj
+.globl _v_lnobj
+.globl _v_win0
+.globl _v_cur
+.globl _fc_sw
+.globl _fc_val
+.globl _v_obtab
+.globl _v_curob
+.globl _v_nobj
+.globl _v_obpri
+.globl _ebflag
+.globl _ebuf
+.globl _curfet
+.globl _cfetp
+.globl _infetp
+.globl _point
+.globl _obj0
+.globl _bfs
+.globl _wdbxlb0
+.globl _wdbxlb1
+.globl _wdbox
+.globl _vbufs
+.globl _curinst
+.globl _curvce
+.globl _curwave
+.globl _curwdth
+.globl _curwfnl
+.globl _curwhrm
+.globl _curwhrv
+.globl _curwpnt
+.globl _curwoff
+.globl _curwslt
+.globl _cxval
+.globl _cyval
+.globl _lstwoff
+.globl _lstwpnt
+.globl _stccol
+.globl _stcrow
+.globl _wpntsv
+.globl _wplast
+.globl _wvlast
+.globl _vmtab
+.globl _wsbuf
+.globl _vknm
+.globl _waveob
+.globl _wsnmod
+.globl _wslib
+.globl _wdoct
+.globl _wavpal
+.data
+_wavpal:
+.dc.w $0
+.dc.w $0
+.dc.w $0
+.dc.w $3
+.dc.w $3
+.dc.w $3
+.dc.w $2
+.dc.w $2
+.dc.w $2
+.dc.w $0
+.dc.w $1
+.dc.w $1
+.dc.w $1
+.dc.w $0
+.dc.w $1
+.dc.w $0
+.dc.w $1
+.dc.w $1
+.dc.w $2
+.dc.w $1
+.dc.w $2
+.dc.w $0
+.dc.w $3
+.dc.w $0
+.dc.w $2
+.dc.w $0
+.dc.w $0
+.dc.w $2
+.dc.w $0
+.dc.w $2
+.dc.w $0
+.dc.w $0
+.dc.w $0
+.dc.w $2
+.dc.w $3
+.dc.w $3
+.dc.w $3
+.dc.w $3
+.dc.w $0
+.dc.w $3
+.dc.w $0
+.dc.w $0
+.dc.w $0
+.dc.w $0
+.dc.w $1
+.dc.w $0
+.dc.w $0
+.dc.w $3
+.globl _advwcur
+.text
+_advwcur:
+~~advwcur:
+link R14,#0
+movem.l R6-R7,-(sp)
+~newcol=R7
+*line 117
+move _stccol,R7
+add #1,R7
+*line 119
+*line 120
+move.l _cfetp,R8
+cmp 4(R8),R7
+bgt L2
+*line 120
+move R7,(sp)
+move _stcrow,-(sp)
+jsr _itcpos
+addq.l #2,sp
+L2:L1:tst.l (sp)+
+movem.l (sp)+,R7-R7
+unlk R14
+rts
+.globl _hdraw
+.text
+_hdraw:
+~~hdraw:
+~hv=R13
+~h=12
+link R14,#0
+movem.l R3-R7/R13-R13,-(sp)
+~bc=R7
+~bx=R6
+~by=R5
+~j=R4
+*line 138
+move.l 8(R14),R13
+*line 138
+move 12(R14),R6
+asl #4,R6
+add #4,R6
+*line 140
+*line 140
+move.l R13,R8
+move 12(R14),R9
+add.l R9,R9
+add.l R9,R8
+tst (R8)
+bge L4
+*line 141
+*line 142
+move #306,R5
+move 12(R14),R8
+add.l R8,R8
+move 0(R13,R8.l),R0
+neg R0
+asl #7,R0
+ext.l R0
+divs #100,R0
+sub R0,R5
+*line 143
+move #8,R7
+*line 144
+bra L5
+L4:
+*line 145
+*line 146
+*line 147
+move #306,R5
+move 12(R14),R8
+add.l R8,R8
+move 0(R13,R8.l),R0
+asl #7,R0
+ext.l R0
+divs #100,R0
+sub R0,R5
+*line 148
+move #9,R7
+L5:
+*line 151
+clr R4
+bra L8
+L9:
+*line 152
+*line 153
+move R7,(sp)
+move R5,-(sp)
+move R6,-(sp)
+move #306,-(sp)
+move R6,-(sp)
+jsr _lseg
+addq.l #8,sp
+*line 154
+add #1,R6
+L7:
+*line 151
+add #1,R4
+L8:
+*line 151
+cmp #8,R4
+blt L9
+L6:L3:tst.l (sp)+
+movem.l (sp)+,R4-R7/R13-R13
+unlk R14
+rts
+.globl _dsws
+.text
+_dsws:
+~~dsws:
+~how=8
+link R14,#-6
+movem.l R6-R7/R11-R13,-(sp)
+~ip=R13
+~fv=R12
+~hv=R11
+~ov=-4
+~i=R7
+~cx=-6
+*line 175
+move _wdbox,(sp)
+jsr _exp_c
+move R0,-6(R14)
+*line 177
+move _curvce,R0
+muls #3938,R0
+move.l R0,R13
+add.l #_vbufs,R13
+*line 178
+tst _curwslt
+beq L10000
+move.l R13,R0
+add.l #2858,R0
+bra L10002
+L10000:move.l R13,R0
+add.l #1778,R0
+L10002:move.l R0,R12
+*line 179
+tst _curwslt
+beq L10003
+move.l R13,R0
+add.l #3366,R0
+bra L10005
+L10003:move.l R13,R0
+add.l #2286,R0
+L10005:move.l R0,-4(R14)
+*line 180
+tst _curwslt
+beq L10006
+move.l R13,R0
+add.l #3874,R0
+bra L10008
+L10006:move.l R13,R0
+add.l #2794,R0
+L10008:move.l R0,R11
+*line 182
+move.l #_wdpoint,_point
+*line 184
+*line 185
+clr R0
+move 10+_v_regs,R0
+and #384,R0
+beq L11
+*line 185
+clr (sp)
+jsr _vbank
+*line 186
+L11:
+*line 187
+*line 188
+tst 8(R14)
+beq L12
+*line 189
+move -6(R14),(sp)
+move 6+_wdbox,-(sp)
+move 4+_wdbox,-(sp)
+move 2+_wdbox,-(sp)
+move _wdbox,-(sp)
+move #128,-(sp)
+move.l _waveob,-(sp)
+jsr _vbfill4
+adda.l #14,sp
+*line 190
+L12:
+*line 191
+move #10,(sp)
+move #133,-(sp)
+move #510,-(sp)
+move #133,-(sp)
+move #1,-(sp)
+jsr _lseg
+addq.l #8,sp
+*line 192
+move #10,(sp)
+move #266,-(sp)
+move #510,-(sp)
+move #266,-(sp)
+move #1,-(sp)
+jsr _lseg
+addq.l #8,sp
+*line 194
+clr R7
+bra L15
+L16:
+*line 195
+move R7,(sp)
+move.l R11,-(sp)
+jsr _hdraw
+addq.l #4,sp
+L14:
+*line 194
+add #1,R7
+L15:
+*line 194
+cmp #32,R7
+blt L16
+L13:
+*line 197
+clr R7
+bra L19
+L20:
+*line 198
+*line 199
+*line 200
+*line 201
+*line 202
+move #6,(sp)
+move #133,-(sp)
+move.l -4(R14),R8
+move R7,R9
+add.l R9,R9
+move 0(R8,R9.l),R0
+asr #5,R0
+ext.l R0
+divs #8,R0
+sub R0,(sp)
+move R7,R0
+asl #1,R0
+move R0,-(sp)
+add #2,(sp)
+jsr _wdpoint
+addq.l #4,sp
+*line 203
+*line 204
+*line 205
+*line 206
+*line 207
+move #7,(sp)
+move #133,-(sp)
+move R7,R8
+add.l R8,R8
+move 0(R12,R8.l),R0
+asr #5,R0
+ext.l R0
+divs #8,R0
+sub R0,(sp)
+move R7,R0
+asl #1,R0
+move R0,-(sp)
+add #2,(sp)
+jsr _wdpoint
+addq.l #4,sp
+L18:
+*line 197
+add #1,R7
+L19:
+*line 197
+cmp #254,R7
+blt L20
+L17:L10:tst.l (sp)+
+movem.l (sp)+,R7-R7/R11-R13
+unlk R14
+rts
+.globl _wdswin
+.text
+_wdswin:
+~~wdswin:
+~n=R7
+link R14,#0
+movem.l R3-R7,-(sp)
+~cx=R6
+~wval=R5
+~wsgn=R4
+*line 226
+move 8(R14),R7
+*line 226
+move R7,R0
+asl #4,R0
+ext.l R0
+add.l #_wdbox,R0
+move.l R0,R8
+move 10(R8),R6
+*line 227
+move R6,R0
+asl #4,R0
+or R0,R6
+*line 228
+move R6,R0
+asl #8,R0
+or R0,R6
+*line 232
+*line 233
+clr R0
+move 10+_v_regs,R0
+and #384,R0
+beq L22
+*line 233
+clr (sp)
+jsr _vbank
+*line 234
+L22:
+*line 235
+*line 236
+move R6,(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 6(R8,R9.l),-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 4(R8,R9.l),-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 2(R8,R9.l),-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 0(R8,R9.l),-(sp)
+move #128,-(sp)
+move.l _waveob,-(sp)
+jsr _vbfill4
+adda.l #14,sp
+*line 240
+*line 241
+move #14,(sp)
+move R7,R8
+add.l R8,R8
+add.l R8,R8
+move.l #_wdbxlb0,R9
+move.l 0(R8,R9.l),-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 14(R8,R9.l),-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 12(R8,R9.l),-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 8(R8,R9.l),-(sp)
+move #64,-(sp)
+move.l _waveob,-(sp)
+jsr _tsplot4
+adda.l #16,sp
+*line 243
+*line 244
+move #14,(sp)
+move R7,R8
+add.l R8,R8
+add.l R8,R8
+move.l #_wdbxlb1,R9
+move.l 0(R8,R9.l),-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 14(R8,R9.l),-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 12(R8,R9.l),-(sp)
+add #1,(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 8(R8,R9.l),-(sp)
+move #64,-(sp)
+move.l _waveob,-(sp)
+jsr _tsplot4
+adda.l #16,sp
+*line 248
+move R7,R0
+bra L24
+*line 249
+L25:
+*line 250
+*line 251
+*line 252
+clr (sp)
+jsr _dsws
+bra L21
+*line 253
+*line 254
+L26:
+*line 255
+*line 256
+*line 257
+move _curwave,(sp)
+add #1,(sp)
+move.l #L27,-(sp)
+move.l #_bfs,-(sp)
+jsr _sprintf
+addq.l #8,sp
+*line 258
+*line 259
+*line 260
+move #14,(sp)
+move.l #_bfs,-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 14(R8,R9.l),-(sp)
+add #9,(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 12(R8,R9.l),-(sp)
+move _curvce,R8
+add.l R8,R8
+add.l R8,R8
+move _curwslt,R9
+add.l R9,R9
+add.l R9,R8
+move.l #_wsnmod,R9
+tst 0(R8,R9.l)
+beq L10009
+move #13,-(sp)
+bra L10011
+L10009:move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 8(R8,R9.l),-(sp)
+L10011:jsr _exp_c
+addq.l #2,sp
+move R0,-(sp)
+move #64,-(sp)
+move.l _waveob,-(sp)
+jsr _tsplot4
+adda.l #16,sp
+*line 261
+*line 262
+move _curvce,(sp)
+add #1,(sp)
+move.l #L28,-(sp)
+move.l #_bfs,-(sp)
+jsr _sprintf
+addq.l #8,sp
+*line 263
+*line 264
+move #14,(sp)
+move.l #_bfs,-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 14(R8,R9.l),-(sp)
+add #18,(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 12(R8,R9.l),-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 8(R8,R9.l),-(sp)
+move #64,-(sp)
+move.l _waveob,-(sp)
+jsr _tsplot4
+adda.l #16,sp
+*line 265
+*line 266
+move _curinst,(sp)
+move.l #L29,-(sp)
+move.l #_bfs,-(sp)
+jsr _sprintf
+addq.l #8,sp
+*line 267
+*line 268
+move #14,(sp)
+move.l #_bfs,-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 14(R8,R9.l),-(sp)
+add #11,(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 12(R8,R9.l),-(sp)
+add #1,(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 8(R8,R9.l),-(sp)
+move #64,-(sp)
+move.l _waveob,-(sp)
+jsr _tsplot4
+adda.l #16,sp
+*line 269
+*line 270
+move _curwslt,(sp)
+add #65,(sp)
+move.l #L30,-(sp)
+move.l #_bfs,-(sp)
+jsr _sprintf
+addq.l #8,sp
+*line 271
+*line 272
+move #14,(sp)
+move.l #_bfs,-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 14(R8,R9.l),-(sp)
+add #19,(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 12(R8,R9.l),-(sp)
+add #1,(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 8(R8,R9.l),-(sp)
+move #64,-(sp)
+move.l _waveob,-(sp)
+jsr _tsplot4
+adda.l #16,sp
+*line 273
+bra L21
+*line 274
+*line 275
+*line 276
+*line 277
+L31:
+*line 278
+*line 279
+*line 280
+move _curwpnt,(sp)
+move.l #L32,-(sp)
+move.l #_bfs,-(sp)
+jsr _sprintf
+addq.l #8,sp
+*line 281
+*line 282
+move #14,(sp)
+move.l #_bfs,-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 14(R8,R9.l),-(sp)
+add #4,(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 12(R8,R9.l),-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 8(R8,R9.l),-(sp)
+move #64,-(sp)
+move.l _waveob,-(sp)
+jsr _tsplot4
+adda.l #16,sp
+*line 283
+*line 284
+*line 284
+tst _curwoff
+bge L33
+*line 285
+*line 286
+move _curwoff,R0
+neg R0
+move R0,R5
+*line 287
+move.b #45,R4
+*line 288
+bra L34
+L33:
+*line 289
+*line 290
+*line 291
+move _curwoff,R5
+*line 292
+move.b #43,R4
+L34:
+*line 293
+*line 294
+*line 295
+move R5,(sp)
+move.b R4,R0
+ext.w R0
+move R0,-(sp) 
+move.l #L35,-(sp)
+move.l #_bfs,-(sp)
+jsr _sprintf
+adda.l #10,sp
+*line 296
+*line 297
+move #14,(sp)
+move.l #_bfs,-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 14(R8,R9.l),-(sp)
+add #14,(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 12(R8,R9.l),-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 8(R8,R9.l),-(sp)
+move #64,-(sp)
+move.l _waveob,-(sp)
+jsr _tsplot4
+adda.l #16,sp
+*line 298
+*line 299
+*line 299
+cmp #8,_curwdth
+bne L36
+*line 300
+*line 301
+*line 302
+move #14,(sp)
+move.l #L37,-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 14(R8,R9.l),-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 12(R8,R9.l),-(sp)
+add #1,(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 8(R8,R9.l),-(sp)
+move #64,-(sp)
+move.l _waveob,-(sp)
+jsr _tsplot4
+adda.l #16,sp
+*line 303
+bra L38
+L36:
+*line 304
+*line 305
+*line 306
+*line 307
+move #14,(sp)
+move.l #L39,-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 14(R8,R9.l),-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 12(R8,R9.l),-(sp)
+add #1,(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 8(R8,R9.l),-(sp)
+move #64,-(sp)
+move.l _waveob,-(sp)
+jsr _tsplot4
+adda.l #16,sp
+*line 308
+*line 309
+move _curwdth,(sp)
+move.l #L40,-(sp)
+move.l #_bfs,-(sp)
+jsr _sprintf
+addq.l #8,sp
+*line 310
+*line 311
+move #14,(sp)
+move.l #_bfs,-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 14(R8,R9.l),-(sp)
+add #6,(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 12(R8,R9.l),-(sp)
+add #1,(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 8(R8,R9.l),-(sp)
+move #64,-(sp)
+move.l _waveob,-(sp)
+jsr _tsplot4
+adda.l #16,sp
+L38:
+*line 312
+*line 313
+*line 314
+*line 314
+tst _curwfnl
+bge L41
+*line 315
+*line 316
+move _curwfnl,R0
+neg R0
+move R0,R5
+*line 317
+move.b #45,R4
+*line 318
+bra L42
+L41:
+*line 319
+*line 320
+*line 321
+move _curwfnl,R5
+*line 322
+move.b #43,R4
+L42:
+*line 323
+*line 324
+*line 325
+move R5,(sp)
+move.b R4,R0
+ext.w R0
+move R0,-(sp) 
+move.l #L43,-(sp)
+move.l #_bfs,-(sp)
+jsr _sprintf
+adda.l #10,sp
+*line 326
+*line 327
+move #14,(sp)
+move.l #_bfs,-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 14(R8,R9.l),-(sp)
+add #14,(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 12(R8,R9.l),-(sp)
+add #1,(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 8(R8,R9.l),-(sp)
+move #64,-(sp)
+move.l _waveob,-(sp)
+jsr _tsplot4
+adda.l #16,sp
+*line 328
+bra L21
+*line 329
+*line 330
+*line 331
+L44:
+*line 332
+*line 333
+*line 334
+move _curwhrm,(sp)
+add #1,(sp)
+move.l #L45,-(sp)
+move.l #_bfs,-(sp)
+jsr _sprintf
+addq.l #8,sp
+*line 335
+*line 336
+move #14,(sp)
+move.l #_bfs,-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 14(R8,R9.l),-(sp)
+add #10,(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 12(R8,R9.l),-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 8(R8,R9.l),-(sp)
+move #64,-(sp)
+move.l _waveob,-(sp)
+jsr _tsplot4
+adda.l #16,sp
+*line 337
+*line 338
+*line 338
+tst _curwhrv
+bge L46
+*line 339
+*line 340
+move _curwhrv,R0
+neg R0
+move R0,R5
+*line 341
+move.b #45,R4
+*line 342
+bra L47
+L46:
+*line 343
+*line 344
+*line 345
+move _curwhrv,R5
+*line 346
+move.b #43,R4
+L47:
+*line 347
+*line 348
+*line 349
+move R5,(sp)
+move.b R4,R0
+ext.w R0
+move R0,-(sp) 
+move.l #L48,-(sp)
+move.l #_bfs,-(sp)
+jsr _sprintf
+adda.l #10,sp
+*line 350
+*line 351
+move #14,(sp)
+move.l #_bfs,-(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 14(R8,R9.l),-(sp)
+add #6,(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 12(R8,R9.l),-(sp)
+add #1,(sp)
+move R7,R0
+asl #4,R0
+ext.l R0
+move.l R0,R8
+move.l #_wdbox,R9
+move 8(R8,R9.l),-(sp)
+move #64,-(sp)
+move.l _waveob,-(sp)
+jsr _tsplot4
+adda.l #16,sp
+*line 352
+bra L21
+*line 353
+*line 354
+bra L23
+L24:tst R0
+beq L25
+cmp #2,R0
+beq L26
+cmp #4,R0
+beq L31
+cmp #5,R0
+beq L44
+bra L23
+L23:L21:tst.l (sp)+
+movem.l (sp)+,R4-R7
+unlk R14
+rts
+.globl _wwins
+.text
+_wwins:
+~~wwins:
+link R14,#0
+movem.l R6-R7,-(sp)
+~i=R7
+*line 371
+clr R7
+bra L52
+L53:
+*line 372
+move R7,(sp)
+jsr _wdswin
+L51:
+*line 371
+add #1,R7
+L52:
+*line 371
+cmp #6,R7
+blt L53
+L50:L49:tst.l (sp)+
+movem.l (sp)+,R7-R7
+unlk R14
+rts
+.globl _wdpoint
+.text
+_wdpoint:
+~~wdpoint:
+~x=8
+~y=10
+~pen=12
+link R14,#-4
+*line 384
+*line 385
+clr R0
+move 10+_v_regs,R0
+and #384,R0
+beq L55
+*line 385
+clr (sp)
+jsr _vbank
+*line 386
+L55:
+*line 387
+move 12(R14),(sp)
+move 10(R14),-(sp)
+move 8(R14),-(sp)
+move.l _wdoct,-(sp)
+jsr _vputp
+addq.l #8,sp
+L54:unlk R14
+rts
+.globl _wdbord
+.text
+_wdbord:
+~~wdbord:
+link R14,#-4
+*line 401
+move.l #_wdpoint,_point
+*line 403
+move #2,(sp)
+clr -(sp)
+move #511,-(sp)
+clr -(sp)
+clr -(sp)
+jsr _lseg
+addq.l #8,sp
+*line 404
+move #2,(sp)
+move #349,-(sp)
+move #511,-(sp)
+clr -(sp)
+move #511,-(sp)
+jsr _lseg
+addq.l #8,sp
+*line 405
+move #2,(sp)
+move #349,-(sp)
+clr -(sp)
+move #349,-(sp)
+move #511,-(sp)
+jsr _lseg
+addq.l #8,sp
+*line 406
+move #2,(sp)
+clr -(sp)
+clr -(sp)
+move #349,-(sp)
+clr -(sp)
+jsr _lseg
+addq.l #8,sp
+*line 408
+move #2,(sp)
+move #308,-(sp)
+move #511,-(sp)
+move #308,-(sp)
+clr -(sp)
+jsr _lseg
+addq.l #8,sp
+*line 409
+move #2,(sp)
+move #321,-(sp)
+clr -(sp)
+move #321,-(sp)
+move #511,-(sp)
+jsr _lseg
+addq.l #8,sp
+*line 411
+move #2,(sp)
+move #349,-(sp)
+move #175,-(sp)
+move #322,-(sp)
+move #175,-(sp)
+jsr _lseg
+addq.l #8,sp
+*line 412
+move #2,(sp)
+move #349,-(sp)
+move #231,-(sp)
+move #322,-(sp)
+move #231,-(sp)
+jsr _lseg
+addq.l #8,sp
+*line 413
+move #2,(sp)
+move #349,-(sp)
+move #399,-(sp)
+move #322,-(sp)
+move #399,-(sp)
+jsr _lseg
+addq.l #8,sp
+L56:unlk R14
+rts
+.globl _clrws
+.text
+_clrws:
+~~clrws:
+link R14,#0
+movem.l R7-R7/R13-R13,-(sp)
+~ip=R13
+*line 429
+move _curvce,R0
+muls #3938,R0
+move.l R0,R13
+add.l #_vbufs,R13
+*line 431
+*line 431
+tst _curwslt
+beq L58
+*line 432
+*line 433
+move #32,(sp)
+clr -(sp)
+move.l R13,-(sp)
+add.l #3874,(sp)
+jsr _memsetw
+addq.l #6,sp
+*line 434
+move #254,(sp)
+clr -(sp)
+move.l R13,-(sp)
+add.l #3366,(sp)
+jsr _memsetw
+addq.l #6,sp
+*line 435
+move #254,(sp)
+clr -(sp)
+move.l R13,-(sp)
+add.l #2858,(sp)
+jsr _memsetw
+addq.l #6,sp
+*line 436
+bra L59
+L58:
+*line 437
+*line 438
+*line 439
+move #32,(sp)
+clr -(sp)
+move.l R13,-(sp)
+add.l #2794,(sp)
+jsr _memsetw
+addq.l #6,sp
+*line 440
+move #254,(sp)
+clr -(sp)
+move.l R13,-(sp)
+add.l #2286,(sp)
+jsr _memsetw
+addq.l #6,sp
+*line 441
+move #254,(sp)
+clr -(sp)
+move.l R13,-(sp)
+add.l #1778,(sp)
+jsr _memsetw
+addq.l #6,sp
+L59:
+*line 444
+jsr _clrwsa
+*line 446
+move _curwpnt,R0
+move R0,_wplast
+move R0,_lstwpnt
+*line 448
+clr R0
+move R0,_curwoff
+move R0,_curwfnl
+move R0,_wvlast
+move R0,_lstwoff
+*line 450
+clr _curwhrv
+*line 452
+jsr _updfpu
+*line 453
+move _curvce,R8
+add.l R8,R8
+add.l R8,R8
+move _curwslt,R9
+add.l R9,R9
+add.l R9,R8
+add.l #_wsnmod,R8
+move #1,(R8)
+L57:tst.l (sp)+
+movem.l (sp)+,R13-R13
+unlk R14
+rts
+.globl _iniwslb
+.text
+_iniwslb:
+~~iniwslb:
+link R14,#0
+movem.l R5-R7,-(sp)
+~i=R7
+~j=R6
+*line 469
+move #24,(sp)
+clr -(sp)
+move.l #_wsnmod,-(sp)
+jsr _memsetw
+addq.l #6,sp
+*line 471
+clr R7
+bra L63
+L64:
+*line 472
+*line 473
+clr R6
+bra L67
+L68:
+*line 474
+*line 475
+move R6,R0
+add #1,R0
+asl #8,R0
+move #-32768,R1
+eor R1,R0
+move R7,R1
+muls #1080,R1
+move R6,R2
+asl #1,R2
+ext.l R2
+add.l R2,R1
+add.l #_wslib,R1
+move.l R1,R9
+move R0,(R9)
+*line 476
+move R6,R0
+add #1,R0
+asl #8,R0
+move #-32768,R1
+eor R1,R0
+move R7,R1
+muls #1080,R1
+move R6,R2
+asl #1,R2
+ext.l R2
+add.l R2,R1
+add.l #_wslib,R1
+move.l R1,R9
+move R0,508(R9)
+L66:
+*line 473
+add #1,R6
+L67:
+*line 473
+cmp #254,R6
+blt L68
+L65:
+*line 477
+*line 478
+*line 479
+move #32,(sp)
+clr -(sp)
+move R7,R0
+muls #1080,R0
+add.l #_wslib,R0
+move.l R0,-(sp)
+add.l #1016,(sp)
+jsr _memsetw
+addq.l #6,sp
+L62:
+*line 471
+add #1,R7
+L63:
+*line 471
+cmp #20,R7
+blt L64
+L61:L60:tst.l (sp)+
+movem.l (sp)+,R6-R7
+unlk R14
+rts
+.globl _wsdsp
+.text
+_wsdsp:
+~~wsdsp:
+link R14,#-4
+*line 494
+move.l #_v_score,_waveob
+*line 495
+move.l #_v_curs0,_obj0
+*line 496
+move.l #144+_v_obtab,_wdoct
+*line 498
+clr _wpntsv
+*line 499
+jsr _newws
+*line 501
+jsr _dswap
+*line 503
+*line 504
+clr R0
+move 10+_v_regs,R0
+and #384,R0
+beq L70
+*line 504
+clr (sp)
+jsr _vbank
+*line 505
+L70:
+*line 506
+move #32767,(sp)
+clr -(sp)
+move.l _waveob,-(sp)
+jsr _memsetw
+addq.l #6,sp
+*line 507
+move #12033,(sp)
+clr -(sp)
+move.l _waveob,R0
+add.l #$fffe,R0
+move.l R0,-(sp)
+jsr _memsetw
+addq.l #6,sp
+*line 509
+move #-1,(sp)
+move #1536,-(sp)
+clr -(sp)
+clr -(sp)
+move #350,-(sp)
+move #512,-(sp)
+move.l _waveob,-(sp)
+clr -(sp)
+clr -(sp)
+move #8,-(sp)
+jsr _SetObj
+adda.l #20,sp
+*line 510
+move #-1,(sp)
+move #1540,-(sp)
+move #128,-(sp)
+move #256,-(sp)
+move #16,-(sp)
+move #16,-(sp)
+move.l _obj0,-(sp)
+move #1,-(sp)
+clr -(sp)
+clr -(sp)
+jsr _SetObj
+adda.l #20,sp
+*line 512
+move #1,(sp)
+jsr _arcurs
+*line 513
+move #1,(sp)
+jsr _itcini
+*line 515
+jsr _wdbord
+*line 516
+jsr _wwins
+*line 518
+move #8,(sp)
+move #8,-(sp)
+jsr _SetPri
+addq.l #2,sp
+*line 519
+move #15,(sp)
+clr -(sp)
+jsr _SetPri
+addq.l #2,sp
+*line 520
+move #128,(sp)
+move #256,-(sp)
+jsr _setgc
+addq.l #2,sp
+*line 522
+move.l #_wavpal,(sp)
+jsr _vsndpal
+L69:unlk R14
+rts
+.data
+L27:.dc.b $25,$30,$32,$64,$0
+L28:.dc.b $25,$30,$32,$64,$0
+L29:.dc.b $25,$30,$32,$64,$0
+L30:.dc.b $25,$63,$0
+L32:.dc.b $25,$30,$33,$64,$0
+L35:.dc.b $25,$63,$25,$30,$34,$64,$0
+L37:.dc.b $49,$6E,$74,$65,$72,$70,$0
+L39:.dc.b $57,$69,$64,$74,$68,$0
+L40:.dc.b $25,$30,$31,$64,$0
+L43:.dc.b $25,$63,$25,$30,$34,$64,$0
+L45:.dc.b $25,$30,$32,$64,$0
+L48:.dc.b $25,$63,$25,$30,$33,$64,$0
