Français
Assembler Forum

Erledigt: Pixel mettons, quelle Register sichern

 
quelle Register doit ici gesichert volonté.
ou bien wird cela de Xpia4 bzw XProfan übernommen cela richtige Sichern de Registern?

mfg
KompilierenMarqueSéparation
 $MAKE CLE
 $H Windows.ph
Declare hwin&,x&,y&,f&,hdcwin&
Window 20,20-200,200
hWin& = Create(Window, %hWnd, Test, 250, 20, 650,500)
hDCWin& = ~GetWindowDC(hWin&)

If 0

    AsmStart pset

        Parameters hdcwin&,x&,y&,f&
        mov ecx,para1
        mov eax,para2
        mov ebx,para3
        mov edi,para4
        invoke SetPixel,ecx,eax,ebx,edi

    AsmEnd

EndIf

whileloop 0,100,1

    x&=&loop
    y&=&loop
    f&=$ff0000
    Call(GetXpiaProcAddress(XpiaModule&,pset),hdcwin&,x&,y&,f&)

endwhile

WaitInput
Fin
 
15.05.2009  
 




Frank
Abbing
Pratiquement chacun API modifié qui Register. si du qui données pour qui API wieder benutzen veux, musst du vous auparavant sur den Stack pushen et später wieder runternehmen. ou bien Variablen verwenden.
quelle Register une API benutzt, ist toujours verschieden. tu peux aussi nie entier sûrement son, dass un Register pas modifié wird. cela peux sich chez prochain Betriebssystem déjà geändert avons.
cela ici allez incidemment aussi:
KompilierenMarqueSéparation
 
15.05.2009  
 



Jup,merci.

quoi pouvoir qui Profan2Cpp-Solution?

mfg
 
15.05.2009  
 




Sebastian
König
2peter Bierbach, Beitrag=52367, Zeitpunkt=15.05.2009

quoi pouvoir qui Profan2Cpp-Solution?


Frank hat mir vorhin erklärt, quoi sich chez XPIA geändert hat. je werde ensuite bientôt mon Plug-dans daran anpassen. peux mais quelque chose dauern, là je zur Zeit très avec anderen Dingen beschäftigt suis...

MfG

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
15.05.2009  
 



Jup, alles bien sûr.

qui erstellten Dll de Xpia4 courir avec dem Profan2Cpp wunderbar.

Habe maintenant la fois 2 Exe erstellt avec XProfan.
Einmal avec Asmstart/Asmend et einmal avec qui dessus erstellten Dll.

avec Asmstart/Asmend 10200 Zeiteinheiten et cela gleiche avec qui Dll 4550 Zeiteinheiten.
qui Profan2Cpp fonctionne zur Zeit seulement avec qui Xpia4-Dll et braucht 4100 Zeiteinheiten.

avec Dll :
KompilierenMarqueSéparation
 $H Windows.ph
DEF createpen(3) ! asm_grafik1.dll,createpen
DEF lineto(3) ! asm_grafik1.dll,lineto
DEF movetoex(3) ! asm_grafik1.dll,movetoex
DEF pset(4) ! asm_grafik1.dll,pset
Declare hwin&,x&,y&,f&,hdcwin&,pstyle&,pwidth&,pcolor&,mypen&,test%
Window 20,20-200,200
hWin& = Create(Window, %hWnd, Test, 250, 20, 650,500)
hDCWin& = ~GetWindowDC(hWin&)
pstyle&=3
pwidth&=0
pcolor&=$ff0000
mypen&=createpen(pstyle&,pwidth&,pcolor&)
~SelectObject( hdcwin&, mypen& )
test%=&GetTickCount

whileloop 1,10000,1

    x&=200
    y&=200
    movetoex(hdcwin&,x&,y&)
    x&=400
    y&=40
    lineto(hdcwin&,x&,y&)

endwhile

Print Str$(Int(&GetTickCount-test%))
WaitInput
Fin

sans Dll:
KompilierenMarqueSéparation
 $MAKE CLEI
 $H Windows.ph
Déclarer hwin&,x&,y&,f&,hdcwin&,pstyle&,pwidth&,pcolor&,mypen&,test%
Fenêtre 20,20-200,200
hWin& = Créer(Fenêtre, %hWnd, Test, 250, 20, 650,500)
hDCWin& = ~GetWindowDC(hWin&)

Si 0

    AsmStart createpen

        Paramètres pstyle&,pwidth&,pcolor&
        invoke CreatePen,para1,para2,para3

    AsmEnd(mypen&)

    AsmStart movetoex

        Paramètres hdcwin&,x&,y&
        invoke MoveToEx,para1,para2,para3,0

    AsmEnd

    AsmStart pset

        Paramètres hdcwin&,x&,y&,f&
        invoke SetPixel,para1,para2,para3,para4

    AsmEnd

    AsmStart lineto

        Paramètres hdcwin&,x&,y&
        invoke LineTo,para1,para2,para3

    AsmEnd

EndIf

pstyle&=3
pwidth&=0
pcolor&=$ff0000
mypen&=Call(GetXpiaProcAddress(XpiaModule&,createpen),pstyle&,pwidth&,pcolor&)
~SelectObject( hdcwin&, mypen& )
test%=&GetTickCount

whileloop 1,10000,1

    x&=200
    y&=200
    Call(GetXpiaProcAddress(XpiaModule&,movetoex),hdcwin&,x&,y&)
    x&=400
    y&=40
    Call(GetXpiaProcAddress(XpiaModule&,lineto),hdcwin&,x&,y&)

endwhile

Imprimer Str$(Int(&GetTickCount-test%))
WaitInput
Fin

mfg

2 kB
Hochgeladen:15.05.2009
Downloadcounter186
Download
 
15.05.2009  
 




Sebastian
König
Ist cela maintenant seulement un Beispiel ou bien pourquoi kapselt du cet einfachen API-Aufrufe dans DLL-Funktionen? je mon, un simple

DEF SetPixel(3) !GDI32,SetPixel
usw.

mais est sûrement qui effizienteste Solution...

MfG

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
15.05.2009  
 



mais est sûrement qui effizienteste Solution...

Wird vom Tool, welches chez Xpia4 avec dabei ist, so angefertigt pour den Aufruf.

Ist cela maintenant seulement un Beispiel ou bien pourquoi kapselt du cet einfachen API-Aufrufe dans DLL-Funktionen?

qui Routinen wurden la fois avec invoke sur Xpia4 aufgerufen. Ist un Funktionstest.

mfg
 
15.05.2009  
 




Frank
Abbing

mais est sûrement qui effizienteste Solution...


qui effizienteste Solution ist wohl, aussi qui Boucle dans ASM trop programmieren.
 
16.05.2009  
 



qui effizienteste Solution ist wohl, aussi qui Boucle dans ASM trop programmieren.

qui Scheife selber ist avec Profan2Cpp déjà un Blitz, wohin es oui maintenant wunderbar sur dem Aufruf de Xpia4 fonctionne.

je voulais seulement la fois cela wesentliche Testen.

mfg
 
16.05.2009  
 




Sebastian
König
2peter Bierbach, Beitrag=52377, Zeitpunkt=16.05.2009
qui effizienteste Solution ist wohl, aussi qui Boucle dans ASM trop programmieren.

qui Scheife selber ist avec Profan2Cpp déjà un Blitz, wohin es oui maintenant wunderbar sur dem Aufruf de Xpia4 fonctionne.

je voulais seulement la fois cela wesentliche Testen.


Mir ging es maintenant seulement tout autor, dass on simple API-Funktionen aussi direct avec DEF bzw. Extérieures () verwenden peux - une Kapselung dans une ASM-Block bringt seulement zusätzlichen Overhead avec sich...

MfG

Sebastian
 
Windows XP, XProfan/Profan² 4.5 bis 11
Profan2Cpp-Homepage:  [...] 
Alte Profan²-Seite:  [...] 
16.05.2009  
 



répondre


Topictitle, max. 100 marque.
 

Systemprofile:

ne...aucune Systemprofil angelegt. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

s'il te plaît s'inscrire um une Beitrag trop verfassen.
 

Options du sujet

10.983 Views

Untitledvor 0 min.
funkheld31.08.2023
p.specht14.06.2021
RudiB.15.01.2016
Georg Teles09.01.2016
plus...

Themeninformationen



Admins  |  AGB  |  Applications  |  Auteurs  |  Chat  |  protection des données  |  Télécharger  |  Entrance  |  Aider  |  Merchantportal  |  Empreinte  |  Mart  |  Interfaces  |  SDK  |  Services  |  Jeux  |  cherche  |  Support

un projet aller XProfaner, qui il y a!


Mon XProfan
Privé Nouvelles
Eigenes Ablageforum
Sujets-La liste de voeux
Eigene Posts
Eigene Sujets
Zwischenablage
Annuler
 Deutsch English Français Español Italia
Traductions

protection des données


Wir verwenden Cookies seulement comme Session-Cookies à cause de qui technischen Notwendigkeit et chez uns gibt es aucun Cookies de Drittanbietern.

si du ici sur unsere Webseite klickst ou bien navigierst, stimmst du unserer Erfassung de Informationen dans unseren Cookies sur XProfan.Net trop.

Weitere Informationen trop unseren Cookies et en supplément, comment du qui Kontrolle par-dessus behältst, findest du dans unserer nachfolgenden Datenschutzerklärung.


d'accordDatenschutzerklärung
je voudrais keinen Cookie