flat assembler
Message board for the users of flat assembler.

Index > Windows > Need Help! How to do this on fasm?

Author
Thread Post new topic Reply to topic
i.like.dirt



Joined: 03 Nov 2010
Posts: 1
i.like.dirt 18 Mar 2011, 12:19
Hello everyone. I'm new to fasm and could you please help me, how to do this in fasm?
Code:
EXEINFO struct
   Type            WORD ?
      Description     WORD ?
EXEINFO ends

EXE       struct
      Title           db 30 dup (?)
       Length          dd ?
        Exclude         db ?
        Data            dd ?
        Section         dd ?
        Info            EXEINFO <>
EXE ends

.data
szDescription      db "Good exe file!",0
     
GETEXE EXE <"Prog Name",exe_data_size,0FFh,offset exe_data,SECTION_ENTRYP OR SECTION_NOTSEARCH,<EXECUTABLE,offset szDescription>> 

exe_data \
db 061h, 0BEh, 0EBh, 0FFh, 007h, 0FFh, 047h, 0BEh
db 075h, 007h
exe_data_size  equ $ - offset exe_data    


Thanks.
Post 18 Mar 2011, 12:19
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 18 Mar 2011, 22:24
Looks like

Code:

struct  EXEINFO
          Type           dw ?
          Desctription dd ? ; pointer to string ?
ends          

struct EXE
        Title              db 30 dup (?)  ; can also be a pointer (dword)
        Length          dd ?
        Exclude         db ?                
        Data             dd ?
        Section         dd ?
        Info            EXEINFO 
ends 

section '.data' data readable writable

szDescription db 'Good exe file!',0

exe_data db 061h, 0BEh, 0BEh, 0FFh, 007h, 0FFh, 047h, 0BEh
              db 075h, 007h

exe_data_size equ $ - exe_data


    
Post 18 Mar 2011, 22:24
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.