Statistics

Members: 1927
News: 293
Web Links: 1
Visitors: 3962704

Who's Online

We have 2 guests online
Damn Vulnerable LinuxDamn Vulnerable Linux (DVL) is a Linux-based (modified Damn Small Linux) tool for IT-Security & IT-Anti- Security and Attack & Defense. [CLICK HERE FOR MORE INFOS! ]

Featured Conference Video

T16-Recon2006-Joe_Stewart-OllyBonE.gif OllyBone - Semi-Automatic Unpacking on IA-32. View the conference video here!
Home arrow About/Disclaimer
OBJECT
User Rating: / 0
PoorBest 
Written by Mammon   


;Summary:       Primitive for defining dynamic objects
;Compatibility: NASM
;Notes:         The basic building block for classes in NASM; part of
;               an ongoing project of mine. Note that .this can be
;               filled with the instance pointer, and additional
;               routines such as .%1 [constructor] and .~  can be added.
        %macro OBJECT 1
                struc %1
                 .this:       resd 1
        %endmacro
        %macro END_OBJECT 0
                endstruc
        %endmacro

    ;_Sample:________________________________________________________________
    ;OBJECT MSGBOX
    ;  .hWnd:        resd 1
    ;  .lpText:      resd 1
    ;  .lpCapt:      resd 1
    ;  .uInt:        resd 1
    ;  .show:        resd 1
    ;END_OBJECT
    ;;MyMBox is a pointer to a location in memory or in an istruc; its members
    ;;are filled in an init routine ['new'] with "show" being "DD _show"
    ;_show:             ;MSGBOX class display routine
    ;        push dword [MyMbox + MSGBOX.uInt]
    ;        push dword [MyMbox + MSGBOX.lpCapt]
    ;        push dword [MyMbox + MSGBOX.lpText]
    ;        push dword [MyMbox + MSGBOX.hWnd]
    ;        call MessageBoxA
    ;        ret
    ;..start:
    ;        call [MyMbox + MSGBOX.show]
    ;        ret