|  | 
|   | 
 | 
| - page 1 - | 
 
  | 
  Frank Abbing | Salut,
  sollte qui une ou bien autre une interessanten Profan-Assembler Code écrivons, werd Je l' naturellement volontiers avec qui cela XPIA paquet aufnehmen. |  
  | 
|   | 
 |  | 
|   | 
 
 
  | 
 | 
 |  | 
|   | 
| - page 1 - | 
 
  | 
  Michael Dell | Dossier- Kopieren  &  Dossier- Anhängen
  [box:057332201c]attention!!! - XPIA erzeugt seulement den Source (LAST.ASM & LAST.DEF) zum erzeugen qui DLL wird MASM32v8.2 SP2 nécessaire![/box:057332201c] KompilierenMarqueSéparation {$Clq}
Declare FC_FileIn$,FC_FileOut$,FC_Erg&,FA_FileIn$,FA_FileOut$,FA_Erg&
FC_FileIn$  = "TEST1.DAT"
FC_FileOut$ = "TEST2.DAT"
FA_FileIn$  = FC_FileIn$
FA_FileOut$ = FC_FileOut$
Cls
Print ("Kopiere " + FC_FileIn$ + " nach " + FC_FileOut$ + ". Bitte Warten...")
ASMSTART fCopy
    Parameters Addr(FC_FileIn$),Addr(FC_FileOut$)
    Return FC_Erg&
    Local fHndl1  :DWORD
    Local fHndl2  :DWORD
    Local InCnt   :DWORD
    Local OutCnt  :DWORD
    Local Count   :DWORD
    Local GesCnt  :DWORD
    Local BuffAdd :DWORD
    Start:
    mov Count, 983040
    mov BuffAdd, alloc(Count)
    invoke exist, para1
    jz Ende
    invoke exist, para2
    jz Weiter1
    invoke SetFileAttributesA, para2, 32
    invoke SetFileAttributesA, para2, 128
    invoke DeleteFileA, para2
    Weiter1:
    mov GesCnt, 0
    mov fHndl1, fopen(para1)
    mov fHndl2, fcreate(para2)
    Weiter2:
    mov GesCnt, fseek(fHndl1,GesCnt,0)
    fseteof fHndl2
    mov InCnt, fread(fHndl1, BuffAdd, Count)
    mov OutCnt, fwrite(fHndl2, BuffAdd, InCnt)
    mov eax, GesCnt
    add eax, InCnt
    mov GesCnt, eax
    mov eax, OutCnt
    sub eax, Count
    jz Weiter2
    fclose fHndl1
    fclose fHndl2
    Ende:
    free BuffAdd
    Xor eax, eax
ASMEnd
Print
Print "Taste..."
WaitKey
Print ("Füge " + FC_FileIn$ + " zu " + FC_FileOut$ + " hinzu. Bitte Warten...")
ASMSTART fApp
    Parameters Addr(FA_FileIn$),Addr(FA_FileOut$)
    Return FA_Erg&
    Local fHndl1  :DWORD
    Local fHndl2  :DWORD
    Local InCnt   :DWORD
    Local OutCnt  :DWORD
    Local Count   :DWORD
    Local GesCnt  :DWORD
    Local GesCnt2 :DWORD
    Local BuffAdd :DWORD
    Start:
    mov Count, 983040
    mov BuffAdd, alloc(Count)
    invoke exist, para1
    jz Ende
    invoke exist, para2
    jz Ende
    mov GesCnt, 0
    mov GesCnt2, 0
    mov fHndl1, fopen(para1)
    mov fHndl2, fopen(para2)
    ;fseteof fHndl2
    mov GesCnt2, fseek(fHndl2,0,FILE_END)
    Weiter2:
    mov GesCnt, fseek(fHndl1,GesCnt,0)
    mov GesCnt2, fseek(fHndl2,GesCnt2,0)
    mov InCnt, fread(fHndl1, BuffAdd, Count)
    mov OutCnt, fwrite(fHndl2, BuffAdd, InCnt)
    mov eax, GesCnt
    add eax, InCnt
    mov GesCnt, eax
    mov eax, GesCnt2
    add eax, OutCnt
    mov GesCnt2, eax
    mov eax, OutCnt
    sub eax, Count
    jz Weiter2
    fclose fHndl1
    fclose fHndl2
    Ende:
    free BuffAdd
    Xor eax, eax
ASMEnd
Print
Print "Taste zum Beenden..."
WaitKey
Fin
 Benötigte zusätzliche Comprend (Pfade Anpassen!):[box:057332201c]include c:masm32includemsvcrt.inc include c:masm32macrosmacros.asm includelib c:masm32libmsvcrt.lib[/box:057332201c] Correction am: 11.10.05 |  
  | 
|   | 
 | Salu Michael...
  Hab zwar krumme Fieß awer dofir e' ecklich Gsicht!   | 09.10.2005  ▲ |  
  | 
|   | 
 
 
  | 
 | 
  | allô Michael, sieht oui très intéressant aus, dein letztes Beispiel. qui vorigen bestanden oui meist seulement API-Aufrufen per Makro (invoke). comment longtemps la hâte Du gebraucht, ASM soweit trop apprendre, serait mich oui auchmal ransetzen ASM trop apprendre. Bisher hab je toujours avant den ersten Erfolgen abgebrochen     |  
  | 
|   | 
 |  | 
|   | 
 
 
  | 
 | 
  | ASM lernt on eigendlich à einem einzigen journée.   
  qui wichtigsten Finessen hat on ensuite so pour einer semaine sur elle.
  après feilt on seulement encore am Stil.
  ASM ist absolu qui einfachste Discours - il faut arrêt seulement jongler peut.   
  Salve. |  
  | 
|   | 
 |  | 
|   | 
 
 
  | 
 | 
  Michael Dell | Richtig,
  is pas soo kompliuiert wies aussieht. mon Problem ist plutôt, pas qui souvent logischer wirkende Syntax de Hochsprachen avec qui direkteren de Assembler trop verwechseln. Am meisten lern je aus Macros et den Sourcen pour qui Libs.
  ici gibts la base- Beispiele:  [...]  
  et ici qui berühmte Interrupt- liste de Ralf Brown:  [...]   |  
  | 
|   | 
 | Salu Michael...
  Hab zwar krumme Fieß awer dofir e' ecklich Gsicht!   | 09.10.2005  ▲ |  
  | 
|   | 
 
 
  | 
 | 
  | @M.Dell pas encore    , hab mir déjà un Assemblerbuch gekauft, cela seulement sur DOS et Interrupts eingeht. j'ai ne...aucune DOS et je voudrais seulement ASM pour 32-Bit, alors FLAT erlernen. peux qui Beispiele pour DOS oui encore pas la fois testen. Gibts den rien pour 32-Bit only. seulement ne Anleitung pour qui Adressierungsarten et qui ganzen anderen Befehle    |  
  | 
|   | 
 |  | 
|   | 
 
 
  | 
 | 
  Michael Wodrich | Assembler-Anleitung vom Guru Iczelion (simple googlen). voilà aussi irgendwo une Übersetzung de ihm dans allemande im Netz (ICZTUTES).
  souvent aider aussi qui Assembler-Foren plus.
  belle Grüße Michael Wodrich |  
  | 
|   | 
 | Programmieren, das spannendste Detektivspiel der Welt.  | 10.10.2005  ▲ |  
  | 
|   | 
 
 
  | 
 | 
  | @TS:
  32-Bit Asm heist doch eigendlich nix plus comme cela Handling de:
  a) Registern b) Speicherbereichen b) Stack c) Apis
  Pour qui Registermanipulation sommes Befehle comment mov add inc dec xor etc. zuständig, pour qui Manipulation de Speicherbereichen weist on zunächst qui Adresse des Mems einem Register trop et manipuliert cette anschließend sur qui [seekpos] Schreibweise, pour den Stack gibts Push & Pop, et qui Apis volonté per Call aufgerufen après que on qui paramètre dans umgekehrter Reinfolge sur den Stack emballé hat. (qui BackVal chacun Api landet dans eax].
  cela wars aussi im Großen et Ganzen.
  ensuite gibts naturellement encore qui Labels (pour gotos/ jmp & Compareanweisungen) et ensuite venez aussi déjà qui highlevel-Krahm. (Macros / ifs et whiles statt cmp & cmp)
  là gibts nix grand trop apprendre.
  Salve. |  
  | 
|   | 
 |  | 
|   | 
 
 
  | 
 |  | 
|   | 
| - page 2 - | 
 
  | 
 | 
  | oui c'est ca par-dessus, quoi iF schrieb, brauche je Dokus, sans 16-Bit ballast. Werde quand même fois le dt. TUTS durcharbeiten. Gibt incidemment sous: [...]   ASM werde je déjà créer    |  
  | 
|   | 
 |  | 
|   | 
 
 
  | 
 | 
  Michael Dell | Hi,
  ensuite exposition la fois dans qui MASM32 Dossier FPULIB & M32LIB là gibts viele kleine Sourcen aus den Libs, Beispiele aus dem vivre sozusagen et sans den ganzen 8/16-Bit Balast. |  
  | 
|   | 
 | Salu Michael...
  Hab zwar krumme Fieß awer dofir e' ecklich Gsicht!   | 10.10.2005  ▲ |  
  | 
|   | 
 
 
  | 
 | 
  Frank Abbing | Hi.
  et les dir dans qui XPIA-Anleitrung meinen Crash-Kurs par. là lernste déjà cela wichtigste. |  
  | 
|   | 
 |  | 
|   | 
 
 
  | 
 | 
  Michael Dell | LowWord, HighWord, LowByte & HighByte pour Profan avant v7.x
  ici wird seulement qui DLL erzeugt! KompilierenMarqueSéparation {$q}
Declare IN&,ERG&
ASMSTART lWord
    Parameters IN&
    Return ERG&
    mov ebx,para1
    and ebx,65535
    xor eax,eax
    mov eax,ebx
ASMEND
ASMSTART lByte
    Parameters IN&
    Return ERG&
    mov ebx,para1
    and ebx,255
    xor eax,eax
    mov eax,ebx
    jnz ENDE
    add eax,1
    ENDE:
ASMEND
ASMSTART hWord
    Parameters IN&
    Return ERG&
    mov ebx,para1
    shr ebx,16
    xor eax,eax
    mov eax,ebx
    jnz ENDE2
    sub eax,1
    ENDE2:
ASMEND
ASMSTART hByte
    Parameters IN&
    Return ERG&
    mov ebx,para1
    shr ebx,8
    xor eax,eax
    mov eax,ebx
ASMEND
 |  
  | 
|   | 
 | Salu Michael...
  Hab zwar krumme Fieß awer dofir e' ecklich Gsicht!   | 22.10.2005  ▲ |  
  | 
|   | 
 
 
  | 
 | 
  Michael Dell | Profan- Programme erkennen! (16/32Bit) KompilierenMarqueSéparation***** Start: ISPROFANPROG.DLL *****
 {$q}
Returnwerte:  -2 = Dateiformat wird nicht unterstützt.
-1 = Datei nicht gefunden.
0 = ist kein Profan- Programm.
1 = ist ein Profan- Programm(32Bit).
2 = ist ein Profan- Programm(16Bit).
AsmStart IsProfanProg (Addr(File1$))
    Local IPP_fH1        :DWORD
    Local IPP_Dummy      :DWORD
    Local IPP_Haddr0     :DWORD
    Local IPP_Haddr1     :DWORD
    Local IPP_Buff1      :DWORD
    Local IPP_Erg        :DWORD
    Start:
    mov IPP_Haddr0, 0
    mov IPP_Erg, 0
    invoke exist,para1
    jnz IPP_Weit
    mov IPP_Erg, -1
    jmp Ende
    IPP_Weit:
    invoke SHGetFileInfoA,para1,0,0,0,8192
    .IF eax==51004750        ; Win16
        mov IPP_Haddr1,112
    .ELSEIF eax==67126608    ; Win32
        mov IPP_Haddr1,128
    .ELSE
        mov IPP_Erg, -2
        jmp Ende
    .ENDIF
    mov IPP_Buff1, alloc(11)
    mov IPP_fH1, fopen(para1)
    mov IPP_Dummy, fseek(IPP_fH1,IPP_Haddr1,FILE_BEGIN)
    mov IPP_Dummy, fread(IPP_fH1,addr IPP_Haddr0,4)
    mov IPP_Dummy, fseek(IPP_fH1,IPP_Haddr0,FILE_BEGIN)
    mov IPP_Dummy, fread(IPP_fH1,IPP_Buff1,11)
    invoke lstrcmpiA,SADD(" RGH-PROFAN"),IPP_Buff1
    mov IPP_Dummy, eax
    fclose IPP_fH1
    free IPP_Buff1
    .if IPP_Dummy==0
        mov IPP_Erg, 1
        cmp IPP_Haddr1,112
        jne Ende
        mov IPP_Erg, 2
    .endif
    Ende:
    mov eax, IPP_Erg
AsmEnd (ERG&)
End
***** Ende: ISPROFANPROG.DLL *****
***** Start: Test Programm *****
Def IsProfanProg(1) ! "ISPROFANPROG.DLL","IsProfanProg"    <-- Bitte Anpassen
Declare fName$,Erg1&
Cls
fName$  = "C:\IRGENDWAT\TEST.EXE"                       <-- Bitte Anpassen
Erg1&   = IsProfanProg(Addr(fName$))
Print
Print ("Returnwert: -2 = Dateiformat wird nicht unterstützt.
-1 = Datei nicht gefunden.
0 = ist kein Profan- Programm.
1 = ist ein Profan- Programm(32Bit).
2 = ist ein Profan- Programm(16Bit).
--> " + Str$(Erg1&) + " <--")
waitinput
End
***** Ende: Test Programm *****
 |  
  | 
|   | 
 | Salu Michael...
  Hab zwar krumme Fieß awer dofir e' ecklich Gsicht!   | 01.06.2006  ▲ |  
  | 
|   | 
 
 
  |