Execute an executable by my own
Hello everybody !
I want to load an executable in virtual memory by my own, it means
without calling any Windows function like CreateProcess(),
ShellExecute(), ..... Once in memory, I want to execute it by jumping
to its entry point, for example :
DWORD EntryPoint = 0x00400CBE;
I mapped my executable in memory, I moved some piece of code, as said
in the section headers of the PE file, then I jumped, then I crashed.
I traced execution with a debugger, and I noticed that error is due to
an invalid address access, around 50 instructions after t...Executing the executable
Using Microsft Visual Studio C++ 6.0, I have compiled my code and I
need to execute this executable by specifying my input file and my
output file, eg. ./DMDC2 input > output. Input file is a separate
normal file and not a visual C++ file.
"Vikram" <firstname.lastname@example.org> wrote in message
> Using Microsft Visual Studio C++ 6.0, I have compiled my code and I
> need to execute this executable by specifying my input file and my
> output file, eg. ./DMDC2 input > output. Input file is a separate
> normal file...what is fast dynamically linked executable or statically linked executable ?how to decide?
Could someone clarify how could one reduce the size of an executable
code during compile time.
Could one use specific compile time flag with makefile or is it
advisable to go for dynamic linking.
The idea here is that smaller the code size the faster is the code.
Is Dynamically linked executable really faster than a single
executable file which is not linked dynamically.?
Is there any performance measuring metrics on gcc version 3.2.2
> Could someone clarify how could one reduce the size of an executable
> code during compile time.
> Could one use specific compile ti...Assembler code execution
Can someone please tell me how to execute an assembler code. Is
it the normal way of using EXEC PGM=ASMPROG with an appropriate
STEPLIB or is there any other way to execute the code.
I am stating this because when i use an EXEC PGM=ASMPROG with an
appropriate STEPLIB i am getting a U 4038 Abend. I dont know the
exact cause of this abend. Is it that there is a logical glitch
in the code or is there a problem with method of executing the
Also do we need some special libraries to point to ...assemblies within assemblies
I nested an assembly within an assembly and I'm not able to move the
parts in the nested assembly (sliding motion). It acts like it's a
solid part. Is there a way around this?
A nested assembly, or sub-assembly is resolved as either 'rigid' or
'flexible' in the context of the assembly that you've inserted it into.
To allow it's own components to move, right click on the sub-assembly
in the feature manager and select properties, on the right you will
see 2 radio buttons, one flexible, the other rigid.
> A nested assembly, or sub-as...Exception occured While loading dynamically EXE assembly in C++/CLI (Could not load file or assembly ', Version=1.0.3836.39802, Culture=neutral, PublicKeyToken=null' ...)
I am facing an exception in C++/CLI while dynamically loading assembly
which itself an EXE created in C++/CLI managed mode using
Assembly.Load. It successfully loads a dll assembly, but fails to load
EXE assembly and generates following exception:
An unhandled exception of type 'System.IO.FileLoadException' occurred
Could not load file or assembly 'testAssembly, Version=1.0.3836.39802,
Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Attempt to load an unverifiable executable with fixups (IAT with more
than 2 sections or a TLS se...Need to execute an assembly instruction from C
I am implementing an exception handler in vxWorks to issue a warning
whenever unaligned access happens. Unfortunately I just cannot stop as
VxWorks uses unaligned access in a lot of different places and it
becomes virtually useless to stop execution.
I have code in place to detect unaligned access and issue warning. Now
I need to continue executing as if nothing happened. For this I need
to disable alignment fault, execute the same instruction (PC at
fault), reenable it and continue execution.
I need to know how to execute the instruction that created the fault?
I know the PC...Display Messages depending on executing assembly
I have a printf statement in S-Function, like
But i want to display the message depending on the executing assembly language.(English, Japanese, French etc).
How can this be done?
...Problem forging assembly code and executing it
I used to have a program which worked well on x86 but does not work
anymore on x86_64. The problem can be broken down to the following
piece of code:
int main ()
unsigned char code;
memset (code, 0x90, sizeof (code)); /* nop */
code = 0xc3; /* ret */
sub = (void (*)())code;
printf ("returned from sub\n");
The code array contains 31 nop instructions followed by a return
ins...Error Executing Assembler Program from a Stored Procedure
I have created a stored procedure using SPUFI. The stored procedure is
defined to execute an external Assembler routine. There was no error
while creating the stored procedure.
While calling the stored procedure from a Java program I am getting the
Exception: java.sql.SQLException: [IBM][CLI Driver][DB2] SQL0444N
Routine "GETMODDT" (specific name "") is implemented with code in
library or path "", function "" which cannot be accessed. Reason code:
Any help would be greatly appreci...Deviation in execution time of assembly routines on Power5.
I have implemented mathematical functions in Power5's assembly
language. I have a Power5 which is a 1.65 GHz 2 way machine (AIX 5.3).
These assembly routines have to be optimised for performance. I am
using a FORTRAN tool(a simple Timer) for measuring the execution times.
I am facing a problem. There is a difference in execution time of the
routines when run together and separately. Also, there is no
consistency in the execution times when the routines are exeuted on
separate Power5 machines (though the environment and tool is same). Can
anyone help sorting this out?
Ch...Strange error when linking C to assembler in x86-64
I'm playing with x86-64 assembler on a newbie level, using the tools
from VS9. I have these files:
=== foo.asm ==========================================================
END ; End of file.
=== main.c ===========================================================
#include <stdio.h>...how to parse an executable in C and find out if there is any return(RET in assembly) or not
I was wondering if we could parse or do something in the executable(
whose source language was C). How can I use some scripting language
like perl/python to find out the information about the executable ? Is
it possible ?
Also, how does the compiler add inling to the program ? I know that
whenever it sees"inline" in front of the procedure name, it inlines it.
But if we give the -finline options, it inline all the procedures ? How
does it do that ? does it parse ? Is there any good book or article
that I can refer to ? I need to build a small compiler ? Can I build it
Thanks ...Assembling retroforth with a Forth assembler
I have indeed managed to disassemble retroforth to a
source that I can reassemble.
I mean really reassemble. I can put an
XCHG|AX, AX| ( NOP, )
in the first definition and reassemble, and rf still
runs. This shifts all addresses around.
This is a fragment of how the source looks like with all
the accumulated information incorporated:
H_ are the header addresses, where the link points to.
N_ are the name addresses, and X_ are the code addresses
(In this forth execution tokens.)
( 0804,875D ) :H_last dl H_cmove X_last
( 0804,8765 ) :N_last d$ 4 "last"
( 0804,876A )...