Index: alcyon/sqdkey.s
===================================================================
--- alcyon/sqdkey.s	(revision 7bf3856f4ff505a2174d89c937caf328029e3574)
+++ alcyon/sqdkey.s	(revision 7bf3856f4ff505a2174d89c937caf328029e3574)
@@ -0,0 +1,1161 @@
+.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 _ebflag
+.globl _ebuf
+.globl _curfet
+.globl _cfetp
+.globl _infetp
+.globl _stmptr
+.globl _defptr
+.globl _patches
+.globl _defents
+.globl _seqtab
+.globl _seqflag
+.globl _seqline
+.globl _seqstim
+.globl _seqtime
+.globl _sregval
+.globl _trstate
+.globl _asig
+.globl _astat
+.globl _action
+.globl _curslin
+.globl _sqdeflg
+.globl _stccol
+.globl _stcrow
+.globl _sqdebuf
+.globl _seqbuf
+.globl _seqtab
+.globl _actfmt
+.comm _actfmt,2
+.globl _actlft
+.data
+_actlft:
+.dc.b $C
+.dc.b $18
+.dc.b $24
+.even
+.globl _seqdfmt
+.data
+_seqdfmt:
+.dc.b $0
+.dc.b $1
+.dc.b $1
+.dc.b $1
+.dc.b $1
+.dc.b $2
+.dc.b $2
+.dc.b $2
+.dc.b $2
+.dc.b $3
+.dc.b $3
+.dc.b $3
+.dc.b $3
+.dc.b $0
+.dc.b $4
+.dc.b $0
+.dc.b $3
+.even
+.globl _seq2buf
+.text
+_seq2buf:
+~~seq2buf:
+link R14,#-4
+*line 55
+move #7,(sp)
+move _curslin,R0
+muls #14,R0
+add.l #_seqtab,R0
+move.l R0,-(sp)
+move.l #_seqbuf,-(sp)
+jsr _memcpyw
+addq.l #8,sp
+*line 56
+move _curslin,(sp)
+move.l #_sqdebuf,-(sp)
+jsr _dsqlin
+addq.l #4,sp
+*line 57
+move #1,_sqdeflg
+L1:unlk R14
+rts
+.globl _sqactde
+.text
+_sqactde:
+~~sqactde:
+~key=R7
+link R14,#-14
+movem.l R5-R7,-(sp)
+~col=R6
+~defmt=-2
+~act=-4
+~vtype=-6
+~buf=-14
+*line 77
+move 8(R14),R7
+*line 77
+move _stccol,R6
+move _action,R8
+move.l #_actlft,R9
+move.b 0(R8,R9.l),R0
+ext.w R0
+sub R0,R6
+*line 79
+move _action,R0
+bra L4
+*line 80
+L5:
+*line 81
+*line 82
+*line 83
+move 2+_seqbuf,-4(R14)
+*line 84
+clr R0
+move 4+_seqbuf,R0
+and #3840,R0
+move R0,-6(R14)
+bra L3
+*line 85
+*line 86
+L6:
+*line 87
+*line 88
+*line 89
+move 6+_seqbuf,-4(R14)
+*line 90
+clr R0
+move 8+_seqbuf,R0
+and #3840,R0
+move R0,-6(R14)
+bra L3
+*line 91
+*line 92
+L7:
+*line 93
+*line 94
+*line 95
+move 10+_seqbuf,-4(R14)
+*line 96
+clr R0
+move 12+_seqbuf,R0
+and #3840,R0
+move R0,-6(R14)
+bra L3
+*line 97
+*line 98
+L8:
+*line 99
+*line 100
+bra L2
+*line 101
+bra L3
+L4:tst R0
+beq L5
+cmp #1,R0
+beq L6
+cmp #2,R0
+beq L7
+bra L8
+L3:
+*line 104
+clr R0
+move -4(R14),R0
+and #255,R0
+move R0,R8
+move.l #_seqdfmt,R9
+move.b 0(R8,R9.l),R0
+ext.w R0
+move R0,-2(R14)
+*line 107
+move -2(R14),R0
+bra L10
+*line 108
+L11:
+*line 109
+*line 110
+*line 111
+*line 111
+cmp #3,R6
+blt L12
+cmp #5,R6
+bgt L12
+*line 112
+*line 113
+*line 114
+cmp #3,R6
+bne L10000
+cmp #1,R7
+bgt L2
+L10000:*line 115
+*line 116
+move R7,R0
+add #48,R0
+move.b R0,-14(R14)
+*line 117
+bra L13
+L12:
+*line 118
+*line 118
+cmp #7,R6
+bne L14
+*line 119
+*line 120
+*line 120
+cmp #1,R7
+beq L10001
+cmp #2,R7
+bne L15
+L10001:*line 121
+*line 122
+move R7,R0
+add #48,R0
+move.b R0,-14(R14)
+*line 123
+*line 124
+move #98,(sp)
+move.l #L16,-(sp)
+move _stccol,-(sp)
+add #1,(sp)
+move #7,-(sp)
+jsr _UpdVid
+addq.l #8,sp
+*line 125
+move #3,(sp)
+move.l #L17,-(sp)
+move.l #_sqdebuf,R0
+move _stccol,R1
+ext.l R1
+add.l R1,R0
+move.l R0,-(sp)
+add.l #1,(sp)
+jsr _memcpy
+addq.l #8,sp
+*line 126
+bra L18
+L15:
+*line 127
+*line 127
+cmp #3,R7
+bne L19
+*line 128
+*line 129
+move.b #76,-14(R14)
+*line 130
+*line 131
+move #98,(sp)
+move.l #L20,-(sp)
+move _stccol,-(sp)
+add #1,(sp)
+move #7,-(sp)
+jsr _UpdVid
+addq.l #8,sp
+*line 132
+move #3,(sp)
+move #32,-(sp)
+move.l #_sqdebuf,R0
+move _stccol,R1
+ext.l R1
+add.l R1,R0
+move.l R0,-(sp)
+add.l #1,(sp)
+jsr _memset
+addq.l #6,sp
+*line 133
+bra L21
+L19:
+*line 134
+*line 135
+bra L2
+*line 136
+L21:L18:
+*line 137
+*line 138
+bra L22
+L14:
+*line 139
+*line 139
+cmp #9,R6
+blt L23
+cmp #10,R6
+bgt L23
+*line 140
+*line 141
+*line 142
+cmp #9,R6
+bne L10002
+cmp #1,R7
+bgt L2
+L10002:*line 143
+*line 144
+move R7,R0
+add #48,R0
+move.b R0,-14(R14)
+*line 145
+*line 146
+L23:L22:L13:
+*line 147
+clr.b -13(R14)
+*line 148
+move.l #_sqdebuf,R8
+move _stccol,R9
+add.l R9,R8
+move.b -14(R14),(R8)
+*line 149
+*line 150
+move #98,(sp)
+move.l R14,-(sp)
+add.l #-14,(sp)
+move _stccol,-(sp)
+move #7,-(sp)
+jsr _UpdVid
+addq.l #8,sp
+*line 151
+*line 152
+*line 152
+cmp #5,R6
+beq L10003
+cmp #7,R6
+bne L24
+L10003:*line 153
+*line 154
+add #1,_stccol
+*line 155
+add #1,R6
+*line 156
+*line 157
+L24:
+*line 158
+*line 159
+cmp #10,R6
+bne L25
+*line 159
+jsr _ctcon
+*line 160
+bra L26
+L25:
+*line 161
+add #1,_stccol
+move _stccol,(sp)
+move _stcrow,-(sp)
+jsr _movestc
+addq.l #2,sp
+L26:
+*line 162
+bra L2
+*line 163
+*line 164
+*line 165
+L27:
+*line 166
+*line 167
+*line 168
+*line 168
+cmp #9,R6
+blt L28
+cmp #10,R6
+bgt L28
+*line 169
+*line 170
+*line 171
+cmp #9,R6
+bne L10004
+cmp #1,R7
+bgt L2
+L10004:*line 172
+bra L29
+L28:
+*line 173
+*line 174
+bra L2
+*line 175
+L29:
+*line 176
+*line 177
+*line 178
+move R7,R0
+add #48,R0
+move.b R0,-14(R14)
+*line 179
+clr.b -13(R14)
+*line 180
+move R7,R0
+add #48,R0
+move.l #_sqdebuf,R9
+move _stccol,R10
+add.l R10,R9
+move.b R0,(R9)
+*line 181
+*line 182
+move #98,(sp)
+move.l R14,-(sp)
+add.l #-14,(sp)
+move _stccol,-(sp)
+move #7,-(sp)
+jsr _UpdVid
+addq.l #8,sp
+*line 183
+*line 184
+*line 185
+cmp #10,R6
+bne L30
+*line 185
+jsr _ctcon
+*line 186
+bra L31
+L30:
+*line 187
+add #1,_stccol
+move _stccol,(sp)
+move _stcrow,-(sp)
+jsr _movestc
+addq.l #2,sp
+L31:
+*line 188
+bra L2
+*line 189
+*line 190
+*line 191
+L32:
+*line 192
+*line 193
+*line 194
+*line 194
+cmp #7,R6
+bne L33
+cmp #16,-4(R14)
+bne L33
+*line 195
+*line 196
+*line 197
+cmp #8,R7
+bne L34
+*line 197
+move.b #45,-14(R14)
+bra L35
+L34:
+*line 198
+*line 199
+cmp #9,R7
+bne L36
+*line 199
+move.b #43,-14(R14)
+*line 200
+bra L37
+L36:bra L2
+L37:L35:
+*line 201
+*line 202
+*line 203
+clr.b -13(R14)
+*line 204
+move.l #_sqdebuf,R8
+move _stccol,R9
+add.l R9,R8
+move.b -14(R14),(R8)
+*line 205
+move #98,(sp)
+move.l R14,-(sp)
+add.l #-14,(sp)
+move _stccol,-(sp)
+move #7,-(sp)
+jsr _UpdVid
+addq.l #8,sp
+*line 206
+add #1,_stccol
+move _stccol,(sp)
+move _stcrow,-(sp)
+jsr _movestc
+addq.l #2,sp
+bra L2
+*line 207
+*line 208
+*line 209
+L33:
+*line 210
+clr R0
+move -6(R14),R0
+bra L39
+*line 211
+L40:
+*line 212
+*line 213
+*line 214
+*line 214
+cmp #5,R6
+blt L10006
+cmp #6,R6
+ble L10005
+L10006:cmp #9,R6
+blt L41
+cmp #10,R6
+bgt L41
+L10005:*line 215
+*line 216
+*line 217
+cmp #5,R6
+beq L10008
+cmp #9,R6
+bne L10007
+L10008:cmp #1,R7
+bgt L2
+L10007:*line 218
+bra L42
+L41:
+*line 219
+*line 220
+bra L2
+*line 221
+L42:
+*line 222
+*line 223
+*line 224
+move R7,R0
+add #48,R0
+move.b R0,-14(R14)
+*line 225
+clr.b -13(R14)
+*line 226
+move R7,R0
+add #48,R0
+move.l #_sqdebuf,R9
+move _stccol,R10
+add.l R10,R9
+move.b R0,(R9)
+*line 227
+*line 228
+move #98,(sp)
+move.l R14,-(sp)
+add.l #-14,(sp)
+move _stccol,-(sp)
+move #7,-(sp)
+jsr _UpdVid
+addq.l #8,sp
+*line 229
+*line 230
+*line 230
+cmp #6,R6
+bne L43
+*line 231
+*line 232
+add #2,R6
+*line 233
+add #2,_stccol
+*line 234
+*line 235
+L43:
+*line 236
+*line 237
+cmp #10,R6
+bne L44
+*line 237
+jsr _ctcon
+*line 238
+bra L45
+L44:
+*line 239
+add #1,_stccol
+move _stccol,(sp)
+move _stcrow,-(sp)
+jsr _movestc
+addq.l #2,sp
+L45:
+*line 240
+bra L2
+*line 241
+*line 242
+*line 243
+L46:
+*line 244
+*line 245
+*line 246
+*line 246
+cmp #5,R6
+blt L10010
+cmp #6,R6
+ble L10009
+L10010:cmp #8,R6
+blt L47
+cmp #9,R6
+bgt L47
+L10009:*line 247
+*line 248
+*line 249
+cmp #5,R6
+bne L10011
+cmp #1,R7
+bgt L2
+L10011:*line 250
+bra L48
+L47:
+*line 251
+*line 252
+bra L2
+*line 253
+L48:
+*line 254
+*line 255
+*line 256
+move R7,R0
+add #48,R0
+move.b R0,-14(R14)
+*line 257
+clr.b -13(R14)
+*line 258
+move R7,R0
+add #48,R0
+move.l #_sqdebuf,R9
+move _stccol,R10
+add.l R10,R9
+move.b R0,(R9)
+*line 259
+*line 260
+move #98,(sp)
+move.l R14,-(sp)
+add.l #-14,(sp)
+move _stccol,-(sp)
+move #7,-(sp)
+jsr _UpdVid
+addq.l #8,sp
+*line 261
+*line 262
+*line 262
+cmp #6,R6
+bne L49
+*line 263
+*line 264
+add #1,R6
+*line 265
+add #1,_stccol
+*line 266
+*line 267
+L49:
+*line 268
+*line 269
+cmp #9,R6
+bne L50
+*line 269
+jsr _ctcon
+*line 270
+bra L51
+L50:
+*line 271
+add #1,_stccol
+move _stccol,(sp)
+move _stcrow,-(sp)
+jsr _movestc
+addq.l #2,sp
+L51:
+*line 272
+bra L2
+*line 273
+*line 274
+*line 275
+L52:
+*line 276
+*line 277
+*line 278
+*line 278
+cmp #5,R6
+blt L10013
+cmp #6,R6
+ble L10012
+L10013:cmp #9,R6
+bne L53
+L10012:*line 279
+*line 280
+*line 281
+cmp #5,R6
+bne L10014
+cmp #1,R7
+bgt L2
+L10014:*line 282
+*line 283
+cmp #9,R6
+bne L10015
+cmp #1,R7
+blt L2
+cmp #4,R7
+bgt L2
+L10015:*line 284
+bra L54
+L53:
+*line 285
+*line 286
+bra L2
+*line 287
+L54:
+*line 288
+*line 289
+*line 290
+move R7,R0
+add #48,R0
+move.b R0,-14(R14)
+*line 291
+clr.b -13(R14)
+*line 292
+move R7,R0
+add #48,R0
+move.l #_sqdebuf,R9
+move _stccol,R10
+add.l R10,R9
+move.b R0,(R9)
+*line 293
+*line 294
+move #98,(sp)
+move.l R14,-(sp)
+add.l #-14,(sp)
+move _stccol,-(sp)
+move #7,-(sp)
+jsr _UpdVid
+addq.l #8,sp
+*line 295
+*line 296
+*line 296
+cmp #6,R6
+bne L55
+*line 297
+*line 298
+add #2,R6
+*line 299
+add #2,_stccol
+*line 300
+*line 301
+L55:
+*line 302
+*line 303
+cmp #9,R6
+bne L56
+*line 303
+jsr _ctcon
+*line 304
+bra L57
+L56:
+*line 305
+add #1,_stccol
+move _stccol,(sp)
+move _stcrow,-(sp)
+jsr _movestc
+addq.l #2,sp
+L57:
+*line 306
+bra L2
+*line 307
+*line 308
+*line 309
+L58:
+*line 310
+*line 311
+*line 312
+*line 312
+cmp #5,R6
+blt L10017
+cmp #6,R6
+ble L10016
+L10017:cmp #9,R6
+bne L59
+L10016:*line 313
+*line 314
+*line 315
+cmp #5,R6
+bne L10018
+cmp #1,R7
+bgt L2
+L10018:*line 316
+*line 317
+*line 318
+cmp #9,R6
+bne L10019
+cmp #6,R7
+bgt L2
+L10019:*line 319
+bra L60
+L59:
+*line 320
+*line 321
+bra L2
+*line 322
+L60:
+*line 323
+*line 324
+*line 325
+move R7,R0
+add #48,R0
+move.b R0,-14(R14)
+*line 326
+clr.b -13(R14)
+*line 327
+move R7,R0
+add #48,R0
+move.l #_sqdebuf,R9
+move _stccol,R10
+add.l R10,R9
+move.b R0,(R9)
+*line 328
+*line 329
+move #98,(sp)
+move.l R14,-(sp)
+add.l #-14,(sp)
+move _stccol,-(sp)
+move #7,-(sp)
+jsr _UpdVid
+addq.l #8,sp
+*line 330
+*line 331
+*line 331
+cmp #6,R6
+bne L61
+*line 332
+*line 333
+add #2,R6
+*line 334
+add #2,_stccol
+*line 335
+*line 336
+L61:
+*line 337
+*line 338
+cmp #9,R6
+bne L62
+*line 338
+jsr _ctcon
+*line 339
+bra L63
+L62:
+*line 340
+add #1,_stccol
+move _stccol,(sp)
+move _stcrow,-(sp)
+jsr _movestc
+addq.l #2,sp
+L63:
+*line 341
+bra L2
+*line 342
+bra L38
+L39:tst R0
+beq L40
+cmp #256,R0
+beq L46
+cmp #512,R0
+beq L52
+cmp #768,R0
+beq L58
+bra L38
+L38:
+*line 343
+*line 344
+*line 345
+L64:
+*line 346
+*line 347
+*line 348
+*line 349
+tst R6
+blt L10020
+cmp #7,R6
+ble L2
+L10020:*line 350
+*line 351
+move R7,R0
+add #48,R0
+move.b R0,-14(R14)
+*line 352
+clr.b -13(R14)
+*line 353
+move R7,R0
+add #48,R0
+move.l #_sqdebuf,R9
+move _stccol,R10
+add.l R10,R9
+move.b R0,(R9)
+*line 354
+*line 355
+move #98,(sp)
+move.l R14,-(sp)
+add.l #-14,(sp)
+move _stccol,-(sp)
+move #7,-(sp)
+jsr _UpdVid
+addq.l #8,sp
+*line 356
+*line 357
+*line 358
+cmp #10,R6
+bne L65
+*line 358
+jsr _ctcon
+*line 359
+bra L66
+L65:
+*line 360
+add #1,_stccol
+move _stccol,(sp)
+move _stcrow,-(sp)
+jsr _movestc
+addq.l #2,sp
+L66:
+*line 361
+bra L2
+*line 362
+*line 363
+L67:
+*line 364
+L68:
+*line 365
+*line 366
+bra L2
+*line 367
+bra L9
+L10:cmp #4,R0
+bhi L68
+asl #2,R0
+move R0,R8
+add.l #L69,R8
+move.l (R8),R8
+jmp (R8)
+.data
+L69:.dc.l L67
+.dc.l L11
+.dc.l L27
+.dc.l L32
+.dc.l L64
+.text
+L9:L2:tst.l (sp)+
+movem.l (sp)+,R6-R7
+unlk R14
+rts
+.globl _sqdkey
+.text
+_sqdkey:
+~~sqdkey:
+link R14,#-8
+movem.l R6-R7,-(sp)
+~key=R7
+~buf=-8
+*line 385
+*line 386
+tst _astat
+beq L70
+*line 387
+*line 388
+*line 389
+tst _sqdeflg
+bne L71
+*line 389
+jsr _seq2buf
+*line 390
+L71:
+*line 391
+move _asig,R7
+add #-60,R7
+*line 393
+*line 393
+cmp #2,_stccol
+blt L72
+cmp #4,_stccol
+bgt L72
+*line 394
+*line 395
+move R7,R0
+add #48,R0
+move.b R0,-8(R14)
+*line 396
+clr.b -7(R14)
+*line 397
+*line 398
+move R7,R0
+add #48,R0
+move.l #_sqdebuf,R9
+move _stccol,R10
+add.l R10,R9
+move.b R0,(R9)
+*line 399
+*line 400
+move #98,(sp)
+move.l R14,-(sp)
+sub.l #8,(sp)
+move _stccol,-(sp)
+move #7,-(sp)
+jsr _UpdVid
+addq.l #8,sp
+*line 401
+*line 402
+*line 403
+cmp #4,_stccol
+bne L73
+*line 403
+jsr _ctcon
+*line 404
+bra L74
+L73:
+*line 405
+add #1,_stccol
+move _stccol,(sp)
+move _stcrow,-(sp)
+jsr _movestc
+addq.l #2,sp
+L74:
+*line 406
+bra L70
+*line 407
+*line 408
+*line 409
+bra L75
+L72:
+*line 410
+*line 410
+cmp #6,_stccol
+blt L76
+cmp #10,_stccol
+bgt L76
+*line 411
+*line 412
+*line 413
+cmp #8,_stccol
+beq L70
+*line 414
+*line 415
+move R7,R0
+add #48,R0
+move.b R0,-8(R14)
+*line 416
+clr.b -7(R14)
+*line 417
+*line 418
+move R7,R0
+add #48,R0
+move.l #_sqdebuf,R9
+move _stccol,R10
+add.l R10,R9
+move.b R0,(R9)
+*line 419
+*line 420
+move #98,(sp)
+move.l R14,-(sp)
+sub.l #8,(sp)
+move _stccol,-(sp)
+move #7,-(sp)
+jsr _UpdVid
+addq.l #8,sp
+*line 421
+*line 422
+*line 423
+cmp #7,_stccol
+bne L77
+*line 423
+add #1,_stccol
+*line 424
+L77:
+*line 425
+*line 426
+cmp #10,_stccol
+bne L78
+*line 426
+jsr _ctcon
+*line 427
+bra L79
+L78:
+*line 428
+add #1,_stccol
+move _stccol,(sp)
+move _stcrow,-(sp)
+jsr _movestc
+addq.l #2,sp
+L79:
+*line 429
+bra L70
+*line 430
+*line 431
+bra L80
+L76:
+*line 432
+*line 432
+cmp #12,_stccol
+blt L81
+cmp #22,_stccol
+bgt L81
+*line 433
+*line 434
+clr _action
+*line 435
+move R7,(sp)
+jsr _sqactde
+bra L70
+*line 436
+*line 437
+bra L82
+L81:
+*line 438
+*line 438
+cmp #24,_stccol
+blt L83
+cmp #34,_stccol
+bgt L83
+*line 439
+*line 440
+move #1,_action
+*line 441
+move R7,(sp)
+jsr _sqactde
+bra L70
+*line 442
+*line 443
+bra L84
+L83:
+*line 444
+*line 444
+cmp #36,_stccol
+blt L85
+cmp #46,_stccol
+bgt L85
+*line 445
+*line 446
+move #2,_action
+*line 447
+move R7,(sp)
+jsr _sqactde
+bra L70
+*line 448
+*line 449
+L85:L84:L82:L80:L75:L70:tst.l (sp)+
+movem.l (sp)+,R7-R7
+unlk R14
+rts
+.data
+L16:.dc.b $20,$30,$31,$0
+L17:.dc.b $20,$30,$31,$0
+L20:.dc.b $20,$20,$20,$0
