annotate lib/alib/mult16x8.a @ 2474:7d70b7e1cb21

Moved net and alib files into here
author boisy
date Tue, 30 Mar 2010 02:44:42 +0000
parents
children aaba193af04f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2474
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
1 ***********************************
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
2
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
3 * 16 x 8 Multiply (24 bit result)
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
4
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
5 * OTHER MODULES NEEDED: none
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
6
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
7 * ENTRY: A = multiplier
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
8 * X = multiplicand
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
9
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
10 * EXIT: A = product byte 1
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
11 * X = product bytes 2 & 3
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
12
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
13 nam 16x8 bit Multiply
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
14 ttl Assembler Library Module
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
15
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
16
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
17 psect MULT168,0,0,0,0,0
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
18
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
19 MULT168:
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
20 PSHS A,X save numbers
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
21 LEAS -3,S room for product
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
22 LDB 5,S get lsb of multiplicand
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
23 MUL
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
24 STD 1,S save partial product
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
25 LDD 3,S get mupltiplier & msb of multp.
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
26 MUL
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
27 ADDB 1,S add lsb to msb
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
28 ADCA #0 add carry
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
29 STD 0,S save sum of partial products
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
30 LDX 1,S get 2 lsb's
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
31 LEAS 6,S clean stack
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
32 RTS
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
33
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
34 endsect
7d70b7e1cb21 Moved net and alib files into here
boisy
parents:
diff changeset
35