source: thomson/code/3rdparty/sources4-divers/Contacthoms/INVERSE.ASM@ ceffc47

main
Last change on this file since ceffc47 was ceffc47, checked in by Adrien Destugues <pulkomandy@…>, 10 years ago

Add that collection of 3rdparty source I had lying on my disk for some time...

git-svn-id: svn://localhost/thomson@51 85ae3b6b-dc8f-4344-a89d-598714f2e4e5

  • Property mode set to 100644
File size: 1018 bytes
Line 
1*
2* SOUS-PROGRAMME ASSEMBLEUR
3* POUR INVERSION D'UNE CHAINE DE
4* DE CARACTERES
5*
6* CLUB CONTACTHOMS No 15 page 14
7* Jérome THOEN (c) 1993
8*
9
10 ORG $9000
11MAXCAR EQU 255 long maxi chaîne
12
13ENTREE PSHS A,B,Y,U,CC
14 CMPA #3
15 BNE SORTIE sortie si
16 LDU 1,X pas chaîne
17 TSTB sortie si
18 BEQ SORTIE longueur nulle
19 LDU 1,X adr chaîne A
20* inverser -> U
21 TFR B,A longueur -> A
22 PSHS X sauvegarde X
23 LDX #CHAINE adr fin chaîne
24 ABX inversée -> X
25* inversée et copie
26CSUIV LDB ,U+ chaîne dans
27 STB ,-X buffer 'CHAINE'
28 DECA teste fin
29 BNE CSUIV de chaîne
30 PULS X recharge X
31 LDD #CHAINE nouvelle adr
32 STD 1,X -> descripteur
33SORTIE PULS A,B,Y,U,CC,PC
34
35CHAINE RMB MAXCAR reserve place
36* pour chaîne
37* inversée
38 END
Note: See TracBrowser for help on using the repository browser.