Browse Source

add move.x, sort.x, subst.x, key.x

vampirefrog 3 weeks ago
parent
commit
257d9433e9
15 changed files with 3746 additions and 0 deletions
  1. 123
    0
      key.lab
  2. 684
    0
      key.s
  3. BIN
      key.x
  4. 104
    0
      more.lab
  5. 610
    0
      more.s
  6. BIN
      more.x
  7. 130
    0
      move.lab
  8. 762
    0
      move.s
  9. BIN
      move.x
  10. 108
    0
      sort.lab
  11. 680
    0
      sort.s
  12. BIN
      sort.x
  13. 78
    0
      subst.lab
  14. 467
    0
      subst.s
  15. BIN
      subst.x

+ 123
- 0
key.lab View File

@@ -0,0 +1,123 @@
1
+*********************************************
2
+*
3
+*  Label file for key.x
4
+*
5
+*	DIS version 3.16
6
+*
7
+*********************************************
8
+000000	P	Start
9
+000024	P
10
+00004c	P
11
+0000b2	P
12
+0000c0	P
13
+0000c6	P
14
+0000ca	P
15
+0000cc	P
16
+0000d2	P
17
+0000d6	P
18
+0000e6	P
19
+000138	P
20
+000146	P
21
+0001a8	P
22
+0001c8	P
23
+0001e0	P
24
+0001ea	P
25
+000208	P
26
+00023a	P
27
+00023e	P
28
+000258	P
29
+000274	P
30
+00027e	P
31
+000284	P
32
+00028a	P
33
+0002ae	P
34
+0002b2	P
35
+0002b4	P
36
+0002c6	P
37
+0002d8	P
38
+0002f0	P
39
+00030a	P
40
+000310	P
41
+00031e	P
42
+000336	P
43
+00034a	P
44
+000358	P
45
+00036e	P
46
+0003ce	P
47
+0003e2	P
48
+000404	P
49
+00040c	P
50
+00040e	P
51
+000432	P
52
+00045e	P
53
+00046c	P
54
+000482	P
55
+00049a	P
56
+0004aa	P
57
+0004ac	P
58
+0004c6	P
59
+0004ca	P
60
+0004cc	P
61
+0004e6	P
62
+0004f4	P
63
+0004f8	P
64
+000518	P
65
+00051a	P
66
+000520	P
67
+000526	P
68
+000528	P
69
+000530	P
70
+000538	P
71
+000542	P
72
+000544	DW
73
+000546	DS
74
+00055b	DS
75
+00057b	DS
76
+000595	DS
77
+0005af	DS
78
+0005c9	DS
79
+0005fd	DS
80
+00060d	DS
81
+00061d	DS
82
+00062d	DS
83
+00063d	DS
84
+00064d	DS
85
+00065d	DS
86
+00066d	DS
87
+00067d	DS
88
+00068d	DS
89
+00069d	DS
90
+0006ad	DS
91
+0006bd	DS
92
+0006cd	DS
93
+0006dd	DS
94
+0006ed	DS
95
+0006fd	DS
96
+00070d	DS
97
+00071d	DS
98
+00072d	DS
99
+00073d	DS
100
+000755	DS
101
+00076d	DS
102
+000785	DS
103
+00079d	DS
104
+0007b5	DS
105
+0007cd	DS
106
+0007e5	DS
107
+0007fd	DS
108
+000815	DS
109
+00082d	DS
110
+000845	DS
111
+00085d	DS
112
+000871	DS
113
+000885	DS
114
+00089a	DS
115
+0008b1	DS
116
+0008da	DS
117
+0008f5	DS
118
+000910	DU
119
+000963	DS
120
+0009b4	DS
121
+000a06	DU
122
+000a26	DU
123
+0010ee	DU	End

+ 684
- 0
key.s View File

@@ -0,0 +1,684 @@
1
+;=============================================
2
+;  Filename key.x
3
+;
4
+;
5
+;  Base address 000000
6
+;  Exec address 000000
7
+;  Text size    000544 byte(s)
8
+;  Data size    0004c2 byte(s)
9
+;  Bss  size    0006e8 byte(s)
10
+;  116 Labels
11
+;
12
+;  Commandline dis  -b2 -h -m68000 --sp -q1 -B -M -o120 -gkey.lab --overwrite key.x key.s
13
+;          DIS version 3.16
14
+;=============================================
15
+
16
+	.include	inc/doscall.mac
17
+	.include	inc/iocscall.mac
18
+	.include	inc/fefunc.mac
19
+
20
+	.cpu	68000
21
+
22
+	.text
23
+
24
+Start:
25
+	lea.l	(End),sp
26
+	addq.l	#1,a2
27
+	bsr.w	L000538
28
+	bne.w	L0003e2
29
+	lea.l	(L000546),a5
30
+	bsr.w	L000530
31
+	lea.l	(L00055b),a5
32
+	bsr.w	L000530
33
+L000024:
34
+	DOS	_INKEY
35
+	cmpi.b	#$03,d0
36
+	beq.w	L0000cc
37
+	or.b	#$20,d0
38
+	cmp.b	#$75,d0			;'u'
39
+	beq.w	L0000e6
40
+	cmp.b	#$6c,d0			;'l'
41
+	beq.s	L00004c
42
+	move.w	#$0007,-(sp)
43
+	clr.w	-(sp)
44
+	DOS	_CONCTRL
45
+	addq.l	#4,sp
46
+	bra.s	L000024
47
+
48
+L00004c:
49
+	move.w	d0,-(sp)
50
+	clr.w	-(sp)
51
+	DOS	_CONCTRL
52
+	addq.l	#4,sp
53
+	bsr.w	L00051a
54
+	lea.l	(L00057b),a5
55
+	lea.l	(L000963),a6
56
+	bsr.w	L0004ac
57
+	clr.w	-(sp)
58
+	pea.l	(L000963)
59
+	DOS	_OPEN
60
+	addq.l	#6,sp
61
+	tst.l	d0
62
+	bmi.s	L0000c0
63
+	move.w	d0,d2
64
+	move.l	#$000002c8,-(sp)
65
+	pea.l	(L000a26)
66
+	move.w	d2,-(sp)
67
+	DOS	_READ
68
+	lea.l	($000a,sp),sp
69
+	cmp.l	#$000002c8,d0
70
+	bne.s	L0000b2
71
+	move.w	d2,-(sp)
72
+	DOS	_CLOSE
73
+	addq.l	#2,sp
74
+	pea.l	(L000a26)
75
+	move.w	#$0100,-(sp)
76
+	DOS	_FNCKEY
77
+	addq.l	#6,sp
78
+	lea.l	(L0008b1),a5
79
+	bra.s	L0000c6
80
+
81
+L0000b2:
82
+	move.w	d2,-(sp)
83
+	DOS	_CLOSE
84
+	addq.l	#2,sp
85
+	lea.l	(L0008f5),a5
86
+	bra.s	L0000c6
87
+
88
+L0000c0:
89
+	lea.l	(L0008da),a5
90
+L0000c6:
91
+	bsr.w	L000530
92
+L0000ca:
93
+	DOS	_EXIT
94
+
95
+L0000cc:
96
+	bsr.w	L00051a
97
+	DOS	_EXIT
98
+
99
+L0000d2:
100
+	move.w	#$0200,-(sp)
101
+L0000d6:
102
+	move.w	(L000544),-(sp)
103
+	move.w	#$0010,-(sp)
104
+	DOS	_CONCTRL
105
+	addq.l	#4,sp
106
+	DOS	_EXIT2
107
+
108
+L0000e6:
109
+	move.w	d0,-(sp)
110
+	clr.w	-(sp)
111
+	DOS	_CONCTRL
112
+	addq.l	#4,sp
113
+	bsr.w	L00051a
114
+	lea.l	(L00057b),a5
115
+	lea.l	(L000963),a6
116
+	bsr.w	L0004ac
117
+	clr.w	-(sp)
118
+	pea.l	(L000963)
119
+	DOS	_OPEN
120
+	addq.l	#6,sp
121
+	tst.l	d0
122
+	bmi.s	L000138
123
+	move.w	d0,d2
124
+	move.l	#$000002c8,-(sp)
125
+	pea.l	(L000a26)
126
+	move.w	d2,-(sp)
127
+	DOS	_READ
128
+	lea.l	($000a,sp),sp
129
+	move.l	d0,-(sp)
130
+	move.w	d2,-(sp)
131
+	DOS	_CLOSE
132
+	addq.l	#2,sp
133
+	cmpi.l	#$000002c8,(sp)+
134
+	beq.s	L000146
135
+L000138:
136
+	pea.l	(L000a26)
137
+	move.w	#$0000,-(sp)
138
+	DOS	_FNCKEY
139
+	addq.l	#6,sp
140
+L000146:
141
+	lea.l	(L000595),a5
142
+	lea.l	(L0009b4),a6
143
+	bsr.w	L0004ac
144
+	lea.l	(L0005af),a5
145
+	bsr.w	L000530
146
+	bsr.w	L0004cc
147
+	bne.w	L0000ca
148
+	move.w	#$ffff,-(sp)
149
+	move.w	#$0010,-(sp)
150
+	DOS	_CONCTRL
151
+	move.w	d0,(L000544)
152
+	pea.l	(L0000d2)
153
+	move.w	#$fff1,-(sp)
154
+	DOS	_INTVCS
155
+	addq.l	#6,sp
156
+	move.w	#$0000,($0002,sp)
157
+	DOS	_CONCTRL
158
+	addq.l	#4,sp
159
+	lea.l	(L0005c9),a5
160
+	bsr.w	L000530
161
+	lea.l	(L000a26),a6
162
+	lea.l	(L0005fd),a4
163
+	moveq.l	#$13,d6
164
+L0001a8:
165
+	movea.l	a4,a5
166
+	bsr.w	L000530
167
+	movea.l	a6,a5
168
+	bsr.w	L000404
169
+	lea.l	($0010,a4),a4
170
+	lea.l	($0020,a6),a6
171
+	dbra.w	d6,L0001a8
172
+	lea.l	(L00073d),a4
173
+	moveq.l	#$0b,d6
174
+L0001c8:
175
+	movea.l	a4,a5
176
+	bsr.w	L000530
177
+	movea.l	a6,a5
178
+	bsr.w	L000404
179
+	lea.l	($0018,a4),a4
180
+	lea.l	($0006,a6),a6
181
+	dbra.w	d6,L0001c8
182
+L0001e0:
183
+	lea.l	(L00085d),a5
184
+	bsr.w	L000530
185
+L0001ea:
186
+	DOS	_GETC
187
+	cmp.b	#$0d,d0
188
+	beq.w	L00036e
189
+	and.w	#$00df,d0
190
+	cmp.b	#$46,d0			;'F'
191
+	bne.s	L0001ea
192
+	move.w	d0,-(sp)
193
+	DOS	_PUTCHAR
194
+	move.w	(sp)+,d0
195
+	moveq.l	#$01,d2
196
+	clr.l	d1
197
+L000208:
198
+	DOS	_GETC
199
+	cmp.b	#$0d,d0
200
+	beq.w	L00036e
201
+	cmp.b	#$30,d0			;'0'
202
+	bcs.s	L000208
203
+	cmp.b	#$3a,d0			;':'
204
+	bcc.s	L000208
205
+	move.w	d0,-(sp)
206
+	DOS	_PUTCHAR
207
+	move.w	(sp)+,d0
208
+	mulu.w	#$000a,d1
209
+	and.w	#$000f,d0
210
+	add.w	d0,d1
211
+	dbra.w	d2,L000208
212
+	subq.w	#1,d1
213
+	cmp.w	#$0020,d1		;' '
214
+	bcc.s	L0001e0
215
+L00023a:
216
+	move.w	d1,-(sp)
217
+	clr.l	d6
218
+L00023e:
219
+	lea.l	(L000871),a5
220
+	bsr.w	L000530
221
+	lea.l	(L000a06),a6
222
+	adda.l	d6,a6
223
+	clr.b	(a6)
224
+	lea.l	(L000a06),a5
225
+L000258:
226
+	move.b	(a5)+,d0
227
+	beq.s	L00028a
228
+	cmp.b	#$80,d0
229
+	bcs.s	L00027e
230
+	cmp.b	#$a0,d0
231
+	bcs.s	L000274
232
+	cmp.b	#$e0,d0
233
+	bcs.s	L00027e
234
+	cmp.b	#$fe,d0
235
+	beq.s	L00027e
236
+L000274:
237
+	tst.b	(a5)
238
+	beq.s	L000284
239
+	bsr.w	L00040e
240
+	move.b	(a5)+,d0
241
+L00027e:
242
+	bsr.w	L00040e
243
+	bra.s	L000258
244
+
245
+L000284:
246
+	clr.b	-(a5)
247
+	subq.l	#1,a6
248
+	subq.l	#1,d6
249
+L00028a:
250
+	DOS	_GETC
251
+	cmp.b	#$0d,d0
252
+	beq.s	L0002d8
253
+	cmp.b	#$08,d0
254
+	beq.s	L0002c6
255
+	cmp.b	#$1f,d0
256
+	beq.s	L0002b2
257
+	cmp.b	#$1e,d0
258
+	beq.s	L0002ae
259
+	cmp.b	#$1d,d0
260
+	bne.s	L0002b4
261
+	moveq.l	#$08,d0
262
+	bra.s	L0002b4
263
+
264
+L0002ae:
265
+	moveq.l	#$fe,d0
266
+	bra.s	L0002b4
267
+
268
+L0002b2:
269
+	moveq.l	#$0d,d0
270
+L0002b4:
271
+	cmp.l	#$0000001f,d6
272
+	bcc.s	L00028a
273
+	move.b	d0,(a6)+
274
+	addq.l	#1,d6
275
+	bsr.w	L00040e
276
+	bra.s	L00028a
277
+
278
+L0002c6:
279
+	tst.l	d6
280
+	beq.w	L0001e0
281
+	lea.l	(L000a06),a6
282
+	subq.l	#1,d6
283
+	bra.w	L00023e
284
+
285
+L0002d8:
286
+	clr.b	(a6)
287
+	move.w	(sp)+,d1
288
+	lea.l	(L000a26),a4
289
+	move.w	d1,d4
290
+	cmp.w	#$0014,d4
291
+	bcc.s	L0002f0
292
+	asl.w	#5,d4
293
+	moveq.l	#$1f,d0
294
+	bra.s	L00030a
295
+
296
+L0002f0:
297
+	cmp.w	#$0006,d6
298
+	bcc.w	L00023a
299
+	sub.w	#$0014,d4
300
+	lea.l	($0280,a4),a4
301
+	asl.w	#1,d4
302
+	move.w	d4,d0
303
+	asl.w	#1,d4
304
+	add.w	d0,d4
305
+	moveq.l	#$05,d0
306
+L00030a:
307
+	lea.l	(a4,d4.w),a4
308
+	movea.l	a4,a0
309
+L000310:
310
+	clr.b	(a0)+
311
+	dbra.w	d0,L000310
312
+	lea.l	(L000a06),a5
313
+	movea.l	a4,a0
314
+L00031e:
315
+	move.b	(a5)+,(a0)+
316
+	bne.s	L00031e
317
+	lea.l	(L0005fd),a5
318
+	move.w	d1,d4
319
+	cmp.w	#$0014,d4
320
+	bcc.s	L000336
321
+	asl.w	#4,d4
322
+	moveq.l	#$22,d0			;'"'
323
+	bra.s	L00034a
324
+
325
+L000336:
326
+	sub.w	#$0014,d4
327
+	lea.l	(L00073d),a5
328
+	asl.w	#3,d4
329
+	move.w	d4,d0
330
+	asl.w	#1,d4
331
+	add.w	d0,d4
332
+	moveq.l	#$09,d0
333
+L00034a:
334
+	lea.l	(a5,d4.w),a5
335
+	move.l	d0,d4
336
+	bsr.w	L000530
337
+	move.w	#$0020,-(sp)		;' '
338
+L000358:
339
+	DOS	_INPOUT
340
+	dbra.w	d4,L000358
341
+	addq.l	#2,sp
342
+	bsr.w	L000530
343
+	movea.l	a4,a5
344
+	bsr.w	L000404
345
+	bra.w	L0001e0
346
+
347
+L00036e:
348
+	lea.l	(L000885),a5
349
+	bsr.w	L000530
350
+	bsr.w	L0004cc
351
+	bne.w	L0001e0
352
+	bsr.w	L00051a
353
+	lea.l	(L0009b4),a5
354
+	bsr.w	L000530
355
+	lea.l	(L00089a),a5
356
+	bsr.w	L000530
357
+	bsr.w	L0004cc
358
+	bne.s	L0003ce
359
+	move.w	#$0020,-(sp)		;' '
360
+	pea.l	(L0009b4)
361
+	DOS	_CREATE
362
+	addq.l	#6,sp
363
+	tst.l	d0
364
+	tst.l	d0
365
+	bmi.s	L0003ce
366
+	move.w	d0,d2
367
+	move.l	#$000002c8,-(sp)
368
+	pea.l	(L000a26)
369
+	move.w	d2,-(sp)
370
+	DOS	_WRITE
371
+	lea.l	($000a,sp),sp
372
+	move.w	d2,-(sp)
373
+	DOS	_CLOSE
374
+	addq.l	#2,sp
375
+L0003ce:
376
+	pea.l	(L000a26)
377
+	move.w	#$0100,-(sp)
378
+	DOS	_FNCKEY
379
+	addq.l	#6,sp
380
+	clr.w	-(sp)
381
+	bra.w	L0000d6
382
+
383
+L0003e2:
384
+	subq.l	#1,a2
385
+	bsr.w	L0004f4
386
+	subq.w	#1,d1
387
+	cmp.w	#$0020,d1		;' '
388
+	bcc.w	L0000ca
389
+	addq.w	#1,d1
390
+	or.w	#$0100,d1
391
+	move.l	a2,-(sp)
392
+	move.w	d1,-(sp)
393
+	DOS	_FNCKEY
394
+	addq.l	#6,sp
395
+	bra.w	L0000ca
396
+
397
+L000404:
398
+	move.b	(a5)+,d0
399
+	beq.s	L00040c
400
+	bsr.s	L00040e
401
+	bra.s	L000404
402
+
403
+L00040c:
404
+	rts
405
+
406
+L00040e:
407
+	and.w	#$00ff,d0
408
+	cmp.b	#$fe,d0
409
+	beq.s	L000482
410
+	bcc.w	L0004aa
411
+	cmp.b	#$20,d0			;' '
412
+	bcs.s	L000432
413
+	move.w	d0,-(sp)
414
+	move.w	#$0009,-(sp)
415
+	move.w	#$0002,-(sp)
416
+	DOS	_CONCTRL
417
+	addq.l	#4,sp
418
+	bra.s	L00049a
419
+
420
+L000432:
421
+	move.w	d0,-(sp)
422
+	move.w	#$000b,-(sp)
423
+	move.w	#$0002,-(sp)
424
+	DOS	_CONCTRL
425
+	addq.l	#4,sp
426
+	move.w	(sp)+,d0
427
+	cmp.b	#$1b,d0
428
+	beq.s	L00046c
429
+	cmp.b	#$0d,d0
430
+	beq.s	L00045e
431
+	add.w	#$0040,d0
432
+	move.w	d0,-(sp)
433
+	move.w	#$005e,-(sp)		;'^'
434
+	DOS	_INPOUT
435
+	addq.l	#2,sp
436
+	bra.s	L00049a
437
+
438
+L00045e:
439
+	move.w	#$0063,-(sp)		;'c'
440
+	DOS	_INPOUT
441
+	addq.l	#2,sp
442
+	move.w	#$0072,-(sp)		;'r'
443
+	bra.s	L00049a
444
+
445
+L00046c:
446
+	move.w	#$0065,-(sp)		;'e'
447
+	DOS	_INPOUT
448
+	addq.l	#2,sp
449
+	move.w	#$0073,-(sp)		;'s'
450
+	DOS	_INPOUT
451
+	addq.l	#2,sp
452
+	move.w	#$0063,-(sp)		;'c'
453
+	bra.s	L00049a
454
+
455
+L000482:
456
+	move.w	#$000a,-(sp)
457
+	move.w	#$0002,-(sp)
458
+	DOS	_CONCTRL
459
+	addq.l	#4,sp
460
+	move.w	#$0066,-(sp)		;'f'
461
+	DOS	_INPOUT
462
+	addq.l	#2,sp
463
+	move.w	#$0065,-(sp)		;'e'
464
+L00049a:
465
+	DOS	_INPOUT
466
+	addq.l	#2,sp
467
+	move.w	#$0003,-(sp)
468
+	move.w	#$0002,-(sp)
469
+	DOS	_CONCTRL
470
+	addq.l	#4,sp
471
+L0004aa:
472
+	rts
473
+
474
+L0004ac:
475
+	bsr.w	L000530
476
+	lea.l	(L000910),a5
477
+	clr.b	($0001,a5)
478
+	bsr.s	L000520
479
+	tst.b	($0001,a5)
480
+	beq.s	L0004ca
481
+	lea.l	($0002,a5),a5
482
+L0004c6:
483
+	move.b	(a5)+,(a6)+
484
+	bne.s	L0004c6
485
+L0004ca:
486
+	rts
487
+
488
+L0004cc:
489
+	move.w	#$0008,-(sp)
490
+	DOS	_KFLUSH
491
+	addq.l	#2,sp
492
+	or.b	#$20,d0
493
+	cmp.b	#$79,d0			;'y'
494
+	beq.s	L0004e6
495
+	cmp.b	#$6e,d0			;'n'
496
+	bne.s	L0004cc
497
+	or.b	d0,d0
498
+L0004e6:
499
+	move.w	sr,-(sp)
500
+	move.w	d0,-(sp)
501
+	DOS	_PUTCHAR
502
+	addq.l	#2,sp
503
+	bsr.s	L00051a
504
+	move.w	(sp)+,ccr
505
+	rts
506
+
507
+L0004f4:
508
+	bsr.s	L000538
509
+	clr.l	d1
510
+L0004f8:
511
+	cmp.b	#$30,d0			;'0'
512
+	bcs.s	L000518
513
+	cmp.b	#$3a,d0			;':'
514
+	bcc.s	L000518
515
+	and.l	#$0000000f,d0
516
+	add.l	d1,d1
517
+	move.l	d1,d2
518
+	asl.l	#2,d1
519
+	add.l	d2,d1
520
+	add.l	d0,d1
521
+	move.b	(a2)+,d0
522
+	bra.s	L0004f8
523
+
524
+L000518:
525
+	rts
526
+
527
+L00051a:
528
+	moveq.l	#$0d,d0
529
+	bsr.s	L000528
530
+	bra.s	L000526
531
+
532
+L000520:
533
+	move.l	a5,-(sp)
534
+	DOS	_GETS
535
+	addq.l	#4,sp
536
+L000526:
537
+	moveq.l	#$0a,d0
538
+L000528:
539
+	move.w	d0,-(sp)
540
+	DOS	_PUTCHAR
541
+	addq.l	#2,sp
542
+	rts
543
+
544
+L000530:
545
+	move.l	a5,-(sp)
546
+	DOS	_PRINT
547
+	addq.l	#4,sp
548
+	rts
549
+
550
+L000538:
551
+	move.b	(a2)+,d0
552
+	beq.s	L000542
553
+	cmp.b	#$20,d0			;' '
554
+	beq.s	L000538
555
+L000542:
556
+	rts
557
+
558
+
559
+	.data
560
+
561
+L000544:
562
+	.dc.w	$0000
563
+L000546:
564
+	.dc.b	$0d,$0a
565
+	.dc.b	'KEY Version 1.00',$0d,$0a,$00
566
+L00055b:
567
+	.dc.b	$0d,$0a
568
+	.dc.b	'更新ですか、登録ですか?[U/L]',$00
569
+L00057b:
570
+	.dc.b	'入力ファイル名 [KEY.SYS]:',$00
571
+L000595:
572
+	.dc.b	'出力ファイル名 [KEY.SYS]:',$00
573
+L0005af:
574
+	.dc.b	'処理を開始しますか?[Y/N]',$00
575
+L0005c9:
576
+	.dc.b	$1b,'*',$09,'*** 現在のファンクションキー定義状態 ***',$00
577
+L0005fd:
578
+	.dc.b	$1b,'[04;08HF01:',$00,$00,$00,$00
579
+L00060d:
580
+	.dc.b	$1b,'[05;08HF02:',$00,$00,$00,$00
581
+L00061d:
582
+	.dc.b	$1b,'[06;08HF03:',$00,$00,$00,$00
583
+L00062d:
584
+	.dc.b	$1b,'[07;08HF04:',$00,$00,$00,$00
585
+L00063d:
586
+	.dc.b	$1b,'[08;08HF05:',$00,$00,$00,$00
587
+L00064d:
588
+	.dc.b	$1b,'[09;08HF06:',$00,$00,$00,$00
589
+L00065d:
590
+	.dc.b	$1b,'[10;08HF07:',$00,$00,$00,$00
591
+L00066d:
592
+	.dc.b	$1b,'[11;08HF08:',$00,$00,$00,$00
593
+L00067d:
594
+	.dc.b	$1b,'[12;08HF09:',$00,$00,$00,$00
595
+L00068d:
596
+	.dc.b	$1b,'[13;08HF10:',$00,$00,$00,$00
597
+L00069d:
598
+	.dc.b	$1b,'[04;48HF11:',$00,$00,$00,$00
599
+L0006ad:
600
+	.dc.b	$1b,'[05;48HF12:',$00,$00,$00,$00
601
+L0006bd:
602
+	.dc.b	$1b,'[06;48HF13:',$00,$00,$00,$00
603
+L0006cd:
604
+	.dc.b	$1b,'[07;48HF14:',$00,$00,$00,$00
605
+L0006dd:
606
+	.dc.b	$1b,'[08;48HF15:',$00,$00,$00,$00
607
+L0006ed:
608
+	.dc.b	$1b,'[09;48HF16:',$00,$00,$00,$00
609
+L0006fd:
610
+	.dc.b	$1b,'[10;48HF17:',$00,$00,$00,$00
611
+L00070d:
612
+	.dc.b	$1b,'[11;48HF18:',$00,$00,$00,$00
613
+L00071d:
614
+	.dc.b	$1b,'[12;48HF19:',$00,$00,$00,$00
615
+L00072d:
616
+	.dc.b	$1b,'[13;48HF20:',$00,$00,$00,$00
617
+L00073d:
618
+	.dc.b	$1b,'[15;01H(ROLL UP  )F21:',$00
619
+L000755:
620
+	.dc.b	$1b,'[16;01H(ROLL DOWN)F22:',$00
621
+L00076d:
622
+	.dc.b	$1b,'[17;01H(   INS   )F23:',$00
623
+L000785:
624
+	.dc.b	$1b,'[18;01H(   DEL   )F24:',$00
625
+L00079d:
626
+	.dc.b	$1b,'[15;27H(  ↑  )F25:',$00
627
+L0007b5:
628
+	.dc.b	$1b,'[16;27H(  ←  )F26:',$00
629
+L0007cd:
630
+	.dc.b	$1b,'[17;27H(  →  )F27:',$00
631
+L0007e5:
632
+	.dc.b	$1b,'[18;27H(  ↓  )F28:',$00
633
+L0007fd:
634
+	.dc.b	$1b,'[15;53H(  CLR    )F29:',$00
635
+L000815:
636
+	.dc.b	$1b,'[16;53H(  HELP   )F30:',$00
637
+L00082d:
638
+	.dc.b	$1b,'[17;53H(  HOME   )F31:',$00
639
+L000845:
640
+	.dc.b	$1b,'[18;53H(  UNDO   )F32:',$00
641
+L00085d:
642
+	.dc.b	$1b,'[20;1H',$1b,'[Jキー番号:',$00
643
+L000871:
644
+	.dc.b	$1b,'[22;1H',$1b,'[Jキー機能:',$00
645
+L000885:
646
+	.dc.b	$0d,'終了しますか?[Y/N]',$00
647
+L00089a:
648
+	.dc.b	' を更新しますか?[Y/N]',$00
649
+L0008b1:
650
+	.dc.b	'ファイルの内容をシステムに登録しました',$0d,$0a,$00
651
+L0008da:
652
+	.dc.b	'ファイルが見つかりません',$0d,$0a,$00
653
+L0008f5:
654
+	.dc.b	'ファイルが読み込めません',$0d,$0a,$00
655
+L000910:
656
+	.dc.b	$50,$00,$00,$00,$00,$00,$00,$00
657
+	.dc.b	$00,$00,$00,$00,$00,$00,$00,$00
658
+	.dc.b	$00,$00,$00,$00,$00,$00,$00,$00
659
+	.dc.b	$00,$00,$00,$00,$00,$00,$00,$00
660
+	.dc.b	$00,$00,$00,$00,$00,$00,$00,$00
661
+	.dc.b	$00,$00,$00,$00,$00,$00,$00,$00
662
+	.dc.b	$00,$00,$00,$00,$00,$00,$00,$00
663
+	.dc.b	$00,$00,$00,$00,$00,$00,$00,$00
664
+	.dc.b	$00,$00,$00,$00,$00,$00,$00,$00
665
+	.dc.b	$00,$00,$00,$00,$00,$00,$00,$00
666
+	.dc.b	$00,$00,$00
667
+L000963:
668
+	.dc.b	'KEY.SYS',$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
669
+	.dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
670
+	.dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
671
+L0009b4:
672
+	.dc.b	'KEY.SYS',$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
673
+	.dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
674
+	.dc.b	$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00
675
+
676
+	.bss
677
+
678
+L000a06:
679
+	.ds.b	32
680
+L000a26:
681
+	.ds.b	1736
682
+End:
683
+
684
+	.end	Start

BIN
key.x View File


+ 104
- 0
more.lab View File

@@ -0,0 +1,104 @@
1
+*********************************************
2
+*
3
+*  Label file for more.x
4
+*
5
+*	DIS version 3.16
6
+*
7
+*********************************************
8
+000000	P
9
+00006e	P
10
+000072	P
11
+000080	P
12
+000086	P
13
+000088	P
14
+0000ac	P
15
+0000ca	P
16
+0000e6	P
17
+000112	P
18
+000114	P
19
+00011e	P
20
+000120	P
21
+00013c	P
22
+000150	P
23
+000162	P
24
+00016e	P
25
+000172	P
26
+00018e	P
27
+000196	P
28
+00019e	P
29
+0001a4	P
30
+0001bc	P
31
+0001da	P
32
+0001fa	P
33
+000206	P
34
+000214	P
35
+000232	P
36
+000238	P
37
+000250	P
38
+000262	P
39
+000266	P
40
+000268	P
41
+000270	P
42
+00027e	P
43
+000284	P
44
+000290	P
45
+0002b0	P
46
+0002b4	P
47
+0002c4	P
48
+0002c6	P
49
+0002de	P
50
+0002e2	P
51
+0002ec	P
52
+0002f0	P
53
+0002fe	P
54
+000318	P
55
+000330	P
56
+000336	P
57
+000348	P
58
+00034e	P
59
+000370	P
60
+00039c	P
61
+0003a8	P
62
+0003aa	P
63
+0003bc	P
64
+0003d8	P
65
+0003e0	P
66
+0003ec	P
67
+0003fe	P
68
+000408	P
69
+000424	P
70
+000428	P
71
+000434	P
72
+000442	P
73
+000446	P
74
+00044e	P
75
+000452	P
76
+000458	P
77
+000468	P
78
+00046a	P
79
+000472	P
80
+00049a	P
81
+0004a0	P
82
+0004a2	P
83
+0004b0	P
84
+0004d6	P
85
+0004d8	P
86
+0004f4	P
87
+000512	DS
88
+000519	DS
89
+000569	DS
90
+00058e	DS
91
+0005a8	DS
92
+0005c2	DU
93
+0005c5	DU
94
+0005c8	DB
95
+0005c9	DB
96
+0005ca	DW
97
+0005cc	DW
98
+0005d2	DU
99
+0006ea	DB
100
+000802	DB
101
+00091a	DU
102
+000d1a	DU
103
+00151a	DU
104
+00151c	DU

+ 610
- 0
more.s View File

@@ -0,0 +1,610 @@
1
+;=============================================
2
+;  Filename more.x
3
+;
4
+;
5
+;  Base address 000000
6
+;  Exec address 000000
7
+;  Text size    000512 byte(s)
8
+;  Data size    0000b6 byte(s)
9
+;  Bss  size    000f54 byte(s)
10
+;  97 Labels
11
+;
12
+;  Commandline dis  -b2 -h -m68000 --sp -q1 -B -M -o120 -gmore.lab --overwrite more.x more.s
13
+;          DIS version 3.16
14
+;=============================================
15
+
16
+	.include	inc/doscall.mac
17
+	.include	inc/iocscall.mac
18
+	.include	inc/fefunc.mac
19
+
20
+	.cpu	68000
21
+
22
+	.text
23
+
24
+L000000:
25
+	lea.l	(L00151a),sp
26
+	bsr.w	L0004f4
27
+	clr.b	(L000802)
28
+	movea.l	(L000000-$0000e0),a0
29
+	addq.l	#1,a0
30
+	lea.l	(L0005d2),a1
31
+	lea.l	(L0006ea),a2
32
+	bsr.w	L000232
33
+	tst.b	(L0006ea)
34
+	bne.w	L000172
35
+	tst.l	d0
36
+	beq.s	L00006e
37
+	cmp.l	#$00000001,d0
38
+	bne.w	L000172
39
+	lea.l	(L0005d2),a1
40
+	lea.l	(L000802),a0
41
+	bsr.w	L0002de
42
+	bsr.w	L0002fe
43
+	clr.w	-(sp)
44
+	pea.l	(L000802)
45
+	DOS	_OPEN
46
+	addq.l	#6,sp
47
+	tst.l	d0
48
+	bmi.w	L00018e
49
+	move.w	d0,(L0005ca)
50
+	bra.s	L000072
51
+
52
+L00006e:
53
+	bsr.w	L0004d8
54
+L000072:
55
+	lea.l	(L000d1a),a2
56
+	clr.l	d4
57
+	clr.l	d5
58
+	clr.b	d6
59
+	clr.b	d7
60
+L000080:
61
+	bsr.w	L0001bc
62
+	clr.b	d3
63
+L000086:
64
+	clr.b	d2
65
+L000088:
66
+	bsr.w	L000472
67
+	tst.l	d0
68
+	bmi.w	L000196
69
+	beq.w	L00013c
70
+	tst.b	d6
71
+	bne.s	L0000ca
72
+	cmp.b	#$80,d1
73
+	bcs.s	L0000e6
74
+	cmp.b	#$a0,d1
75
+	bcs.s	L0000ac
76
+	cmp.b	#$e0,d1
77
+	bcs.s	L0000e6
78
+L0000ac:
79
+	move.b	d1,d7
80
+	move.b	#$01,d6
81
+	cmp.b	#$80,d1
82
+	beq.s	L000088
83
+	cmp.b	#$f0,d1
84
+	bcc.s	L000088
85
+	cmp.b	(L0005c8),d2
86
+	bcc.s	L000120
87
+	addq.b	#1,d2
88
+	bra.s	L000088
89
+
90
+L0000ca:
91
+	clr.b	d6
92
+	move.b	d7,d0
93
+	bsr.w	L0004a2
94
+	tst.l	d0
95
+	bmi.w	L00019e
96
+	move.b	d1,d0
97
+	bsr.w	L0004a2
98
+	tst.l	d0
99
+	bmi.w	L00019e
100
+	bra.s	L000112
101
+
102
+L0000e6:
103
+	cmp.b	#$1a,d1
104
+	beq.s	L00013c
105
+	move.b	d1,d0
106
+	bsr.w	L0004a2
107
+	tst.l	d0
108
+	bmi.w	L00019e
109
+	cmp.b	#$0a,d1
110
+	beq.s	L00011e
111
+	cmp.b	#$0d,d1
112
+	beq.s	L000088
113
+	cmp.b	#$09,d1
114
+	bne.s	L000112
115
+	addq.b	#8,d2
116
+	and.b	#$f8,d2
117
+	bra.s	L000114
118
+
119
+L000112:
120
+	addq.b	#1,d2
121
+L000114:
122
+	cmp.b	(L0005c8),d2
123
+	bls.w	L000088
124
+L00011e:
125
+	clr.b	d2
126
+L000120:
127
+	bsr.w	L0004b0
128
+	tst.l	d0
129
+	bmi.s	L00019e
130
+	addq.b	#1,d3
131
+	cmp.b	(L0005c9),d3
132
+	bne.w	L000086
133
+	bsr.w	L000206
134
+	bra.w	L000080
135
+
136
+L00013c:
137
+	bsr.w	L0004b0
138
+	tst.l	d0
139
+	bmi.s	L00019e
140
+	cmp.b	(L0005c9),d3
141
+	bne.s	L000150
142
+	bsr.w	L000206
143
+L000150:
144
+	tst.b	(L000802)
145
+	beq.s	L000162
146
+	move.w	(L0005ca),-(sp)
147
+	DOS	_CLOSE
148
+	addq.l	#2,sp
149
+L000162:
150
+	pea.l	(L0005c2)
151
+	DOS	_PRINT
152
+	addq.l	#4,sp
153
+	clr.l	d0
154
+L00016e:
155
+	move.w	d0,-(sp)
156
+	DOS	_EXIT2
157
+
158
+L000172:
159
+	lea.l	(L000519),a0
160
+	bsr.w	L0002ec
161
+	move.l	d0,-(sp)
162
+	move.l	a0,-(sp)
163
+	move.w	#$0002,-(sp)
164
+	DOS	_WRITE
165
+	lea.l	($000a,sp),sp
166
+	moveq.l	#$01,d0
167
+	bra.s	L00016e
168
+
169
+L00018e:
170
+	lea.l	(L000569),a0
171
+	bra.s	L0001a4
172
+
173
+L000196:
174
+	lea.l	(L00058e),a0
175
+	bra.s	L0001a4
176
+
177
+L00019e:
178
+	lea.l	(L0005a8),a0
179
+L0001a4:
180
+	bsr.w	L0002ec
181
+	move.l	d0,-(sp)
182
+	move.l	a0,-(sp)
183
+	move.w	#$0002,-(sp)
184
+	DOS	_WRITE
185
+	lea.l	($000a,sp),sp
186
+	move.w	#$0002,d0
187
+	bra.s	L00016e
188
+
189
+L0001bc:
190
+	movem.l	d0-d1,-(sp)
191
+	move.w	#$ffff,-(sp)
192
+	move.w	#$000e,-(sp)
193
+	DOS	_CONCTRL
194
+	addq.l	#4,sp
195
+	move.b	#$1e,d1
196
+	cmp.b	#$03,d0
197
+	bne.s	L0001da
198
+	move.b	#$1f,d1
199
+L0001da:
200
+	move.b	d1,(L0005c9)
201
+	move.w	#$ffff,-(sp)
202
+	move.w	#$0010,-(sp)
203
+	DOS	_CONCTRL
204
+	addq.l	#4,sp
205
+	move.b	#$3f,d1			;'?'
206
+	cmp.b	#$01,d0
207
+	bhi.s	L0001fa
208
+	move.b	#$5f,d1			;'_'
209
+L0001fa:
210
+	move.b	d1,(L0005c8)
211
+	movem.l	(sp)+,d0-d1
212
+	rts
213
+
214
+L000206:
215
+	tst.b	d2
216
+	beq.s	L000214
217
+	pea.l	(L0005c5)
218
+	DOS	_PRINT
219
+	addq.l	#4,sp
220
+L000214:
221
+	pea.l	(L000512)
222
+	DOS	_PRINT
223
+	addq.l	#4,sp
224
+	move.w	#$0008,-(sp)
225
+	DOS	_KFLUSH
226
+	addq.l	#2,sp
227
+	pea.l	(L0005c2)
228
+	DOS	_PRINT
229
+	addq.l	#4,sp
230
+	rts
231
+
232
+L000232:
233
+	movem.l	d1/a0-a2,-(sp)
234
+	clr.l	d1
235
+L000238:
236
+	bsr.w	L0002c4
237
+	adda.l	d0,a0
238
+	tst.b	(a0)
239
+	beq.s	L0002b4
240
+	move.b	(a0)+,d0
241
+	cmp.b	#$2d,d0			;'-'
242
+	beq.s	L000250
243
+	cmp.b	#$2f,d0			;'/'
244
+	bne.s	L000266
245
+L000250:
246
+	move.b	(a0)+,d0
247
+	beq.s	L0002b4
248
+	cmp.b	#$09,d0
249
+	beq.s	L000262
250
+	cmp.b	#$20,d0			;' '
251
+	beq.s	L000262
252
+	move.b	d0,(a2)+
253
+L000262:
254
+	clr.b	(a2)+
255
+	bra.s	L000238
256
+
257
+L000266:
258
+	addq.l	#1,d1
259
+L000268:
260
+	move.b	d0,(a1)+
261
+	cmp.b	#$22,d0			;'"'
262
+	bne.s	L00027e
263
+L000270:
264
+	move.b	(a0)+,d0
265
+	beq.s	L0002b4
266
+	move.b	d0,(a1)+
267
+	cmp.b	#$22,d0			;'"'
268
+	bne.s	L000270
269
+	bra.s	L000290
270
+
271
+L00027e:
272
+	cmp.b	#$27,d0			;'''
273
+	bne.s	L000290
274
+L000284:
275
+	move.b	(a0)+,d0
276
+	beq.s	L0002b4
277
+	move.b	d0,(a1)+
278
+	cmp.b	#$27,d0			;'''
279
+	bne.s	L000284
280
+L000290:
281
+	move.b	(a0),d0
282
+	beq.s	L0002b4
283
+	cmp.b	#$2f,d0			;'/'
284
+	beq.s	L0002b0
285
+	cmp.b	#$2d,d0			;'-'
286
+	beq.s	L0002b0
287
+	addq.l	#1,a0
288
+	cmp.b	#$09,d0
289
+	beq.s	L0002b0
290
+	cmp.b	#$20,d0			;' '
291
+	beq.s	L0002b0
292
+	bra.s	L000268
293
+
294
+L0002b0:
295
+	clr.b	(a1)+
296
+	bra.s	L000238
297
+
298
+L0002b4:
299
+	clr.b	(a1)+
300
+	clr.b	(a1)
301
+	clr.b	(a2)+
302
+	clr.b	(a2)
303
+	move.l	d1,d0
304
+	movem.l	(sp)+,d1/a0-a2
305
+	rts
306
+
307
+L0002c4:
308
+	move.l	a0,-(sp)
309
+L0002c6:
310
+	move.b	(a0)+,d0
311
+	cmpi.b	#$20,d0			;' '
312
+	beq.s	L0002c6
313
+	cmpi.b	#$09,d0
314
+	beq.s	L0002c6
315
+	move.l	a0,d0
316
+	movea.l	(sp)+,a0
317
+	sub.l	a0,d0
318
+	subq.l	#1,d0
319
+	rts
320
+
321
+L0002de:
322
+	movem.l	a0-a1,-(sp)
323
+L0002e2:
324
+	move.b	(a1)+,(a0)+
325
+	bne.s	L0002e2
326
+	movem.l	(sp)+,a0-a1
327
+	rts
328
+
329
+L0002ec:
330
+	move.l	a0,-(sp)
331
+	moveq.l	#$ff,d0
332
+L0002f0:
333
+	addi.l	#$00000001,d0
334
+	tst.b	(a0)+
335
+	bne.s	L0002f0
336
+	movea.l	(sp)+,a0
337
+	rts
338
+
339
+L0002fe:
340
+	link.w	a6,#-$003c
341
+	movem.l	d0-d6/a1-a2,-(sp)
342
+	move.w	#$ffff,d2
343
+	movea.l	a0,a1
344
+	bsr.s	L0002ec
345
+	move.w	d0,d1
346
+	tst.w	d1
347
+	beq.w	L000452
348
+	clr.b	d3
349
+L000318:
350
+	move.b	(a1)+,d4
351
+	beq.s	L00034e
352
+	tst.b	d3
353
+	beq.s	L000336
354
+	cmp.b	#$01,d3
355
+	beq.s	L000330
356
+	cmp.b	#$2e,d4			;'.'
357
+	beq.s	L000336
358
+	clr.b	d3
359
+	bra.s	L000336
360
+
361
+L000330:
362
+	move.b	#$02,d3
363
+	bra.s	L000318
364
+
365
+L000336:
366
+	cmp.b	#$80,d4
367
+	bcs.s	L000318
368
+	cmp.b	#$a0,d4
369
+	bcs.s	L000348
370
+	cmp.b	#$e0,d4
371
+	bcs.s	L000318
372
+L000348:
373
+	move.b	#$01,d3
374
+	bra.s	L000318
375
+
376
+L00034e:
377
+	subq.l	#1,a1
378
+	tst.b	d3
379
+	bne.s	L000370
380
+	cmpi.b	#$5c,(-$0001,a1)	;'\'
381
+	bne.s	L000370
382
+	cmp.w	#$0001,d1
383
+	beq.w	L000452
384
+	cmpi.b	#$3a,(-$0002,a1)	;':'
385
+	beq.w	L000452
386
+	clr.b	-(a1)
387
+L000370:
388
+	cmpi.b	#$3a,(-$0001,a1)	;':'
389
+	beq.w	L000452
390
+	cmpi.b	#$2e,(-$0001,a1)	;'.'
391
+	bne.s	L0003a8
392
+	tst.b	d3
393
+	bne.s	L0003a8
394
+	cmp.w	#$0001,d1
395
+	beq.s	L00039c
396
+	cmpi.b	#$3a,(-$0002,a1)	;':'
397
+	beq.s	L00039c
398
+	cmpi.b	#$5c,(-$0002,a1)	;'\'
399
+	bne.s	L0003a8
400
+L00039c:
401
+	move.b	#$2a,(-$0001,a1)	;'*'
402
+	move.b	#$2e,(a1)+		;'.'
403
+	clr.b	(a1)
404
+L0003a8:
405
+	movea.l	a0,a2
406
+L0003aa:
407
+	move.b	(a2)+,d0
408
+	beq.s	L0003bc
409
+	cmp.b	#$2a,d0			;'*'
410
+	beq.s	L0003d8
411
+	cmp.b	#$3f,d0			;'?'
412
+	beq.s	L0003d8
413
+	bra.s	L0003aa
414
+
415
+L0003bc:
416
+	move.w	#$0010,-(sp)
417
+	move.l	a0,-(sp)
418
+	pea.l	(-$003c,a6)
419
+	DOS	_FILES
420
+	lea.l	($000a,sp),sp
421
+	tst.l	d0
422
+	bmi.s	L0003d8
423
+	btst.b	#$04,(-$0027,a6)
424
+	bne.s	L00044e
425
+L0003d8:
426
+	clr.b	d3
427
+	movea.l	a0,a2
428
+	clr.b	d5
429
+	clr.b	d6
430
+L0003e0:
431
+	move.b	(a2)+,d0
432
+	beq.s	L000446
433
+	tst.b	d3
434
+	beq.s	L0003ec
435
+	clr.b	d3
436
+	bra.s	L0003e0
437
+
438
+L0003ec:
439
+	cmp.b	#$80,d0
440
+	bcs.s	L000408
441
+	cmp.b	#$a0,d0
442
+	bcs.s	L0003fe
443
+	cmp.b	#$e0,d0
444
+	bcs.s	L000408
445
+L0003fe:
446
+	move.b	#$01,d3
447
+	move.b	#$20,d5			;' '
448
+	bra.s	L0003e0
449
+
450
+L000408:
451
+	cmp.b	#$2e,d0			;'.'
452
+	bne.s	L000428
453
+	tst.b	d5
454
+	beq.s	L000424
455
+	cmp.b	#$3a,d5			;':'
456
+	beq.s	L000424
457
+	cmp.b	#$5c,d5			;'\'
458
+	beq.s	L000424
459
+	cmp.b	#$2e,d5			;'.'
460
+	bne.s	L000428
461
+L000424:
462
+	tst.b	(a2)
463
+	beq.s	L00044e
464
+L000428:
465
+	cmpi.b	#$5c,(a2)		;'\'
466
+	bne.s	L000434
467
+	tst.b	($0001,a2)
468
+	beq.s	L000452
469
+L000434:
470
+	move.b	d0,d5
471
+	cmp.b	#$2e,d0			;'.'
472
+	beq.s	L000442
473
+	cmp.b	#$5c,d0			;'\'
474
+	bne.s	L0003e0
475
+L000442:
476
+	move.b	d0,d6
477
+	bra.s	L0003e0
478
+
479
+L000446:
480
+	cmp.b	#$2e,d6			;'.'
481
+	beq.s	L00046a
482
+	bra.s	L000458
483
+
484
+L00044e:
485
+	move.b	#$5c,(a1)+		;'\'
486
+L000452:
487
+	move.b	#$2a,(a1)+		;'*'
488
+	clr.w	d2
489
+L000458:
490
+	move.b	#$2e,(a1)+		;'.'
491
+	move.b	#$2a,(a1)+		;'*'
492
+	tst.w	d2
493
+	beq.s	L000468
494
+	clr.b	(-$0001,a1)
495
+L000468:
496
+	clr.b	(a1)
497
+L00046a:
498
+	movem.l	(sp)+,d0-d6/a1-a2
499
+	unlk	a6
500
+	rts
501
+
502
+L000472:
503
+	tst.l	d4
504
+	bne.s	L00049a
505
+	move.l	#$00000400,-(sp)
506
+	pea.l	(L00091a)
507
+	move.w	(L0005ca),-(sp)
508
+	DOS	_READ
509
+	lea.l	($000a,sp),sp
510
+	lea.l	(L00091a),a1
511
+	tst.l	d0
512
+	bls.s	L0004a0
513
+	move.l	d0,d4
514
+L00049a:
515
+	move.b	(a1)+,d1
516
+	subq.l	#1,d4
517
+	moveq.l	#$01,d0
518
+L0004a0:
519
+	rts
520
+
521
+L0004a2:
522
+	move.b	d0,(a2)+
523
+	addq.l	#1,d5
524
+	moveq.l	#$01,d0
525
+	cmp.l	#$00000400,d5
526
+	bne.s	L0004d6
527
+L0004b0:
528
+	tst.l	d5
529
+	beq.s	L0004d6
530
+	move.l	d5,-(sp)
531
+	pea.l	(L000d1a)
532
+	move.w	(L0005cc),-(sp)
533
+	DOS	_WRITE
534
+	lea.l	($000a,sp),sp
535
+	tst.l	d0
536
+	bmi.s	L0004d6
537
+	clr.l	d5
538
+	lea.l	(L000d1a),a2
539
+	moveq.l	#$01,d0
540
+L0004d6:
541
+	rts
542
+
543
+L0004d8:
544
+	clr.w	-(sp)
545
+	DOS	_DUP
546
+	tst.l	d0
547
+	bmi.w	L000196
548
+	move.w	d0,(L0005ca)
549
+	DOS	_CLOSE
550
+	move.w	#$0002,(sp)
551
+	DOS	_DUP
552
+	addq.l	#2,sp
553
+	rts
554
+
555
+L0004f4:
556
+	move.w	#$0001,-(sp)
557
+	DOS	_DUP
558
+	tst.l	d0
559
+	bmi.w	L000196
560
+	move.w	d0,(L0005cc)
561
+	DOS	_CLOSE
562
+	move.w	#$0002,(sp)
563
+	DOS	_DUP
564
+	addq.l	#2,sp
565
+	rts
566
+
567
+
568
+	.data
569
+
570
+L000512:
571
+	.dc.b	'-more-',$00
572
+L000519:
573
+	.dc.b	'使用法:more[ファイル名]',$0d,$0a
574
+	.dc.b	$09,'ファイル名を指定しない場合、標準入力から入力する',$0d,$0a,$00
575
+L000569:
576
+	.dc.b	'more: ファイルがオ-プンできません',$0d,$0a,$00
577
+L00058e:
578
+	.dc.b	'more: 読み込みできません',$0d,$0a
579
+L0005a8:
580
+	.dc.b	'more: 書き込みできません',$0d,$0a
581
+L0005c2:
582
+	.dc.b	$0d,$0a,$00
583
+L0005c5:
584
+	.dc.b	$20,$0d,$00
585
+
586
+	.bss
587
+
588
+L0005c8:
589
+	.ds.b	1
590
+L0005c9:
591
+	.ds.b	1
592
+L0005ca:
593
+	.ds.w	1
594
+L0005cc:
595
+	.ds.b	6
596
+L0005d2:
597
+	.ds.b	280
598
+L0006ea:
599
+	.ds.b	280
600
+L000802:
601
+	.ds.b	280
602
+L00091a:
603
+	.ds.b	1024
604
+L000d1a:
605
+	.ds.b	2048
606
+L00151a:
607
+	.ds.b	2
608
+L00151c:
609
+
610
+	.end	L000000

BIN
more.x View File


+ 130
- 0
move.lab View File

@@ -0,0 +1,130 @@
1
+*********************************************
2
+*
3
+*  Label file for move.x
4
+*
5
+*	DIS version 3.16
6
+*
7
+*********************************************
8
+000000	P
9
+000076	P
10
+00008a	P
11
+0000b0	P
12
+0000b6	P
13
+0000ca	P
14
+000136	P
15
+00014c	P
16
+000156	P
17
+00015a	P
18
+00016a	P
19
+000170	P
20
+00019a	P
21
+0001f2	P
22
+000202	P
23
+000206	P
24
+000214	P
25
+00021c	P
26
+000224	P
27
+00022c	P
28
+000234	P
29
+00023c	P
30
+000242	P
31
+00024a	P
32
+000250	P
33
+000268	P
34
+00027a	P
35
+00027e	P
36
+000280	P
37
+000288	P
38
+000296	P
39
+00029c	P
40
+0002a8	P
41
+0002c8	P
42
+0002cc	P
43
+0002dc	P
44
+0002de	P
45
+0002f6	P
46
+0002fa	P
47
+000304	P
48
+000308	P
49
+000316	P
50
+00031a	P
51
+000320	P
52
+000328	P
53
+00032c	P
54
+00033a	P
55
+000342	P
56
+00034e	P
57
+000360	P
58
+000366	P
59
+000372	P
60
+000376	P
61
+00037e	P
62
+000398	P
63
+0003b0	P
64
+0003b6	P
65
+0003c8	P
66
+0003ce	P
67
+0003f0	P
68
+00041c	P
69
+00042c	P
70
+00042e	P
71
+000440	P
72
+00045c	P
73
+000464	P
74
+000470	P
75
+000482	P
76
+00048c	P
77
+0004a8	P
78
+0004ac	P
79
+0004b8	P
80
+0004c6	P
81
+0004ca	P
82
+0004d2	P
83
+0004d6	P
84
+0004dc	P
85
+0004ec	P
86
+0004ee	P
87
+0004f6	P
88
+000514	P
89
+000518	P
90
+000520	P
91
+00054c	P
92
+00055c	P
93
+000560	P
94
+00056c	P
95
+00057e	P
96
+000584	P
97
+00058c	P
98
+000592	P
99
+0005a0	P
100
+0005ae	P
101
+0005be	P
102
+0005c8	P
103
+0005da	P
104
+0005e0	P
105
+000610	P
106
+000614	P
107
+000616	P
108
+000624	P
109
+000634	P
110
+000636	DS
111
+00063a	DS
112
+000675	DS
113
+0006a2	DS
114
+0006cb	DS
115
+0006f8	DS
116
+000721	DS
117
+000742	DS
118
+00075c	DU
119
+000760	DU
120
+000878	DB
121
+000990	DU
122
+000aa8	DU
123
+000bc0	DU
124
+000cd8	DU
125
+000df0	DU
126
+000f08	DU
127
+000f1d	DB
128
+000f26	DU
129
+001344	DU
130
+001346	DU

+ 762
- 0
move.s View File

@@ -0,0 +1,762 @@
1
+;=============================================
2
+;  Filename move.x
3
+;
4
+;
5
+;  Base address 000000
6
+;  Exec address 000000
7
+;  Text size    000636 byte(s)
8
+;  Data size    00012a byte(s)
9
+;  Bss  size    000be6 byte(s)
10
+;  123 Labels
11
+;
12
+;  Commandline dis  -b2 -h -m68000 --sp -q1 -B -M -o120 -gmove.lab --overwrite move.x move.s
13
+;          DIS version 3.16
14
+;=============================================
15
+
16
+	.include	inc/doscall.mac
17
+	.include	inc/iocscall.mac
18
+	.include	inc/fefunc.mac
19
+
20
+	.cpu	68000
21
+
22
+	.text
23
+
24
+L000000:
25
+	lea.l	(L001344),sp
26
+	movea.l	(L000000-$0000e0),a0
27
+	addq.l	#1,a0
28
+	lea.l	(L000760),a1
29
+	bsr.w	L00024a
30
+	tst.w	d0
31
+	beq.w	L000206
32
+	cmp.w	#$0002,d0
33
+	bhi.w	L000206
34
+	tst.b	(L000878)
35
+	bne.w	L000206
36
+	lea.l	(L000760),a1
37
+	lea.l	(L000990),a0
38
+	bsr.w	L0002f6
39
+	movea.l	a1,a0
40
+	bsr.w	L000328
41
+	adda.l	d0,a1
42
+	addq.l	#1,a1
43
+	lea.l	(L000bc0),a0
44
+	bsr.w	L0002f6
45
+	lea.l	(L000990),a1
46
+	lea.l	(L000cd8),a0
47
+	cmpi.b	#$3a,($0001,a1)		;':'
48
+	beq.s	L000076
49
+	DOS	_CURDRV
50
+	add.b	#$61,d0			;'a'
51
+	move.b	d0,(a0)+
52
+	move.b	#$3a,(a0)+		;':'
53
+	bra.s	L00008a
54
+
55
+L000076:
56
+	move.b	(a1),d0
57
+	or.b	#$20,d0
58
+	sub.b	#$61,d0			;'a'
59
+	bsr.w	L0004f6
60
+	tst.l	d0
61
+	bne.w	L00022c
62
+L00008a:
63
+	bsr.w	L0002f6
64
+	bsr.w	L00037e
65
+	lea.l	(L000bc0),a1
66
+	lea.l	(L000cd8),a2
67
+	lea.l	(L000df0),a0
68
+	tst.b	(a1)
69
+	beq.s	L0000b0
70
+	cmpi.b	#$3a,($0001,a1)		;':'
71
+	beq.s	L0000b6
72
+L0000b0:
73
+	move.b	(a2)+,(a0)+
74
+	move.b	(a2)+,(a0)+
75
+	bra.s	L0000ca
76
+
77
+L0000b6:
78
+	move.b	(a1),d0
79
+	or.b	#$20,d0
80
+	sub.b	#$61,d0			;'a'
81
+	bsr.w	L0004f6
82
+	tst.l	d0
83
+	bne.w	L00022c
84
+L0000ca:
85
+	bsr.w	L0002f6
86
+	bsr.w	L00037e
87
+	bsr.w	L00033a
88
+	lea.l	(L000636),a1
89
+	bsr.w	L000304
90
+	tst.l	d0
91
+	bne.w	L00023c
92
+	lea.l	(L000cd8),a0
93
+	lea.l	(L000df0),a1
94
+	cmpm.b	(a0)+,(a1)+
95
+	bne.w	L00021c
96
+	lea.l	(L000cd8),a0
97
+	bsr.w	L000520
98
+	movea.l	a0,a1
99
+	lea.l	(L000aa8),a0
100
+	bsr.w	L0002f6
101
+	movea.l	a1,a0
102
+	bsr.w	L00033a
103
+	movea.l	a0,a2
104
+	clr.b	(a0)
105
+	lea.l	(L000df0),a0
106
+	bsr.w	L000520
107
+	bsr.w	L00033a
108
+	movea.l	a0,a3
109
+	clr.b	(a0)
110
+	lea.l	(L000cd8),a0
111
+	lea.l	(L000df0),a1
112
+L000136:
113
+	move.b	(a0)+,d0
114
+	beq.s	L00016a
115
+	cmp.b	#$80,d0
116
+	bcc.s	L00015a
117
+	cmp.b	#$a0,d0
118
+	bcc.s	L00014c
119
+	cmp.b	#$e0,d0
120
+	bcc.s	L00015a
121
+L00014c:
122
+	cmp.b	(a1)+,d0
123
+	bne.s	L000170
124
+	tst.b	(a0)
125
+	beq.s	L00016a
126
+	cmpm.b	(a0)+,(a1)+
127
+L000156:
128
+	bne.s	L000170
129
+	bra.s	L000136
130
+
131
+L00015a:
132
+	bsr.w	L000624
133
+	move.b	d0,d1
134
+	move.b	(a1)+,d0
135
+	bsr.w	L000624
136
+	cmp.b	d0,d1
137
+	bra.s	L000156
138
+
139
+L00016a:
140
+	cmp.b	(a1),d0
141
+	beq.w	L000224
142
+L000170:
143
+	lea.l	(L000990),a0
144
+	bsr.w	L00033a
145
+	movea.l	a0,a4
146
+	clr.b	(a0)
147
+	move.w	#$0020,-(sp)		;' '
148
+	pea.l	(L000aa8)
149
+	pea.l	(L000f08)
150
+	DOS	_FILES
151
+	lea.l	($000a,sp),sp
152
+	tst.l	d0
153
+	bmi.w	L000234
154
+L00019a:
155
+	move.b	(L000f1d),d0
156
+	and.b	#$05,d0
157
+	bne.s	L0001f2
158
+	movea.l	a2,a0
159
+	lea.l	(L000f26),a1
160
+	bsr.w	L0002f6
161
+	movea.l	a3,a0
162
+	lea.l	(L000f26),a1
163
+	bsr.w	L0002f6
164
+	movea.l	a4,a0
165
+	lea.l	(L000f26),a1
166
+	bsr.w	L0002f6
167
+	pea.l	(L000990)
168
+	DOS	_PRINT
169
+	addq.l	#4,sp
170
+	pea.l	(L00075c)
171
+	DOS	_PRINT
172
+	addq.l	#4,sp
173
+	pea.l	(L000df0)
174
+	pea.l	(L000cd8)
175
+	DOS	_RENAME
176
+	addq.l	#8,sp
177
+	tst.l	d0
178
+	bmi.s	L000214
179
+L0001f2:
180
+	pea.l	(L000f08)
181
+	DOS	_NFILES
182
+	addq.l	#4,sp
183
+	tst.l	d0
184
+	bpl.s	L00019a
185
+	clr.w	d0
186
+L000202:
187
+	move.w	d0,-(sp)
188
+	DOS	_EXIT2
189
+
190
+L000206:
191
+	pea.l	(L00063a)
192
+	DOS	_PRINT
193
+	addq.l	#4,sp
194
+	moveq.l	#$01,d0
195
+	bra.s	L000202
196
+
197
+L000214:
198
+	pea.l	(L000721)
199
+	bra.s	L000242
200
+
201
+L00021c:
202
+	pea.l	(L0006cb)
203
+	bra.s	L000242
204
+
205
+L000224:
206
+	pea.l	(L0006f8)
207
+	bra.s	L000242
208
+
209
+L00022c:
210
+	pea.l	(L000742)
211
+	bra.s	L000242
212
+
213
+L000234:
214
+	pea.l	(L0006a2)
215
+	bra.s	L000242
216
+
217
+L00023c:
218
+	pea.l	(L000675)
219
+L000242:
220
+	DOS	_PRINT
221
+	addq.l	#4,sp
222
+	moveq.l	#$02,d0
223
+	bra.s	L000202
224
+
225
+L00024a:
226
+	movem.l	d1/a0-a2,-(sp)
227
+	clr.l	d1
228
+L000250:
229
+	bsr.w	L0002dc
230
+	adda.l	d0,a0
231
+	tst.b	(a0)
232
+	beq.s	L0002cc
233
+	move.b	(a0)+,d0
234
+	cmp.b	#$2d,d0			;'-'
235
+	beq.s	L000268
236
+	cmp.b	#$2f,d0			;'/'
237
+	bne.s	L00027e
238
+L000268:
239
+	move.b	(a0)+,d0
240
+	beq.s	L0002cc
241
+	cmp.b	#$09,d0
242
+	beq.s	L00027a
243
+	cmp.b	#$20,d0			;' '
244
+	beq.s	L00027a
245
+	move.b	d0,(a2)+
246
+L00027a:
247
+	clr.b	(a2)+
248
+	bra.s	L000250
249
+
250
+L00027e:
251
+	addq.l	#1,d1
252
+L000280:
253
+	move.b	d0,(a1)+
254
+	cmp.b	#$22,d0			;'"'
255
+	bne.s	L000296
256
+L000288:
257
+	move.b	(a0)+,d0
258
+	beq.s	L0002cc
259
+	move.b	d0,(a1)+
260
+	cmp.b	#$22,d0			;'"'
261
+	bne.s	L000288
262
+	bra.s	L0002a8
263
+
264
+L000296:
265
+	cmp.b	#$27,d0			;'''
266
+	bne.s	L0002a8
267
+L00029c:
268
+	move.b	(a0)+,d0
269
+	beq.s	L0002cc
270
+	move.b	d0,(a1)+
271
+	cmp.b	#$27,d0			;'''
272
+	bne.s	L00029c
273
+L0002a8:
274
+	move.b	(a0),d0
275
+	beq.s	L0002cc
276
+	cmp.b	#$2f,d0			;'/'
277
+	beq.s	L0002c8
278
+	cmp.b	#$2d,d0			;'-'
279
+	beq.s	L0002c8
280
+	addq.l	#1,a0
281
+	cmp.b	#$09,d0
282
+	beq.s	L0002c8
283
+	cmp.b	#$20,d0			;' '
284
+	beq.s	L0002c8
285
+	bra.s	L000280
286
+
287
+L0002c8:
288
+	clr.b	(a1)+
289
+	bra.s	L000250
290
+
291
+L0002cc:
292
+	clr.b	(a1)+
293
+	clr.b	(a1)
294
+	clr.b	(a2)+
295
+	clr.b	(a2)
296
+	move.l	d1,d0
297
+	movem.l	(sp)+,d1/a0-a2
298
+	rts
299
+
300
+L0002dc:
301
+	move.l	a0,-(sp)
302
+L0002de:
303
+	move.b	(a0)+,d0
304
+	cmpi.b	#$20,d0			;' '
305
+	beq.s	L0002de
306
+	cmpi.b	#$09,d0
307
+	beq.s	L0002de
308
+	move.l	a0,d0
309
+	movea.l	(sp)+,a0
310
+	sub.l	a0,d0
311
+	subq.l	#1,d0
312
+	rts
313
+
314
+L0002f6:
315
+	movem.l	a0-a1,-(sp)
316
+L0002fa:
317
+	move.b	(a1)+,(a0)+
318
+	bne.s	L0002fa
319
+	movem.l	(sp)+,a0-a1
320
+	rts
321
+
322
+L000304:
323
+	movem.l	a0-a1,-(sp)
324
+L000308:
325
+	move.b	(a0)+,d0
326
+	beq.s	L00031a
327
+	cmp.b	(a1)+,d0
328
+	beq.s	L000308
329
+	bcs.s	L000316
330
+	moveq.l	#$01,d0
331
+	bra.s	L000320
332
+
333
+L000316:
334
+	moveq.l	#$ff,d0
335
+	bra.s	L000320
336
+
337
+L00031a:
338
+	tst.b	(a1)
339
+	bne.s	L000316
340
+	clr.l	d0
341
+L000320:
342
+	tst.l	d0
343
+	movem.l	(sp)+,a0-a1
344
+	rts
345
+
346
+L000328:
347
+	move.l	a0,-(sp)
348
+	moveq.l	#$ff,d0
349
+L00032c:
350
+	addi.l	#$00000001,d0
351
+	tst.b	(a0)+
352
+	bne.s	L00032c
353
+	movea.l	(sp)+,a0
354
+	rts
355
+
356
+L00033a:
357
+	movem.l	d0-d1,-(sp)
358
+	clr.b	d1
359
+	move.l	a0,-(sp)
360
+L000342:
361
+	move.b	(a0)+,d0
362
+	beq.s	L000376
363
+	tst.b	d1
364
+	beq.s	L00034e
365
+	clr.b	d1
366
+	bra.s	L000342
367
+
368
+L00034e:
369
+	cmp.b	#$80,d0
370
+	bcs.s	L000366
371
+	cmp.b	#$a0,d0
372
+	bcs.s	L000360
373
+	cmp.b	#$e0,d0
374
+	bcs.s	L000366
375
+L000360:
376
+	move.b	#$01,d1
377
+	bra.s	L000342
378
+
379
+L000366:
380
+	cmp.b	#$5c,d0			;'\'
381
+	beq.s	L000372
382
+	cmp.b	#$3a,d0			;':'
383
+	bne.s	L000342
384
+L000372:
385
+	move.l	a0,(sp)
386
+	bra.s	L000342
387
+
388
+L000376:
389
+	movea.l	(sp)+,a0
390
+	movem.l	(sp)+,d0-d1
391
+	rts
392
+
393
+L00037e:
394
+	link.w	a6,#-$003c
395
+	movem.l	d0-d6/a1-a2,-(sp)
396
+	move.w	#$ffff,d2
397
+	movea.l	a0,a1
398
+	bsr.s	L000328
399
+	move.w	d0,d1
400
+	tst.w	d1
401
+	beq.w	L0004d6
402
+	clr.b	d3
403
+L000398:
404
+	move.b	(a1)+,d4
405
+	beq.s	L0003ce
406
+	tst.b	d3
407
+	beq.s	L0003b6
408
+	cmp.b	#$01,d3
409
+	beq.s	L0003b0
410
+	cmp.b	#$2e,d4			;'.'
411
+	beq.s	L0003b6
412
+	clr.b	d3
413
+	bra.s	L0003b6
414
+
415
+L0003b0:
416
+	move.b	#$02,d3
417
+	bra.s	L000398
418
+
419
+L0003b6:
420
+	cmp.b	#$80,d4
421
+	bcs.s	L000398
422
+	cmp.b	#$a0,d4
423
+	bcs.s	L0003c8
424
+	cmp.b	#$e0,d4
425
+	bcs.s	L000398
426
+L0003c8:
427
+	move.b	#$01,d3
428
+	bra.s	L000398
429
+
430
+L0003ce:
431
+	subq.l	#1,a1
432
+	tst.b	d3
433
+	bne.s	L0003f0
434
+	cmpi.b	#$5c,(-$0001,a1)	;'\'
435
+	bne.s	L0003f0
436
+	cmp.w	#$0001,d1
437
+	beq.w	L0004d6
438
+	cmpi.b	#$3a,(-$0002,a1)	;':'
439
+	beq.w	L0004d6
440
+	clr.b	-(a1)
441
+L0003f0:
442
+	cmpi.b	#$3a,(-$0001,a1)	;':'
443
+	beq.w	L0004d6
444
+	cmpi.b	#$2e,(-$0001,a1)	;'.'
445
+	bne.s	L00042c
446
+	tst.b	d3
447
+	bne.s	L00042c
448
+	cmp.w	#$0001,d1
449
+	beq.s	L00041c
450
+	cmpi.b	#$3a,(-$0002,a1)	;':'
451
+	beq.s	L00041c
452
+	cmpi.b	#$5c,(-$0002,a1)	;'\'
453
+	bne.s	L00042c
454
+L00041c:
455
+	move.b	#$2a,(-$0001,a1)	;'*'
456
+	move.b	#$2e,(a1)+		;'.'
457
+	move.b	#$2a,(a1)+		;'*'
458
+	clr.b	(a1)
459
+L00042c:
460
+	movea.l	a0,a2
461
+L00042e:
462
+	move.b	(a2)+,d0
463
+	beq.s	L000440
464
+	cmp.b	#$2a,d0			;'*'
465
+	beq.s	L00045c
466
+	cmp.b	#$3f,d0			;'?'
467
+	beq.s	L00045c
468
+	bra.s	L00042e
469
+
470
+L000440:
471
+	move.w	#$0010,-(sp)
472
+	move.l	a0,-(sp)
473
+	pea.l	(-$003c,a6)
474
+	DOS	_FILES
475
+	lea.l	($000a,sp),sp
476
+	tst.l	d0
477
+	bmi.s	L00045c
478
+	btst.b	#$04,(-$0027,a6)
479
+	bne.s	L0004d2
480
+L00045c:
481
+	clr.b	d3
482
+	movea.l	a0,a2
483
+	clr.b	d5
484
+	clr.b	d6
485
+L000464:
486
+	move.b	(a2)+,d0
487
+	beq.s	L0004ca
488
+	tst.b	d3
489
+	beq.s	L000470
490
+	clr.b	d3
491
+	bra.s	L000464
492
+
493
+L000470:
494
+	cmp.b	#$80,d0
495
+	bcs.s	L00048c
496
+	cmp.b	#$a0,d0
497
+	bcs.s	L000482
498
+	cmp.b	#$e0,d0
499
+	bcs.s	L00048c
500
+L000482:
501
+	move.b	#$01,d3
502
+	move.b	#$20,d5			;' '
503
+	bra.s	L000464
504
+
505
+L00048c:
506
+	cmp.b	#$2e,d0			;'.'
507
+	bne.s	L0004ac
508
+	tst.b	d5
509
+	beq.s	L0004a8
510
+	cmp.b	#$3a,d5			;':'
511
+	beq.s	L0004a8
512
+	cmp.b	#$5c,d5			;'\'
513
+	beq.s	L0004a8
514
+	cmp.b	#$2e,d5			;'.'
515
+	bne.s	L0004ac
516
+L0004a8:
517
+	tst.b	(a2)
518
+	beq.s	L0004d2
519
+L0004ac:
520
+	cmpi.b	#$5c,(a2)		;'\'
521
+	bne.s	L0004b8
522
+	tst.b	($0001,a2)
523
+	beq.s	L0004d6
524
+L0004b8:
525
+	move.b	d0,d5
526
+	cmp.b	#$2e,d0			;'.'
527
+	beq.s	L0004c6
528
+	cmp.b	#$5c,d0			;'\'
529
+	bne.s	L000464
530
+L0004c6:
531
+	move.b	d0,d6
532
+	bra.s	L000464
533
+
534
+L0004ca:
535
+	cmp.b	#$2e,d6			;'.'
536
+	beq.s	L0004ee
537
+	bra.s	L0004dc
538
+
539
+L0004d2:
540
+	move.b	#$5c,(a1)+		;'\'
541
+L0004d6:
542
+	move.b	#$2a,(a1)+		;'*'
543
+	clr.w	d2
544
+L0004dc:
545
+	move.b	#$2e,(a1)+		;'.'
546
+	move.b	#$2a,(a1)+		;'*'
547
+	tst.w	d2
548
+	beq.s	L0004ec
549
+	clr.b	(-$0001,a1)
550
+L0004ec:
551
+	clr.b	(a1)
552
+L0004ee:
553
+	movem.l	(sp)+,d0-d6/a1-a2
554
+	unlk	a6
555
+	rts
556
+
557
+L0004f6:
558
+	movem.l	d1,-(sp)
559
+	and.l	#$000000ff,d0
560
+	move.l	d0,d1
561
+	DOS	_CURDRV
562
+	move.w	d0,-(sp)
563
+	move.w	d1,-(sp)
564
+	DOS	_CHGDRV
565
+	addq.l	#2,sp
566
+	cmp.w	d1,d0
567
+	bhi.s	L000514
568
+	moveq.l	#$ff,d0
569
+	bra.s	L000518
570
+
571
+L000514:
572
+	DOS	_CHGDRV
573
+	clr.l	d0
574
+L000518:
575
+	addq.l	#2,sp
576
+	movem.l	(sp)+,d1
577
+	rts
578
+
579
+L000520:
580
+	link.w	a6,#-$0118
581
+	movem.l	d0-d2/a0-a3,-(sp)
582
+	lea.l	(-$0118,a6),a1
583
+	move.l	a0,-(sp)
584
+	clr.w	d1
585
+	move.b	($0001,a0),d0
586
+	cmp.b	#$3a,d0			;':'
587
+	bne.s	L00054c
588
+	move.b	(a0)+,d0
589
+	bsr.w	L000624
590
+	move.b	d0,(a1)+
591
+	sub.b	#$60,d0			;'`'
592
+	move.b	(a0)+,(a1)+
593
+	move.w	d0,d1
594
+	bra.s	L00055c
595
+
596
+L00054c:
597
+	DOS	_CURDRV
598
+	move.b	d0,d1
599
+	addq.b	#1,d1
600
+	add.b	#$41,d0			;'A'
601
+	move.b	d0,(a1)+
602
+	move.b	#$3a,(a1)+		;':'
603
+L00055c:
604
+	movea.l	a0,a2
605
+	clr.b	d2
606
+L000560:
607
+	move.b	(a2)+,d0
608
+	beq.s	L000592
609
+	tst.b	d2
610
+	beq.s	L00056c
611
+	clr.b	d2
612
+	bra.s	L000560
613
+
614
+L00056c:
615
+	cmp.b	#$80,d0
616
+	bcs.s	L000584
617
+	cmp.b	#$a0,d0
618
+	bcs.s	L00057e
619
+	cmp.b	#$e0,d0
620
+	bcs.s	L000584
621
+L00057e:
622
+	move.b	#$01,d2
623
+	bra.s	L000560
624
+
625
+L000584:
626
+	cmp.b	#$5c,d0			;'\'
627
+	beq.s	L00058c
628
+	bra.s	L000560
629
+
630
+L00058c:
631
+	cmpi.b	#$5c,(a0)		;'\'
632
+	beq.s	L0005ae
633
+L000592:
634
+	move.b	#$5c,(a1)+		;'\'
635
+	move.l	a1,-(sp)
636
+	move.w	d1,-(sp)
637
+	DOS	_CURDIR
638
+	addq.l	#6,sp
639
+	movea.l	a1,a2
640
+L0005a0:
641
+	tst.b	(a1)+
642
+	bne.s	L0005a0
643
+	subq.l	#1,a1
644
+	cmpa.l	a1,a2
645
+	beq.s	L0005ae
646
+	move.b	#$5c,(a1)+		;'\'
647
+L0005ae:
648
+	move.b	(a0)+,(a1)+
649
+	bne.s	L0005ae
650
+	clr.b	d2
651
+	movea.l	(sp)+,a0
652
+	lea.l	(-$0118,a6),a1
653
+	lea.l	(sp),a3
654
+	clr.l	-(sp)
655
+L0005be:
656
+	move.b	(a1)+,d0
657
+	tst.b	d2
658
+	beq.s	L0005c8
659
+	clr.b	d2
660
+	bra.s	L000616
661
+
662
+L0005c8:
663
+	cmp.b	#$80,d0
664
+	bcs.s	L0005e0
665
+	cmp.b	#$a0,d0
666
+	bcs.s	L0005da
667
+	cmp.b	#$e0,d0
668
+	bcs.s	L0005e0
669
+L0005da:
670
+	move.b	#$01,d2
671
+	bra.s	L000616
672
+
673
+L0005e0:
674
+	cmp.b	#$5c,d0			;'\'
675
+	bne.s	L000616
676
+	cmpi.b	#$2e,(a1)		;'.'
677
+	bne.s	L000614
678
+	cmpi.b	#$5c,($0001,a1)		;'\'
679
+	beq.s	L000610
680
+	cmpi.b	#$2e,($0001,a1)		;'.'
681
+	bne.s	L000614
682
+	cmpi.b	#$5c,($0002,a1)		;'\'
683
+	bne.s	L000614
684
+	move.l	(sp)+,d1
685
+	tst.l	d1
686
+	beq.s	L000616
687
+	movea.l	d1,a0
688
+	addq.l	#2,a1
689
+	bra.s	L0005be
690
+
691
+L000610:
692
+	addq.l	#1,a1
693
+	bra.s	L0005be
694
+
695
+L000614:
696
+	move.l	a0,-(sp)
697
+L000616:
698
+	move.b	d0,(a0)+
699
+	bne.s	L0005be
700
+	lea.l	(a3),sp
701
+	movem.l	(sp)+,d0-d2/a0-a3
702
+	unlk	a6
703
+	rts
704
+
705
+L000624:
706
+	cmpi.b	#$41,d0			;'A'
707
+	bcs.s	L000634
708
+	cmpi.b	#$5a,d0			;'Z'
709
+	bhi.s	L000634
710
+	add.b	#$20,d0			;' '
711
+L000634:
712
+	rts
713
+
714
+
715
+	.data
716
+
717
+L000636:
718
+	.dc.b	'*.*',$00
719
+L00063a:
720
+	.dc.b	'使用法:move[移動元ディレクトリ][移動先ディレクトリ]',$0d,$0a,$00
721
+L000675:
722
+	.dc.b	'move: 移動先のディレクトリが見つかりません',$0d,$0a,$00
723
+L0006a2:
724
+	.dc.b	'move: 移動元のファイルが見つかりません',$0d,$0a,$00
725
+L0006cb:
726
+	.dc.b	'move: 移動元と移動先のドライブ名が違います',$0d,$0a,$00
727
+L0006f8:
728
+	.dc.b	'move: 移動元と移動先のパス名が同じです',$0d,$0a,$00
729
+L000721:
730
+	.dc.b	'move: ファイルを移動できません',$0d,$0a,$00
731
+L000742:
732
+	.dc.b	'move: ドライブ名が無効です'
733
+L00075c:
734
+	.dc.b	$0d,$0a,$00,$00
735
+
736
+	.bss
737
+
738
+L000760:
739
+	.ds.b	280
740
+L000878:
741
+	.ds.b	280
742
+L000990:
743
+	.ds.b	280
744
+L000aa8:
745
+	.ds.b	280
746
+L000bc0:
747
+	.ds.b	280
748
+L000cd8:
749
+	.ds.b	280
750
+L000df0:
751
+	.ds.b	280
752
+L000f08:
753
+	.ds.b	21
754
+L000f1d:
755
+	.ds.b	9
756
+L000f26:
757
+	.ds.b	1054
758
+L001344:
759
+	.ds.b	2
760
+L001346:
761
+
762
+	.end	L000000

BIN
move.x View File


+ 108
- 0
sort.lab View File

@@ -0,0 +1,108 @@
1
+*********************************************
2
+*
3
+*  Label file for sort.x
4
+*
5
+*	DIS version 3.16
6
+*
7
+*********************************************
8
+000000	P
9
+00004e	P
10
+000066	P
11
+000080	P
12
+0000e2	P
13
+0000f4	P
14
+000106	P
15
+00011e	P
16
+000156	P
17
+000168	P
18
+00017a	P
19
+000192	P
20
+0001c0	P
21
+0001e2	P
22
+000204	P
23
+000210	P
24
+000234	P
25
+00023a	P
26
+00025a	P
27
+000280	P
28
+000286	P
29
+0002b0	P
30
+0002fe	P
31
+00030c	P
32
+000324	P
33
+000334	P
34
+000350	P
35
+00035c	P
36
+000364	P
37
+00036e	P
38
+00039c	P
39
+00039e	P
40
+0003a8	P
41
+0003ae	P
42
+0003c0	P
43
+0003d4	P
44
+0003f8	P
45
+00040e	P
46
+000412	P
47
+00042a	P
48
+00043c	P
49
+000442	P
50
+000444	P
51
+00045c	P
52
+00046e	P
53
+000474	P
54
+000476	P
55
+000486	P
56
+000488	P
57
+000490	P
58
+000492	P
59
+0004b4	P
60
+0004d2	P
61
+0004d8	P
62
+0004e4	P
63
+00050e	P
64
+000524	P
65
+000528	P
66
+000540	P
67
+000552	P
68
+000558	P
69
+00055a	P
70
+000572	P
71
+000584	P
72
+00058a	P
73
+00058c	P
74
+00059c	P
75
+00059e	P
76
+0005a6	P
77
+0005e6	P
78
+0005e8	P
79
+0005f0	P
80
+0005f8	P
81
+0005fe	P
82
+000620	P
83
+000626	P
84
+00062e	P
85
+00063c	P
86
+000642	P
87
+000644	DSF
88
+000650	DSF
89
+000706	DSF
90
+00071d	DS
91
+00073c	DSF
92
+000756	DUF
93
+000760	DW
94
+000762	DW
95
+000764	DW
96
+000766	DW
97
+000768	DW
98
+00076a	DW
99
+00076c	DW
100
+00076e	DW
101
+000770	DL
102
+000774	DW
103
+000776	DW
104
+000778	DB
105
+0007f8	DW
106
+0007fa	DL
107
+0007fe	DL
108
+000c02	DU

+ 680
- 0
sort.s View File

@@ -0,0 +1,680 @@
1
+;=============================================
2
+;  Filename sort.x
3
+;
4
+;
5
+;  Base address 000000
6
+;  Exec address 000000
7
+;  Text size    000760 byte(s)
8
+;  Data size    000000 byte(s)
9
+;  Bss  size    0004a2 byte(s)
10
+;  101 Labels
11
+;
12
+;  Commandline dis  -b2 -h -m68000 --sp -q1 -B -M -o120 -gsort.lab --overwrite sort.x sort.s
13
+;          DIS version 3.16
14
+;=============================================
15
+
16
+	.include	inc/doscall.mac
17
+	.include	inc/iocscall.mac
18
+	.include	inc/fefunc.mac
19
+
20
+	.cpu	68000
21
+
22
+	.text
23
+
24
+L000000:
25
+	lea.l	(L000c02),sp
26
+	move.l	($0008,a0),d0
27
+	sub.l	sp,d0
28
+	move.l	d0,(L000770)
29
+	move.w	#$0001,(L000776)
30
+	clr.w	(L000760)
31
+	clr.w	(L000762)
32
+	clr.w	(L000766)
33
+	clr.w	(L000768)
34
+	clr.b	(L000778)
35
+	move.w	#$0008,(L00076a)
36
+	clr.w	(L00076c)
37
+	clr.w	(L00076e)
38
+	addq.l	#1,a2
39
+L00004e:
40
+	bsr.w	L00062e
41
+	move.b	(a2),d0
42
+	beq.w	L00023a
43
+	cmp.b	#$2f,d0			;'/'
44
+	beq.s	L000066
45
+	cmp.b	#$2d,d0			;'-'
46
+	bne.w	L000204
47
+L000066:
48
+	lea.l	($0001,a2),a2
49
+	move.b	(a2),d0
50
+	beq.w	L0005e8
51
+	cmp.b	#$20,d0			;' '
52
+	beq.w	L0005e8
53
+	cmp.b	#$09,d0
54
+	beq.w	L0005e8
55
+L000080:
56
+	move.b	(a2),d0
57
+	beq.w	L00023a
58
+	cmp.b	#$2f,d0			;'/'
59
+	beq.s	L00004e
60
+	cmp.b	#$2d,d0			;'-'
61
+	beq.s	L00004e
62
+	cmp.b	#$20,d0			;' '
63
+	beq.s	L00004e
64
+	cmp.b	#$09,d0
65
+	beq.s	L00004e
66
+	cmp.b	#$72,d0			;'r'
67
+	beq.w	L0001c0
68
+	cmp.b	#$52,d0			;'R'
69
+	beq.w	L0001c0
70
+	cmp.b	#$69,d0			;'i'
71
+	beq.w	L0001e2
72
+	cmp.b	#$49,d0			;'I'
73
+	beq.w	L0001e2
74
+	cmp.b	#$74,d0			;'t'
75
+	beq.w	L000156
76
+	cmp.b	#$54,d0			;'T'
77
+	beq.w	L000156
78
+	cmp.b	#$2b,d0			;'+'
79
+	beq.s	L0000e2
80
+	cmp.b	#$4b,d0			;'K'
81
+	beq.s	L0000e2
82
+	cmp.b	#$6b,d0			;'k'
83
+	bne.w	L0005e8
84
+L0000e2:
85
+	tst.w	(L000762)
86
+	bne.w	L0005e8
87
+	lea.l	($0001,a2),a2
88
+	movea.l	a2,a0
89
+	clr.w	d1
90
+L0000f4:
91
+	move.b	(a0)+,d0
92
+	cmp.b	#$30,d0			;'0'
93
+	bcs.s	L000106
94
+	cmp.b	#$39,d0			;'9'
95
+	bhi.s	L000106
96
+	addq.w	#1,d1
97
+	bra.s	L0000f4
98
+
99
+L000106:
100
+	tst.w	d1
101
+	ble.w	L0005e8
102
+	cmp.w	#$0005,d1
103
+	bgt.w	L0005e8
104
+	subq.w	#1,d1
105
+	lea.l	(L000756),a0
106
+	clr.w	d3
107
+L00011e:
108
+	clr.w	d0
109
+	move.b	(a2)+,d0
110
+	sub.b	#$30,d0			;'0'
111
+	move.w	d1,d2
112
+	lsl.w	#1,d2
113
+	mulu.w	(a0,d2.w),d0
114
+	add.w	d0,d3
115
+	dbra.w	d1,L00011e
116
+	tst.w	d3
117
+	ble.w	L0005e8
118
+	cmp.w	#$0200,d3
119
+	bgt.w	L0005e8
120
+	subq.w	#1,d3
121
+	move.w	d3,(L000768)
122
+	move.w	#$ffff,(L000762)
123
+	bra.w	L000080
124
+
125
+L000156:
126
+	tst.w	(L000764)
127
+	bne.w	L0005e8
128
+	lea.l	($0001,a2),a2
129
+	movea.l	a2,a0
130
+	clr.w	d1
131
+L000168:
132
+	move.b	(a0)+,d0
133
+	cmp.b	#$30,d0			;'0'
134
+	bcs.s	L00017a
135
+	cmp.b	#$39,d0			;'9'
136
+	bhi.s	L00017a
137
+	addq.w	#1,d1
138
+	bra.s	L000168
139
+
140
+L00017a:
141
+	tst.w	d1
142
+	ble.w	L0005e8
143
+	cmp.w	#$0002,d1
144
+	bgt.w	L0005e8
145
+	subq.w	#1,d1
146
+	lea.l	(L000756),a0
147
+	clr.w	d3
148
+L000192:
149
+	clr.w	d0
150
+	move.b	(a2)+,d0
151
+	sub.b	#$30,d0			;'0'
152
+	move.w	d1,d2
153
+	lsl.w	#1,d2
154
+	mulu.w	(a0,d2.w),d0
155
+	add.w	d0,d3
156
+	dbra.w	d1,L000192
157
+	tst.w	d3
158
+	ble.w	L0005e8
159
+	move.w	d3,(L00076a)
160
+	move.w	#$ffff,(L000764)
161
+	bra.w	L000080
162
+
163
+L0001c0:
164
+	tst.w	(L000760)
165
+	bne.w	L0005e8
166
+	move.w	#$ffff,(L00076c)
167
+	move.w	#$ffff,(L000760)
168
+	lea.l	($0001,a2),a2
169
+	bra.w	L000080
170
+
171
+L0001e2:
172
+	tst.w	(L000766)
173
+	bne.w	L0005e8
174
+	move.w	#$ffff,(L00076e)
175
+	move.w	#$ffff,(L000766)
176
+	lea.l	($0001,a2),a2
177
+	bra.w	L000080
178
+
179
+L000204:
180
+	lea.l	(L000778),a0
181
+	tst.b	(a0)
182
+	bne.w	L0005e8
183
+L000210:
184
+	move.b	(a2),d0
185
+	beq.s	L000234
186
+	cmp.b	#$20,d0			;' '
187
+	beq.s	L000234
188
+	cmp.b	#$09,d0
189
+	beq.s	L000234
190
+	cmp.b	#$2f,d0			;'/'
191
+	beq.s	L000234
192
+	cmp.b	#$2d,d0			;'-'
193
+	beq.s	L000234
194
+	lea.l	($0001,a2),a2
195
+	move.b	d0,(a0)+
196
+	bra.s	L000210
197
+
198
+L000234:
199
+	clr.b	(a0)
200
+	bra.w	L00004e
201
+
202
+L00023a:
203
+	lea.l	(L000778),a0
204
+	tst.b	(a0)
205
+	beq.s	L00025a
206
+	clr.w	-(sp)
207
+	move.l	a0,-(sp)
208
+	DOS	_OPEN
209
+	addq.l	#6,sp
210
+	tst.l	d0
211
+	bmi.w	L0005f0
212
+	move.w	d0,(L000774)
213
+	bra.s	L000280
214
+
215
+L00025a:
216
+	clr.w	-(sp)
217
+	DOS	_DUP
218
+	addq.l	#2,sp
219
+	tst.l	d0
220
+	bmi.w	L0005f0
221
+	move.w	d0,(L000774)
222
+	clr.w	-(sp)
223
+	DOS	_CLOSE
224
+	addq.l	#2,sp
225
+	move.w	#$0002,-(sp)
226
+	DOS	_DUP
227
+	addq.l	#2,sp
228
+	tst.l	d0
229
+	bmi.w	L0005f0
230
+L000280:
231
+	lea.l	(L000c02),a0
232
+L000286:
233
+	move.l	(L000770),d0
234
+	sub.l	a0,d0
235
+	move.l	d0,-(sp)
236
+	move.l	a0,-(sp)
237
+	move.w	(L000774),-(sp)
238
+	DOS	_READ
239
+	lea.l	($000a,sp),sp
240
+	tst.l	d0
241
+	ble.s	L0002b0
242
+	lea.l	(a0,d0.l),a0
243
+	cmpi.b	#$1a,(-$0001,a0)
244
+	beq.s	L0002b0
245
+	bra.s	L000286
246
+