English
Assembler Forum

new Asm-Demo's.

 

Frank
Abbing
Hi,

ought to the a or others a interessanten Profan-Assembler code write, werd I the naturally gladly with The the XPIA pkg take in.
 
07/15/04  
 




Michael
Dell
!!!deference!!! deletes too Schreibgeschützte Files!
CompileMarkSeparation
 {$cliq}
Declare DF_Erg&,DF_FileName$
Clear DF_Erg&,DF_FileName$
DF_FileName$ = "E:EIGENE DATEIENTEST.DAT"  Bitte "TEST.DAT" erzeugen und Pfad Anpassen!!!

ASMSTART DelFile

    PARAMETERS Addr(DF_FileName$)
    Invoke exist, para1
    JZ Ende
    Invoke SetFileAttributesA, para1, 32
    Invoke SetFileAttributesA, para1, 128
    Invoke DeleteFileA, para1
    Ende:
    Return DF_erg&
    ; Rückgabewerte
    ; 1 = Datei gelöscht
    ; 0 = Datei nicht gelöscht

ASMEND

Cls
Print "Datei " + DF_FileName$ + " :  < " + Str$(DF_Erg&) + " >      (0 = nicht gelöscht/1 = gelöscht)"
WaitInput
End
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
10/04/05  
 




Frank
Abbing
class, Michael! in the MASM32.lib stick yet each crowd interesting and helpful functions....
 
10/04/05  
 




Frank
Abbing
here the appeal zweiter Systemdialoge, Color and Font:
CompileMarkSeparation
 {$cliq}
Declare z&,bereich#,afont&
Cls
===========================
Systemdialog Color aufrufen
===========================

AsmStart SysColor

    Parameters %hwnd,%hinstance
    invoke ColorDialog,para1,para2,0
    Return z&

AsmEnd

Print "RGB-Wert = "+Str$(z&)
==========================
Systemdialog Font aufrufen
==========================
Dim bereich#,1024
Clear bereich#

AsmStart SysFont

    Parameters %hwnd,bereich#
    invoke FontDialog,para1,para2,CF_SCREENFONTS or CF_EFFECTS

    .if eax

        invoke CreateFontIndirect,para2

    .endif

    Return afont&

AsmEnd

If afont&

    z&=@Create("Text",%hwnd,"Eine Schriftart wurde ausgewählt.",0,24,320,64)
    SetFont z&,afont&

Else

    Print "Kein Font ausgewählt."

EndIf

WaitInput
Case afont&:DeleteObject afont&
../Function-References/XProfan/end/'>End
 
10/04/05  
 




Michael
Dell
Listet any present fixen drives in a list box on
Motto plainer GEHTS not...
CompileMarkSeparation
 {$cliq}
Declare GD_LB&,GD_Txt&
Cls
GD_LB&  = Create("SortedListBox",%HWnd,"",40,40,200,300)
GD_Txt& = Create("Text",%HWnd,"Gewählt:  ",40,360,200,20)

ASMSTART GetDrives

    PARAMETERS GD_LB&
    Invoke load_drives, para1        ; Listet alle vorhanden "fixen" Laufwerke in einer Listbox auf

ASMEND

WhileNot ((%Key = 2) Or (%MenuItem = -2))

    WaitInput
    SetText GD_Txt&,("Gewählt:  " + GetString$(GD_LB&,GetCurSel(GD_LB&)))

EndWhile

End
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
10/04/05  
 




Michael
Dell
File- copy & File- append

[box:057332201c]deference!!! - XPIA created only whom Source (LAST.ASM & LAST.DEF)
to that produce the DLL becomes MASM32v8.2 SP2 needed![/box:057332201c]
CompileMarkSeparation
 {$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
End
Benötigte additional Includes (Paths adjust!):[box:057332201c]include c:masm32includemsvcrt.inc
include c:masm32macrosmacros.asm
includelib c:masm32libmsvcrt.lib[/box:057332201c]
Korrektur on the: 11.10.05
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
10/09/05  
 



Hello Michael,
sees Yes very interestingly from, your letztes example. The vorigen bestanden Yes mostly only API-Call by macro (invoke). How long have You used, ASM so far To learn, would me Yes auchmal ransetzen ASM To learn. yet Have I always to whom first Erfolgen aborted
 
10/09/05  
 



ASM learn one eigendlich in a only day.

The most important Finessen has one then so after a week on it.

thereafter feilt one only yet on the Style.

ASM is utterly The simplest Language - one must hold only to juggle can.

salvo.
 
10/09/05  
 




Michael
Dell
Right,

is not soo kompliuiert pointed looks. my trouble is sooner, not The often logischer wirkende Syntax of Hochsprachen with the direkteren of Assembler To confuse. on the most lern I from Macros and the Sourcen for Libs.

here Gibts Base- Examples: [...] 

and here The berühmte Interrupt- list of Ralf Brown: [...] 
 
Salu Michael...

Hab zwar krumme Fieß awer dofir e' ecklich Gsicht! 
10/09/05  
 



@M.Dell
not again , Have me already one Assemblerbuch bought, the only on DOS and interrupts eingeht. I have no DOS what about me would like only ASM for 32-bit, means FLAT erlernen. can The Examples of DOS Yes not yet test times.
Gibts whom nothing for 32-bit only. only ne guide for Adressierungsarten and the whole others command
 
10/10/05  
 




Michael
Wodrich
Assembler-guide of guru Iczelion (simply googlen). there's too somewhere a Translation of it in german in the network (ICZTUTES).

often help too The Assembler-Forums moreover.

Best wishes
Michael Wodrich
 
Programmieren, das spannendste Detektivspiel der Welt.
10/10/05  
 



@TS:

32-bit Asm heist still eigendlich nothing moreover as the Handling of:

a) Registern
b) Speicherbereichen
b) Stack
c) Apis

for the Registermanipulation are command How mov add inc dec xor etc. zuständig, for manipulation of Speicherbereichen points one first of all The address the Mems one tab To and manipulating this subsequently over The [seekpos] spelling, for Stack Gibts Push & Pop, and the Apis go by Call called after one The Parameter in umgekehrter Reinfolge on the Stack gepackt has. (The BackVal eachone Api alights in eax].

the wars in large and whole.

then Gibts naturally yet The Labels (for gotos/ jmp & Compareanweisungen) and then comes already the highlevel-Krahm. (Macros / ifs and whiles instead of cmp & cmp)

there Gibts nothing big To learn.

salvo.
 
10/10/05  
 




Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

8.127 Views

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie