flat assembler
Message board for the users of flat assembler.

Index > Windows > format MS COFF

Author
Thread Post new topic Reply to topic
Roman



Joined: 21 Apr 2012
Posts: 1766
Roman 18 Jul 2023, 15:01
Fasmw 1.73 how using format MS COFF ? I read docs but less info.
Lets say i have many procs and i want store all in obj file.
Than using obj file in my another project.

And what is linkremove and linkinfo are available only with Microsoft's COFF variant ?
Post 18 Jul 2023, 15:01
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1766
Roman 18 Jul 2023, 16:31
I found this.
How using ?Wind@@YAPADXZ in my fasm project ?
Code:
format MS COFF
;public _WinMainCRTStartup
public _outs
public ?Wind@@YAPADXZ
extrn '__imp__GetLocalTime@4' as GetLocalTime:dword
include 'include\kernel.inc'
include 'include\macro\stdcall.inc'
include 'c:\fasm135\include\lib\strings.mac'
include 'c:\fasm135\include\lib\strings.asm'
section '.text' code readable executable
 ; _WinMainCRTStartup:
proc ?Wind@@YAPADXZ
    enter
    push    ebx esi edi
    invoke   GetLocalTime,Date
    mov      ebx,_outs
    StringCopyHTML ebx,day
    add      ebx,eax
    xor      eax,eax
    mov      ax,[Date.wDay]
    stdcall  IntToString,h4,eax
    StringCopyHTML ebx,h4
    add      ebx,eax
    StringCopyHTML ebx,mon
    add      ebx,eax
    xor      eax,eax
    mov      ax,[Date.wMonth]
    stdcall  IntToString,h4,eax
    StringCopyHTML ebx,h4
    add      ebx,eax
          StringCopyHTML ebx,year
    add      ebx,eax
    xor      eax,eax
    mov      ax,[Date.wYear]
    stdcall  IntToString,h4,eax
    StringCopyHTML ebx,h4
    add      ebx,eax
    mov      eax,_outs
    pop edi esi ebx
    return
section '.data' data readable writeable
  h4    db 'Info',0
  Date SYSTEMTIME
  day db 'Day:',0
  mon db ' Month:',0
  year db ' Year:',0
  _outs: times 30 db 0
    
Post 18 Jul 2023, 16:31
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.