2427
|
1 tylg set $01 Prgrm+Objct
|
|
2 atrv set $80+rev ReEnt+rev
|
|
3 rev set $00
|
|
4 edition set 5
|
|
5
|
|
6 psect testadd_a,tylg,atrv,edition,200,start
|
|
7
|
|
8 vsect
|
|
9 a rmb 2
|
|
10 b rmb 2
|
|
11 endsect
|
|
12
|
|
13 * capture two parameters
|
|
14 start ldd #0000
|
|
15 std a,u
|
|
16 std b,u
|
|
17
|
|
18 * if no params, just go straight to multiplication
|
|
19 lda ,x
|
|
20 cmpa #C$CR
|
|
21 beq go
|
|
22
|
|
23 * get first number
|
|
24 lbsr DEC_BIN
|
|
25 std a,u
|
|
26 leax ,y
|
|
27 lbsr TO_NON_SP
|
|
28
|
|
29 * if no second number, go straight to multiplication
|
|
30 cmpb #C$CR
|
|
31 beq go
|
|
32 lbsr DEC_BIN
|
|
33 std b,u
|
|
34
|
|
35 go
|
|
36 orcc #IntMasks
|
|
37 top
|
|
38 ldd a,u
|
|
39 addd b,u
|
2471
|
40 bra top
|
2427
|
41
|
2471
|
42 endsect
|