Index: alcyon/ldfield.s
===================================================================
--- alcyon/ldfield.s	(revision 7bf3856f4ff505a2174d89c937caf328029e3574)
+++ alcyon/ldfield.s	(revision 7bf3856f4ff505a2174d89c937caf328029e3574)
@@ -0,0 +1,1094 @@
+.globl _ebflag
+.globl _ebuf
+.globl _curfet
+.globl _cfetp
+.globl _infetp
+.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 _filecat
+.globl _astat
+.globl _catin
+.globl _cmfirst
+.globl _cxrate
+.globl _cxval
+.globl _cyrate
+.globl _cyval
+.globl _ldelsw
+.globl _lderrsw
+.globl _ldkind
+.globl _ldpass
+.globl _ldrow
+.globl _ldslot
+.globl _lmwtype
+.globl _loadrow
+.globl _loadsw
+.globl _lorchl
+.globl _lrasw
+.globl _lselsw
+.globl _ltagged
+.globl _ndisp
+.globl _oldltag
+.globl _oldpk
+.globl _oldsl
+.globl _pkctrl
+.globl _sliders
+.globl _stcrow
+.globl _stccol
+.globl _submenu
+.globl _tagslot
+.globl _thcwval
+.globl _tvcwval
+.globl _librob
+.globl _bfs
+.globl _ldfile
+.globl _ldcmnt
+.globl _crate1
+.globl _ldmap
+.globl _swpt
+.globl _oldsw
+.globl _csbp
+.globl _ldboxes
+.globl _ld_fet1
+.data
+_ld_fet1:
+.dc.w $15
+.dc.w $A
+.dc.w $11
+.dc.w $0
+*line 98
+.dc.l _et_null
+*line 98
+.dc.l _ef_null
+*line 98
+.dc.l _rd_null
+*line 98
+.dc.l _nd_null
+.dc.w $15
+.dc.w $1B
+.dc.w $3F
+.dc.w $0
+*line 99
+.dc.l _et_null
+*line 99
+.dc.l _ef_null
+*line 99
+.dc.l _rd_null
+*line 99
+.dc.l _nd_null
+.dc.w $0
+.dc.w $0
+.dc.w $0
+.dc.w $0
+.dc.l $0
+.dc.l $0
+.dc.l $0
+.dc.l $0
+.globl _ldbox
+.data
+_ldbox:
+.dc.w $1
+.dc.w $1
+.dc.w $1FE
+.dc.w $D
+.dc.w $C
+.dc.w $2
+.dc.w $0
+.dc.w $1
+.dc.w $1
+.dc.w $E
+.dc.w $1FE
+.dc.w $124
+.dc.w $C
+.dc.w $2
+.dc.w $1
+.dc.w $1
+.dc.w $1
+.dc.w $126
+.dc.w $4E
+.dc.w $133
+.dc.w $C
+.dc.w $3
+.dc.w $15
+.dc.w $1
+.dc.w $50
+.dc.w $126
+.dc.w $8F
+.dc.w $133
+.dc.w $C
+.dc.w $4
+.dc.w $15
+.dc.w $A
+.dc.w $91
+.dc.w $126
+.dc.w $D6
+.dc.w $133
+.dc.w $C
+.dc.w $5
+.dc.w $15
+.dc.w $13
+.dc.w $D8
+.dc.w $126
+.dc.w $1FE
+.dc.w $133
+.dc.w $C
+.dc.w $6
+.dc.w $15
+.dc.w $1B
+.dc.w $1
+.dc.w $135
+.dc.w $46
+.dc.w $141
+.dc.w $C
+.dc.w $7
+.dc.w $16
+.dc.w $1
+.dc.w $1
+.dc.w $142
+.dc.w $46
+.dc.w $14F
+.dc.w $C
+.dc.w $7
+.dc.w $17
+.dc.w $1
+.dc.w $1
+.dc.w $150
+.dc.w $46
+.dc.w $15C
+.dc.w $C
+.dc.w $7
+.dc.w $18
+.dc.w $1
+.dc.w $48
+.dc.w $135
+.dc.w $FF
+.dc.w $15C
+.dc.w $C
+.dc.w $8
+.dc.w $16
+.dc.w $A
+.dc.w $101
+.dc.w $135
+.dc.w $1FE
+.dc.w $15C
+.dc.w $C
+.dc.w $9
+.dc.w $16
+.dc.w $21
+.globl _ldbxlb0
+.data
+_ldbxlb0:
+*line 121
+.dc.l L1
+*line 122
+.dc.l L2
+*line 123
+.dc.l L3
+*line 124
+.dc.l L4
+*line 125
+.dc.l L5
+*line 126
+.dc.l L6
+*line 127
+.dc.l L7
+*line 128
+.dc.l L8
+*line 129
+.dc.l L9
+*line 130
+.dc.l L10
+*line 132
+.dc.l L11
+.globl _ld_flds
+.data
+_ld_flds:
+*line 139
+.dc.l _stdctp0
+*line 140
+.dc.l _ld_prmv
+*line 141
+.dc.l _nokey
+*line 142
+.dc.l _cxkstd
+*line 143
+.dc.l _cykstd
+*line 144
+.dc.l _ldcxupd
+*line 145
+.dc.l _ldcyupd
+*line 146
+.dc.l _nokey
+*line 147
+.dc.l _nokey
+*line 148
+.dc.l _ldxkey
+*line 149
+.dc.l _select
+*line 150
+.dc.l _ldmkey
+*line 151
+.dc.l _ldkey
+*line 152
+.dc.l _nokey
+*line 153
+.dc.l _ld_fet1
+*line 154
+.dc.l _ldboxes
+*line 155
+.dc.l _crate1
+*line 156
+.dc.l _crate1
+.dc.w $1
+.dc.w $20
+.dc.w $13C
+.globl _ldxkey
+.text
+_ldxkey:
+~~ldxkey:
+link R14,#-4
+movem.l R6-R7/R13-R13,-(sp)
+~fn=R13
+~slot=R7
+~buf=-4
+*line 178
+*line 179
+tst _astat
+bne L13
+*line 179
+move #-1,R0
+bra L12
+*line 180
+L13:
+*line 181
+jsr _clrerms
+*line 182
+move _cyval,R0
+ext.l R0
+divs #14,R0
+move R0,_stcrow
+*line 183
+move _cxval,R0
+asr #3,R0
+move R0,_stccol
+*line 185
+*line 185
+tst _lselsw
+beq L14
+tst _lrasw
+beq L14
+*line 186
+*line 187
+*line 187
+move _cyval,(sp)
+jsr _ldline
+move R0,R7
+tst R7
+beq L15
+*line 188
+*line 189
+sub #1,R7
+*line 190
+move R7,R8
+add.l R8,R8
+add.l #_ldmap,R8
+move #-1,(R8)
+*line 191
+move R7,(sp)
+move 24+_ldbox,-(sp)
+jsr _dpy_scr
+addq.l #2,sp
+*line 192
+clr R0
+bra L12
+*line 193
+*line 194
+bra L16
+L15:
+*line 195
+move #-1,R0
+bra L12
+L16:
+*line 196
+*line 197
+L14:
+*line 198
+*line 199
+move #2,(sp)
+jsr _lcancel
+tst R0
+beq L17
+*line 199
+clr R0
+bra L12
+*line 200
+L17:
+*line 201
+*line 201
+tst _ldelsw
+bne L18
+*line 202
+*line 203
+*line 203
+move _cyval,(sp)
+jsr _ldline
+move R0,_ldrow
+beq L19
+*line 204
+*line 205
+*line 205
+cmp #11,_stccol
+bne L20
+*line 206
+*line 207
+*line 208
+move _stcrow,(sp)
+jsr _lin2slt
+move R0,R7
+cmp #-1,R7
+bne L21
+*line 208
+move #-1,R0
+bra L12
+*line 209
+L21:
+*line 210
+*line 210
+tst _ltagged
+beq L22
+*line 211
+*line 212
+*line 212
+cmp _tagslot,R7
+beq L23
+*line 213
+*line 214
+move _oldltag,R0
+move _tagslot,R1
+muls #56,R1
+add.l #_filecat,R1
+move.l R1,R9
+move.b R0,3(R9)
+*line 215
+clr _ltagged
+*line 216
+jsr _showcat
+*line 217
+move #-1,R0
+bra L12
+*line 218
+*line 219
+L23:
+*line 220
+jsr _putcat
+*line 221
+clr _ltagged
+*line 222
+jsr _showcat
+*line 223
+bra L24
+L22:
+*line 224
+*line 225
+*line 226
+move R7,R0
+muls #56,R0
+move.l R0,R8
+move.l #_filecat,R9
+move.b 3(R8,R9.l),R0
+ext.w R0
+move R0,_oldltag
+*line 227
+move R7,R0
+muls #56,R0
+add.l #_filecat,R0
+move.l R0,R8
+move.b #32,3(R8)
+*line 228
+move #1,_ltagged
+*line 229
+move R7,_tagslot
+*line 230
+*line 231
+move _oldltag,R0
+move.b R0,-4(R14)
+*line 232
+clr.b -3(R14)
+*line 233
+*line 234
+*line 235
+clr R0
+move 10+_v_regs,R0
+and #384,R0
+beq L25
+*line 235
+clr (sp)
+jsr _vbank
+*line 236
+L25:
+*line 237
+*line 238
+move #14,(sp)
+move.l R14,-(sp)
+sub.l #4,(sp)
+move #11,-(sp)
+move _stcrow,-(sp)
+move 26+_ldbox,-(sp)
+move #14,-(sp)
+jsr _exp_c
+addq.l #2,sp
+move R0,-(sp)
+move #64,-(sp)
+move.l _librob,-(sp)
+jsr _vcputsv
+adda.l #18,sp
+L24:
+*line 239
+*line 240
+*line 241
+clr R0
+bra L12
+*line 242
+*line 243
+L20:
+*line 244
+*line 245
+cmp #13,_stccol
+blt L10000
+cmp #20,_stccol
+ble L26
+L10000:*line 245
+move #-1,R0
+bra L12
+*line 246
+L26:
+*line 247
+*line 247
+move _ldrow,(sp)
+jsr _lin2slt
+move R0,_ldslot
+cmp #-1,R0
+beq L27
+*line 248
+*line 249
+*line 250
+*line 251
+move _ldrow,(sp)
+move #14,-(sp)
+jsr _exp_c
+addq.l #2,sp
+move R0,-(sp)
+move _ldslot,-(sp)
+jsr _dslslot
+addq.l #4,sp
+*line 252
+move #1,_ldelsw
+*line 253
+clr R0
+bra L12
+*line 254
+*line 255
+*line 256
+L27:bra L28
+L19:
+*line 257
+*line 258
+*line 259
+*line 259
+cmp #21,_stcrow
+bne L29
+*line 260
+*line 261
+*line 261
+cmp #10,_stccol
+blt L30
+cmp #17,_stccol
+bgt L30
+*line 262
+*line 263
+*line 264
+*line 265
+move #8,(sp)
+move #32,-(sp)
+move.l #_ldfile,-(sp)
+jsr _memset
+addq.l #6,sp
+*line 266
+move #3,(sp)
+jsr _ldswin
+*line 267
+clr R0
+bra L12
+*line 268
+bra L31
+L30:
+*line 269
+*line 269
+cmp #27,_stccol
+blt L32
+*line 270
+*line 271
+*line 272
+*line 273
+move #37,(sp)
+move #32,-(sp)
+move.l #_ldcmnt,-(sp)
+jsr _memset
+addq.l #6,sp
+*line 274
+move #5,(sp)
+jsr _ldswin
+*line 275
+clr R0
+bra L12
+*line 276
+L32:L31:
+*line 277
+*line 278
+L29:
+*line 279
+move #-1,R0
+bra L12
+L28:
+*line 280
+*line 281
+*line 282
+*line 283
+*line 284
+bra L33
+L18:
+*line 285
+*line 286
+*line 287
+*line 288
+*line 289
+*line 289
+move _cyval,(sp)
+jsr _ldline
+cmp _ldrow,R0
+bne L34
+*line 290
+*line 291
+move _ldslot,R0
+muls #56,R0
+add.l #_filecat,R0
+move.l R0,R8
+clr.b (R8)
+*line 292
+move _ldslot,(sp)
+jsr _ftkind
+move R0,(sp)
+move _ldslot,-(sp)
+jsr _slotnam
+addq.l #2,sp
+move.l R0,R13
+*line 293
+*line 294
+move.l R13,(sp)
+jsr _unlink
+*line 295
+*line 296
+clr _ldelsw
+*line 297
+jsr _putcat
+*line 298
+*line 299
+jsr __clsvol
+*line 300
+jsr _showcat
+*line 301
+jsr _showsiz
+*line 302
+*line 303
+clr R0
+bra L12
+*line 304
+*line 305
+L34:
+*line 306
+clr _ldelsw
+*line 307
+jsr _showcat
+*line 308
+clr R0
+bra L12
+L33:L12:tst.l (sp)+
+movem.l (sp)+,R7-R7/R13-R13
+unlk R14
+rts
+.globl _ld_prmv
+.text
+_ld_prmv:
+~~ld_prmv:
+link R14,#-4
+*line 323
+*line 324
+tst _lderrsw
+beq L36
+*line 324
+jsr _clrerms
+*line 325
+L36:
+*line 326
+*line 326
+tst _ltagged
+beq L37
+*line 327
+*line 328
+move _oldltag,R0
+move _tagslot,R1
+muls #56,R1
+add.l #_filecat,R1
+move.l R1,R9
+move.b R0,3(R9)
+*line 329
+clr _ltagged
+*line 330
+jsr _showcat
+*line 331
+L37:L35:unlk R14
+rts
+.globl _ldcyupd
+.text
+_ldcyupd:
+~~ldcyupd:
+link R14,#-4
+*line 345
+*line 345
+cmp #1,_lmwtype
+bne L39
+*line 346
+*line 347
+jsr _vtcyupd
+*line 348
+bra L40
+L39:
+*line 349
+*line 350
+*line 351
+move _cyrate,R0
+add R0,_cyval
+*line 352
+*line 353
+*line 354
+cmp #348,_cyval
+ble L41
+*line 354
+move #348,_cyval
+bra L42
+L41:
+*line 355
+*line 356
+cmp #1,_cyval
+bge L43
+*line 356
+move #1,_cyval
+L43:L42:L40:L38:unlk R14
+rts
+.globl _ldcxupd
+.text
+_ldcxupd:
+~~ldcxupd:
+link R14,#-4
+*line 371
+*line 371
+cmp #1,_lmwtype
+bne L45
+*line 372
+*line 373
+jsr _vtcxupd
+*line 374
+bra L46
+L45:
+*line 375
+*line 376
+*line 377
+move _cxrate,R0
+add R0,_cxval
+*line 378
+*line 379
+*line 380
+cmp #510,_cxval
+ble L47
+*line 380
+move #510,_cxval
+bra L48
+L47:
+*line 381
+*line 382
+cmp #1,_cxval
+bge L49
+*line 382
+move #1,_cxval
+L49:L48:L46:L44:unlk R14
+rts
+.globl _ldmkey
+.text
+_ldmkey:
+~~ldmkey:
+link R14,#-4
+*line 397
+*line 397
+tst _astat
+beq L51
+*line 398
+*line 399
+clr _ltagged
+*line 400
+*line 401
+*line 401
+cmp #5,_sliders
+beq L10001
+cmp #5,_pkctrl
+bne L52
+L10001:*line 402
+*line 403
+move _oldsl,_sliders
+*line 404
+move.l _oldsw,_swpt
+*line 405
+move _oldpk,_pkctrl
+*line 406
+jsr _lcdlbls
+*line 407
+jsr _setleds
+*line 408
+L52:
+*line 409
+*line 410
+L51:
+*line 411
+jsr _stdmkey
+L50:unlk R14
+rts
+.globl _loadem
+.text
+_loadem:
+~~loadem:
+~key=8
+link R14,#0
+movem.l R3-R7,-(sp)
+~c=R7
+~i=R6
+~rc=R5
+~slot=R4
+*line 428
+clr R5
+*line 430
+*line 431
+clr (sp)
+jsr _getcat
+tst R0
+bne L53
+*line 432
+*line 433
+clr _ldslot
+bra L56
+L57:
+*line 434
+*line 435
+*line 436
+move _ldslot,(sp)
+jsr _ocslot
+tst R0
+beq L58
+move _ldslot,R0
+muls #56,R0
+move.l R0,R8
+move.l #_filecat,R9
+move.b 3(R8,R9.l),R0
+ext.w R0
+move R0,R7
+move R7,R0
+and #127,R0
+move 8(R14),R1
+and #127,R1
+cmp R1,R0
+bne L58
+*line 437
+*line 438
+move _ldslot,(sp)
+jsr _ftkind
+move R0,_ldkind
+*line 439
+*line 440
+*line 441
+*line 442
+*line 443
+cmp #7,_ldkind
+beq L10002
+cmp #2,_ldkind
+beq L10002
+cmp #3,_ldkind
+bne L59
+L10002:*line 443
+btst #7,R7
+beq L10003
+move #1,R0
+bra L10005
+L10003:clr R0
+L10005:move R0,_lorchl
+*line 444
+L59:
+*line 445
+*line 446
+cmp #4,_ldkind
+bne L60
+*line 446
+clr R6
+bra L63
+L64:
+*line 447
+move R6,R8
+add.l R8,R8
+add.l #_ldmap,R8
+move R6,(R8)
+L62:
+*line 446
+add #1,R6
+L63:
+*line 446
+cmp #20,R6
+blt L64
+L61:
+*line 447
+*line 448
+L60:
+*line 449
+*line 450
+jsr _getit
+tst R0
+bne L53
+*line 451
+*line 452
+move #1,R5
+*line 453
+L58:L55:
+*line 433
+add #1,_ldslot
+L56:
+*line 433
+cmp #20,_ldslot
+blt L57
+L54:
+*line 456
+*line 457
+tst R5
+beq L65
+cmp #-1,_ndisp
+bne L65
+*line 457
+jsr _m7menu
+L65:L53:tst.l (sp)+
+movem.l (sp)+,R4-R7
+unlk R14
+rts
+.globl _ldkey
+.text
+_ldkey:
+~~ldkey:
+~k=8
+link R14,#-4
+movem.l R3-R7,-(sp)
+~c=R7
+~col=R6
+~row=R5
+~slot=R4
+~buf=-4
+*line 475
+*line 476
+tst _astat
+bne L67
+*line 476
+move #-1,R0
+bra L66
+*line 477
+L67:
+*line 478
+*line 479
+tst _catin
+beq L66
+*line 480
+*line 481
+move _cyval,R5
+ext.l R5
+divs #14,R5
+*line 482
+move _cxval,R6
+asr #3,R6
+*line 484
+*line 485
+cmp #11,R6
+bne L66
+*line 486
+*line 487
+*line 488
+move R5,(sp)
+jsr _lin2slt
+move R0,R4
+cmp #-1,R4
+beq L66
+*line 489
+*line 490
+*line 490
+tst _ltagged
+bne L68
+*line 491
+*line 492
+move R4,R0
+muls #56,R0
+move.l R0,R8
+move.l #_filecat,R9
+move.b 3(R8,R9.l),R0
+ext.w R0
+move R0,_oldltag
+*line 493
+move #3,(sp)
+jsr _lcancel
+*line 494
+*line 495
+*line 496
+*line 497
+*line 498
+*line 499
+L68:
+*line 500
+*line 501
+cmp #7,8(R14)
+bge L69
+*line 501
+move 8(R14),R7
+add #65,R7
+move R7,R0
+move R4,R1
+muls #56,R1
+add.l #_filecat,R1
+move.l R1,R9
+move.b R0,3(R9)
+bra L70
+L69:
+*line 502
+*line 503
+cmp #7,8(R14)
+beq L66
+*line 504
+*line 505
+cmp #8,8(R14)
+bne L71
+*line 505
+move R4,R0
+muls #56,R0
+move.l R0,R8
+move.l #_filecat,R9
+move.b 3(R8,R9.l),R0
+ext.w R0
+move R0,R7
+and #127,R7
+move R7,R0
+move R4,R1
+muls #56,R1
+add.l #_filecat,R1
+move.l R1,R9
+move.b R0,3(R9)
+bra L72
+L71:
+*line 506
+*line 507
+move R4,R0
+muls #56,R0
+move.l R0,R8
+move.l #_filecat,R9
+move.b 3(R8,R9.l),R0
+ext.w R0
+move R0,R7
+or #128,R7
+move R7,R0
+move R4,R1
+muls #56,R1
+add.l #_filecat,R1
+move.l R1,R9
+move.b R0,3(R9)
+L72:L70:
+*line 509
+move R5,_loadrow
+*line 510
+move R4,_tagslot
+*line 511
+move #1,_ltagged
+*line 513
+move R5,(sp)
+move #13,-(sp)
+jsr _exp_c
+addq.l #2,sp
+move R0,-(sp)
+move R4,-(sp)
+jsr _dslslot
+addq.l #4,sp
+bra L66
+L66:tst.l (sp)+
+movem.l (sp)+,R4-R7
+unlk R14
+rts
+.globl _ldfield
+.text
+_ldfield:
+~~ldfield:
+link R14,#-4
+*line 528
+clr _lmwtype
+*line 529
+clr _ltagged
+*line 530
+clr _submenu
+*line 532
+move.l #_ld_flds,(sp)
+jsr _curset
+L73:unlk R14
+rts
+.data
+L1:.dc.b $52,$65,$63,$72,$64,$54,$79,$70,$65,$20,$4C,$20,$46,$69,$6C,$65,$4E,$61,$6D,$65,$20,$43,$6F,$6D,$6D,$65,$6E,$74,$20,$20
+.dc.b $20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$20,$4D
+.dc.b $65,$6D,$0
+L2:.dc.b $0
+L3:.dc.b $46,$69,$6C,$65,$4E,$61,$6D,$65,$0
+L4:.dc.b $0
+L5:.dc.b $43,$6F,$6D,$6D,$65,$6E,$74,$0
+L6:.dc.b $0
+L7:.dc.b $49,$6E,$64,$65,$78,$0
+L8:.dc.b $0
+L9:.dc.b $0
+L10:.dc.b $0
+L11:.dc.b $0
