mrhx software Switch to Russian
Welcome, Guest
  • Now is Sunday, 2017-07-23, 01:55
  • Use RSS to get the latest news about files.
  • Do you want to register or login?
     
    nanoasm.exe source code ( 505 / 3109 ) [ 2007-08-31, 03:08, Friday ]

    This is the source code of nanoasm compiler (nanoasm.exe) which is able to create win32 PE executables.
    (in C language).


    Download ( 7.3Kb )
    Have you played with this? Be first, rate it:
     
    Comments
    3. 2007-09-01: Alexander G. Karpov ( mrhx ) E-mail Site
    See the source code of nanoasm.exe.
    The compiler (nanoasm.exe) did not find integer 0x90C3C033 in the executable module.
    When I compiled nanoasm.exe, this integer was the start of "int _cdecl Proc(void *GetProcAdr)" function:
    (my array.c file)
    >>>0x33, 0xC0, 0xC3, 0x90<<<, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90, 0x90,
    This integer means "xor eax, eax; ret; nop".

    When the compiler has found this integer, it inserts number "0xE9 XXXXXXXX" into the output code instead of 0x90C3C033. It means "jmp <address, 32bit>".

    I think, the compiler, which is used by you, makes something different.
    You need to know the four bytes which starts Proc function.
    Then you should correct the file "nanoasm_win32.c" by replacing 0x90C3C033 with your number.
    And, I think, it will work after this.

    2. 2007-09-01: fsw
    Hi,
    followed your howto and got it compiled with VC6 and Dev-C++.
    But when I compile test.nasm with it there is the error:

    nanoasm compiler for win32
    version 1.0
    (C) 2007, Alexander G. Karpov a.k.a. mrhx
    visit author`s website: http://mrhx.narod.ru/

    open the file "test.nasm"...
    ok
    allocate memory 7288 bytes...
    ok
    reading the file 7287 bytes...
    ok
    check the length of output data...
    output length is 189
    allocate memory for output buffer 189 bytes...
    ok
    compile the program...
    ok
    mode: exe...
    create or open output file "test.exe"...
    ok
    old size: image 24576 code 2560
    internal data error #1

    1. 2007-08-31: Alexander G. Karpov ( mrhx ) E-mail Site
    How to build:
    - make executable module.
    - then use bin2array utility to convert module.exe to array.c.
    - then make the compiler.

  • Which programming language(s) do you mostly use?
    [ Results · Polls archive ]
    Total of answers: 624

    Sections
    · mInstaller
    · VISG
    · VISG plugins
    · Other projects
    · Sources

    Friends
    · ProTools
    · Free file hosting

    Total online: 1
    Guests: 1
    Users: 0
     © 2007-2008 Alexander G. Karpov a.k.a. mrhx