News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Trojan horse

Started by sasurfman, April 05, 2008, 05:52:22 AM

Previous topic - Next topic

sasurfman

Quote from: hutch-- on April 05, 2008, 09:41:58 AM
link /?

That worked. File size 2,560 bytes.  Thank you.

I suppose I can safely ignore the "Link: warning LNK4108: /Align specified without /driver or /vxd; image may not run" message.

jj2007

You can safely ignore the warning if you don't intend to write a commercial app for future Windows versions. Although they'll probably never tighten the rules... /align:64 works perfectly on my XP box, with 768 bytes ;-)

hutch--

Interestingly enough they learnt the lesson with the later linkers which will all do 512 byte alignment. Its part of the PE spec so it runs on all versions of 32 bit Windows.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

jj2007

This is not part of the PE specs but still runs smoothly on XP... 704 bytes

.386
    .model flat, stdcall
    .nolist
    option casemap:none

    include \masm32\include\windows.inc
    include \masm32\include\kernel32.inc
    includelib \masm32\lib\kernel32.lib
    include \masm32\include\user32.inc
    includelib \masm32\lib\user32.lib

.code
tx db "Wow", 0
msgtitle db "Align:4", 0

start:
invoke MessageBox, 0, addr tx, addr msgtitle, MB_OK
invoke  ExitProcess,0
end start