Author Topic: Novelty value 1k exe.  (Read 845 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 5658
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Novelty value 1k exe.
« on: August 23, 2016, 09:59:12 PM »
This is of very little use but it can be done using Pelle's linker and merging the sections.

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

    include \masm32\include64\masm64rt.inc

    .code

    greetings db "Arrrgh, G'day",0
    ttitle db "Small",0

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

entry_point proc

 ;     xor ecx, ecx
 ;     lea rdx, greetings
 ;     lea r8, ttitle
 ;     xor r9d, r9d
 ;     call MessageBox
 ;
 ;     xor rcx, rcx
 ;     call ExitProcess

    invoke MessageBox,0,ADDR greetings,ADDR ttitle,MB_OK
    invoke ExitProcess,0

    ret

entry_point endp

; ¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤

end

Built with the following.

@echo off

set appname=small

del %appname%.obj
del %appname%.exe

\masm32\bin64\ml64.exe /c %appname%.asm

\masm32\bin64\polink.exe /SUBSYSTEM:WINDOWS /MACHINE:X64 /MERGE:.data=.text /ENTRY:entry_point /nologo /LARGEADDRESSAWARE %appname%.obj

dir %appname%.*

pause

hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin: