source: buchla-68k/libcio/ptcl12.s@ f852615

Last change on this file since f852615 was 8325447, checked in by Thomas Lopatic <thomas@…>, 7 years ago

Removed _ prefix.

  • Property mode set to 100644
File size: 895 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
8CL = 12
9VAL = 14
10CLA = d7
11CLP = d6
12CLT = d5
13FAT = 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 #1,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 #0x000F,CLT
29 move.w VAL(A6),D0
30 lsl.w #4,D0
31 or.w D0,CLT
32 bra L3
33
34L2: move.w CLP,CLT
35 and.w #0xF000,CLT
36 move.w VAL(A6),D0
37 and.w #0x0FFF,D0
38 or.w D0,CLT
39
40L3: 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
45L1: 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.