RECHERCHER :
COMMUNAUTE MP
Identifiez vous ...
Devenir Membre
J'ai oublié mon MDP
DOMAINE MP
Bavardages
Langages Généraux
Langages Web
Langages DotNet
Autres langages
Dev. Jeux Video
Sécurité
Sys. Exploitation
Graphismes
Logiciels
Réseaux
Bases de données
Méthodologies
Emplois High-tech
Aide juridique
Articles juridiques
FORUM
Index des forums
Ajouter un sujet
Rechercher sujet
Contact Responsable
Devenir modérateur
CHAT MP IRC
Votre pseudo ...
Serv: irc.irc-land.org
Chan: #MoteurProg
PARTICIPER
Plus de 3500 emplois.
Rechercher un job
Déposez votre CV
Emplois High-tech

Visiteur MP

 extraire une sous chaine

Forum : ASSEMBLEUR
Sous Catégorie : Aucune
Type du sujet : Sujet Normale
FAQ : FAQ ASSEMBLEUR

SUIVI DES SUJETS PAR MAIL

SUIVI PAR MAIL INACTIF

RESOLUTION DU SUJET SUJET NON RESOLU
BLOQUAGE DU SUJET SUJET ACTIF
APPARTENANCE A LA FAQ N'APPARTIENT PAS A LA FAQ


POSTER UN NOUVEAU SUJET REPONDRE A CE SUJET

FORUM ASSEMBLEUR

PREMIERE PAGE

PAGE PRECEDENTE

Page précedente

Page suivante

PAGE SUIVANTE

DERNIERE PAGE
wufeii
Nouveau membre
Inscrit : 06/06/2007
Messages : 1
Message
#135439
Posté le 06/06/07 à 15:58
bonjour a tous je suis le petit nouveau du forum aujourd'hui !!!
voila j'ai un petit problème je dois traduire le programme ci dessous en langage d' assembleur . pourriez vous m'aider ???? merci d'avance javascript:wcode_inserer_2('Formulaire','TexteFormulaire','Smiley')

voila le programme (en C):
/* procedure extraireSousChaine */

#include "chaine.h"

void extraireSousChaine(ChaineDyn * ch1, const ChaineDyn ch2,
const int p, const int n, jmp_buf ptRep)
{
static char * ERR_ALLOC = "Erreur Allocation" ;
static char * ERR_PARAM = "Erreur Parametres p et/ou n Invalides" ;
int lgCh2 ;
int lgSousCh2 ;
char * ptrAlloc ;

lgCh2 = ch2.nbCar ;
if (( p < 1 ) || ( p > lgCh2 ) || ( n < 0 ))
{
longjmp(ptRep, (int)ERR_PARAM) ;
}

lgSousCh2 = lgCh2-p+1;
if ( lgSousCh2 > n )
{
lgSousCh2 = n;
}

if ( lgSousCh2 == 0 )
{
ptrAlloc=NULL;
}
else
{
ptrAlloc = (char *)malloc(lgSousCh2) ;
if (ptrAlloc == NULL)
{
longjmp(ptRep, (int)ERR_ALLOC) ;
}
memcpy (ptrAlloc, ch2.ptrCar+p-1, lgSousCh2) ;
}

if (ch1->ptrCar != NULL)
{
free (ch1->ptrCar) ;
}
ch1->nbCar = lgSousCh2 ;
ch1->ptrCar = ptrAlloc ;

}

HAUT DE PAGE

PROFIL MEMBRE LUI ECRIRE 

Publicité
Inscrit : X
Messages : X
Message
#Aucun

HAUT DE PAGE

  

Betov
Membre régulier
Inscrit : 30/03/2005
Messages : 86
Message
#135480
Posté le 07/06/07 à 08:58
Ben... tu le compile en C, tu le désassemble, et basta. Sur un petit truc comme ça, la remise au propre ne devrait pas être bien compliquée.


Betov.

HAUT DE PAGE

PROFIL MEMBRE LUI ECRIRE 


    PAGE : [1]



.: Site Web développé par Julien Pichot et l'équipe MPWG avec www.evolvia-web.com :.