Last change
on this file since 4810254 was 3ae31e9, checked in by Thomas Lopatic <thomas@…>, 8 years ago |
Imported original source code.
|
-
Property mode
set to
100755
|
File size:
965 bytes
|
Line | |
---|
1 | * ------------------------------------------------------------------------------
|
---|
2 | * ptcl12.s -- store a cluster entry into the FAT
|
---|
3 | * Version 2 -- 1987-10-27 -- D.N. Lynx Crowe
|
---|
4 | * ------------------------------------------------------------------------------
|
---|
5 | .text
|
---|
6 | .xdef __ptcl12
|
---|
7 | *
|
---|
8 | CL .equ 12
|
---|
9 | VAL .equ 14
|
---|
10 | CLA .equ d7
|
---|
11 | CLP .equ d6
|
---|
12 | CLT .equ d5
|
---|
13 | FAT .equ a5
|
---|
14 | *
|
---|
15 | __ptcl12: link A6,#0
|
---|
16 | movem.l CLT-CLA/FAT-FAT,-(sp)
|
---|
17 | move.l 8(A6),FAT
|
---|
18 | move.w CL(A6),CLA
|
---|
19 | lsr.w CLA
|
---|
20 | add.w CL(A6),CLA
|
---|
21 | move.b 1(FAT,CLA.W),CLP
|
---|
22 | lsl.w #8,CLP
|
---|
23 | move.b 0(FAT,CLA.W),CLP
|
---|
24 | btst #0,CL+1(A6)
|
---|
25 | beq L2
|
---|
26 | *
|
---|
27 | move.w CLP,CLT
|
---|
28 | and.w #$000F,CLT
|
---|
29 | move.w VAL(A6),D0
|
---|
30 | lsl.w #4,D0
|
---|
31 | or.w D0,CLT
|
---|
32 | bra L3
|
---|
33 | *
|
---|
34 | L2: move.w CLP,CLT
|
---|
35 | and.w #$F000,CLT
|
---|
36 | move.w VAL(A6),D0
|
---|
37 | and.w #$0FFF,D0
|
---|
38 | or.w D0,CLT
|
---|
39 | *
|
---|
40 | L3: move.b CLT,0(FAT,CLA.W)
|
---|
41 | move.w CLT,D0
|
---|
42 | lsr.w #8,D0
|
---|
43 | move.b D0,1(FAT,CLA.W)
|
---|
44 | *
|
---|
45 | L1: movem.l (sp)+,CLT-CLA/FAT-FAT
|
---|
46 | unlk A6
|
---|
47 | rts
|
---|
48 | *
|
---|
49 | .end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.