/[projet1]/public/atari/tools/rembrandt/DIVERS/DECIMAL.S
Defence Force logotype

Contents of /public/atari/tools/rembrandt/DIVERS/DECIMAL.S

Parent Directory Parent Directory | Revision Log Revision Log


Revision 67 - (show annotations)
Sat Apr 25 18:10:46 2009 UTC (10 years, 7 months ago) by dbug
File size: 582 byte(s)
Added Rembrandt and Forgotten Bits
1 lea chaine,a0
2 move.l #87654321,d0
3 bsr inscrit_chaine
4 nop
5 nop
6 nop
7
8 inscrit_chaine
9 sf d6
10 move.l #1000000000,d7
11 .position_suivante
12 move.l d0,d1
13 divu.l d7,d1 Divise par la puissance de 10
14 beq .inscrit_z‚ro
15 st d6
16 move #'0',d2
17 add d1,d2
18 move.b d2,(a0)+ Inscrit le caractŠre
19 mulu.l d7,d1
20 sub.l d1,d0
21 divu.l #10,d7
22 bne .position_suivante
23 bra .fin_chaine
24
25 .inscrit_z‚ro
26 tst.b d6
27 beq .saute_premier_z‚ro
28 move.b #'0',(a0)+
29 .saute_premier_z‚ro
30 divu.l #10,d7
31 bne .position_suivante
32
33 .fin_chaine
34 clr.b (a0)+
35 rts
36
37 chaine ds.l 50

  ViewVC Help
Powered by ViewVC 1.1.26