flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
marciano 08 Jun 2005, 02:54
Put a null character after every text string, as follows:
Code: section '.data' data readable writeable meemul db 'c:\fasmw161\meosemul\meosemul.exe',0 progpath db 'c:\fasmw161\meosemul\guitest.bin',0 Good luck ![]() EDIT: no habia visto que eras de Argentina ![]() |
|||
![]() |
|
DC740 08 Jun 2005, 17:02
thanx for the reply but it didn't work... now i'm frustated
![]() jeje espero q alguien encuentre la solucion, ya me estoy volviendo loco jajaj byes|salu2 |
|||
![]() |
|
Nikolay Petrov 08 Jun 2005, 18:30
Read a carefully WinAPI manual. In principle it must to work, but is possible and can't. I can't a divine.
|
|||
![]() |
|
DC740 08 Jun 2005, 21:50
i have read the windows api reference, i can paste it complete, but i think it's not necesary, anyway i'll post the api declaration
the most strange thing is that i have worked with this api before, making a program in C and i didn't have any problem, but now in asm, the things are getting a little hard The CreateProcess function creates a new process and its primary thread. The new process executes the specified executable file. BOOL CreateProcess( LPCTSTR lpApplicationName, // pointer to name of executable module LPTSTR lpCommandLine, // pointer to command line string LPSECURITY_ATTRIBUTES lpProcessAttributes, // pointer to process security attributes LPSECURITY_ATTRIBUTES lpThreadAttributes, // pointer to thread security attributes BOOL bInheritHandles, // handle inheritance flag DWORD dwCreationFlags, // creation flags LPVOID lpEnvironment, // pointer to new environment block LPCTSTR lpCurrentDirectory, // pointer to current directory name LPSTARTUPINFO lpStartupInfo, // pointer to STARTUPINFO LPPROCESS_INFORMATION lpProcessInformation // pointer to PROCESS_INFORMATION ); |
|||
![]() |
|
shoorick 09 Jun 2005, 06:30
hi! it really does not work and i do not know why, but if you want exactly just run look for these two working variants:
Code: format PE GUI entry start include '%fasminc%\win32a.inc' section '.data' data readable writeable meemul db 'c:\fasm\fasmw.exe',0 progpath db 'c:\fasm\beer.asm',0 _open db 'open',0 _cmd db 'c:\fasm\fasmw.exe '; no zero here - continued by cmdline! cmdline db 'c:\fasm\beer.asm',0 section '.idata' import data readable writeable library kernel,'KERNEL32.DLL',shell,'SHELL32.DLL' import kernel,CreateProcess,'CreateProcessA',\ ExitProcess,'ExitProcess' import shell,\ ShellExecute,'ShellExecuteA' section '.udata' readable writeable sinfo STARTUPINFO pinfo PROCESS_INFORMATION section '.code' code readable executable start: invoke ShellExecute,0,_open,meemul,progpath,0,SW_SHOWDEFAULT ;invoke CreateProcess,meemul,progpath,NULL,NULL,FALSE,NORMAL_PRIORITY_CLASS,NULL,NULL,sinfo,pinfo invoke CreateProcess,0,_cmd,NULL,NULL,FALSE,NORMAL_PRIORITY_CLASS,NULL,NULL,sinfo,pinfo invoke ExitProcess,0 regards! |
|||
![]() |
|
DC740 09 Jun 2005, 16:54
thanxxxxxxxxxxxxxxx now it's working,
![]() ![]() ![]() ![]() |
|||
![]() |
|
Madis731 10 Jun 2005, 09:44
Wouldn't it be easier to tell Mike that MeOSEmulator should associate itself with MenuetOS header. I tried your code - it works, but doesn't give me any advantage...
A) 1. I compile ASM->MeOS 2. I drag&drop this to MeOSEmul.exe B) 1. I compile ASM->MeOS 2. I run your program that in turn runs my MeOS binary with MeOSEmul I tried messing with registry but I can't get the emulator to accept my parameters and FASM won't run .bin by default ![]() |
|||
![]() |
|
DC740 10 Jun 2005, 17:17
hello madis
![]() the api is working, but i don't know how to make it work with the path_buffer variable (inside fasmw.asm), i think that path_buffer doesn't finish with a null byte (0) and that is causing my modifications to not work, now i'm trying to find the way to work with strings to learn to solve my problem, if you have any documentation about that i would be very grateful... it should be easy for an experienced programmer but i started last week and it's my first program... well... is not my program, but you know what i mean... i hope this will be useful... thanx MenuetOS rulez |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.