🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: de.comp.lang.c++
Article #1906

Re: ASM in C++ einbinden

#1906
From: Volkmar Kostka
Date: Mon, 25 Mar 1996 13:44
74 lines
2208 bytes
In article <1996Mar22.085108.337@bam.bruker.de>,
   ah@teddy.software.bruker.de (Andreas Huennebeck) wrote:
>In article <65GvlHBNWSB@xyz.prima.ruhr.de>, Piotr.Kasprzak@xyz.prima.ruhr.de 
(Piotr Kasprzak) writes:
>> Ist es irgendwie moeglich ASM-Routinen (zB. in Form von TASM-Objs) in C++- 
>> OBJEKTE so einzubinden, dass sie sich nahtlos in die C++-Konzepte  
>> integrieren ? Also zum Beispiel:
>> 
>>                 .model small, C
>>                 .code
>> 
>> PROC    routine
>>         ret
>> ENDP
>> 
>>                 .end
>> 
>> und dann:
>> 
>> class x {
>> 
>>    void routine();
>> 
>>    ...
>> };
>> 
>> Ich hab' schon versucht beide Module ineinander zu linken, ging aber  
>> nicht, da 'routine' (logischerweise) nicht als 'x::routine' erkannt wurde. 
 
>> Andererseits kann ich in dem ASM-Modul die Routine nicht 'x::routine'  
>> nennen, da TASM offensichtlich was gegen das 'x::' hat.
>
>Probier es doch mal damit (nicht probiert, nur eine Idee):
>
>                .model small, C
>                .code
>
>PROC    my_asm_routine

besser
PROC     _my_asm_routine

>        ret
>ENDP
>
>                .end
>
>und dann:
>

extern "C" my_asm_routine();

nicht vergessen.


>class x {
>
>   void routine() { my_asm_routine(); }
>
>   ...
>};
>
>Damit umgehst du das "x::". Falls du in my_asm_routine auf Memberdaten 
>zugreifen willst, musst do den this-Zeiger mit uebergeben.
>
>Tschau
>Andreas
>

 | (small signature)   | Volkmar Kostka (TPS GmbH - Germany) |
 | CHAOS PROGRAMMING   | Volkmar.Kostka@tps.de               |
 | HUMANOID            | Phone: +49 9103 506 144             |
 | (original shrinked) | FAX:   +49 9103 506 281             |
 LARGE SIGNATURE AVAILABLE ON REQUEST
Technical Details
Message-ID: <4j67ve$cro_001@news.tps.de>
Path: arc1-ca.pugleaf.net!news.tps.de!ATOP
References: <65GvlHBNWSB@xyz.prima.ruhr.de> <1996Mar22.085108.337@bam.bruker.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.tps.de!ATOP
From: Volkmar.Kostka@tps.de (Volkmar Kostka)
Newsgroups: de.comp.lang.c++
Subject: Re: ASM in C++ einbinden
Date: Mon, 25 Mar 96 13:44:14 GMT
Organization: TPS Teleprocessing Systeme GmbH
Message-ID: <4j67ve$cro_001@news.tps.de>
References: <65GvlHBNWSB@xyz.prima.ruhr.de> <1996Mar22.085108.337@bam.bruker.de>
NNTP-Posting-Host: atop.tps.de
X-Newsreader: News Xpress Version 1.0 Beta #4