I have this file I wan't to assemble and link:
If I use this syntax, I can't make this file
work right:
ml /c /Cp /coff scrshfun.asm
link /subsystem:windows scrshfun.obj
what do I miss here :confused:
If I use this syntax, I can't make this file
work right:
ml /c /Cp /coff scrshfun.asm
link /subsystem:windows scrshfun.obj
what do I miss here :confused:
I had no problems assembling and linking the program and I used the same commands you used. The program crashed when I ran it though. I looked at the code and I saw that you had tried to modify data in the code section so I set the code section to writeable. The program didn't crash then but my system froze. What exactly is the program supposed to do?
@echo off
if exist %1.obj del %1.obj
if exist %1.exe del %1.exe
\masm32\bin\ml /c /coff %1.asm
if errorlevel 1 goto errasm
if not exist rsrc.obj goto nores
\masm32\bin\Link /SUBSYSTEM:WINDOWS %1.obj rsrc.obj
q editors default assembles this well
you are writiing to code section
mov wcx.hCursor, eax
make the code section writable runs the proggie and it seems freezing
so i changed the show windows param to sw_showmormal
004010E5 PUSH 1 ; /ShowState = SW_SHOWNORMAL
004010E7 PUSH EAX ; |hWnd = NULL
004010E8 CALL 00401212 ; \ShowWindow
instead of your sw_maximsed
and it runs well shows the desktop
did you want to make the proggie look like its freezing the system
whats the puprose
btw with sw_maximised it looks exactly like desktop and looks like its frozen the hell only ctrl+alt+del and getting the taskmgr to end task restores original desktop
if exist %1.obj del %1.obj
if exist %1.exe del %1.exe
\masm32\bin\ml /c /coff %1.asm
if errorlevel 1 goto errasm
if not exist rsrc.obj goto nores
\masm32\bin\Link /SUBSYSTEM:WINDOWS %1.obj rsrc.obj
q editors default assembles this well
you are writiing to code section
mov wcx.hCursor, eax
make the code section writable runs the proggie and it seems freezing
so i changed the show windows param to sw_showmormal
004010E5 PUSH 1 ; /ShowState = SW_SHOWNORMAL
004010E7 PUSH EAX ; |hWnd = NULL
004010E8 CALL 00401212 ; \ShowWindow
instead of your sw_maximsed
and it runs well shows the desktop
did you want to make the proggie look like its freezing the system
whats the puprose
btw with sw_maximised it looks exactly like desktop and looks like its frozen the hell only ctrl+alt+del and getting the taskmgr to end task restores original desktop
Hi guys
Yeah, it's supposed to fool people to think their computer is freezing,
by taking a snapshot of the desktop, and showing it in a window.
I have the taking the program from this link:
http://www.asmcommunity.net/board/index.php?topic=14078&highlight=fate+worse
by arkane
Hi Odyssey :grin: :grin: sorry for laughing, but ya see - you made it work as it should :alright:
Hi bluffer
How do I make the code section writeable:confused:
Yeah, it's supposed to fool people to think their computer is freezing,
by taking a snapshot of the desktop, and showing it in a window.
I have the taking the program from this link:
http://www.asmcommunity.net/board/index.php?topic=14078&highlight=fate+worse
by arkane
The program didn't crash then but my system froze.
Hi Odyssey :grin: :grin: sorry for laughing, but ya see - you made it work as it should :alright:
Hi bluffer
make the code section writable runs the proggie
How do I make the code section writeable:confused:
The Shark,
LOL :grin:
I tried it again. I pressed alt+f4 thus time instead of killing the process :grin:.
To set the code section to writeable.
link /subsystem:windows /section:.text,ERW scrshfun.obj
LOL :grin:
I tried it again. I pressed alt+f4 thus time instead of killing the process :grin:.
To set the code section to writeable.
link /subsystem:windows /section:.text,ERW scrshfun.obj
Oh, I think I found it:
I simply move this code from the .CODE section, and into .DATA section.
I can NEVER make the codes look nice in here @#$&#"...
I simply move this code from the .CODE section, and into .DATA section.
clwn DB "scrshfun",0
trayWnd DB "Shell_TrayWnd", 0
wcx WNDCLASSEX<SIZEOF WNDCLASSEX, CS_BYTEALIGNWINDOW, OFFSET MainProc,\
NULL, NULL, NULL, NULL, NULL, NULL, NULL, OFFSET clwn, NULL>
:)
I can NEVER make the codes look nice in here @#$&#"...
hi odyssey tx for tellin how to do it while linking
i used olly to load the exe and changed its section headers to e0000020 and saved it back
rightclickcpupane --->view--->executablefile --->ctrl+g (0) --rightclick --->special peheader--->scroll to section header--->ctrl+e edit --->right click --->save file
oops too much work it seems to your /section:.text ,ERW
i used olly to load the exe and changed its section headers to e0000020 and saved it back
rightclickcpupane --->view--->executablefile --->ctrl+g (0) --rightclick --->special peheader--->scroll to section header--->ctrl+e edit --->right click --->save file
oops too much work it seems to your /section:.text ,ERW
bluffer,
no problem :grin:
The Shark,
When you're posting code you can use the "code" and "/code" tags. The tags should be enclosed by brackets "[]".
no problem :grin:
The Shark,
When you're posting code you can use the "code" and "/code" tags. The tags should be enclosed by brackets "[]".
Which way is the best:
to move the code, from the .CODE section into .DATA section,
or
to make the code section writeable at link time:
link /subsystem:windows /section:.text,ERW scrshfun.obj
maybe there is no best way...:)
to move the code, from the .CODE section into .DATA section,
or
to make the code section writeable at link time:
link /subsystem:windows /section:.text,ERW scrshfun.obj
clwn DB "scrshfun",0
trayWnd DB "Shell_TrayWnd", 0
wcx WNDCLASSEX <SIZEOF WNDCLASSEX, CS_BYTEALIGNWINDOW, OFFSET MainProc,\
NULL, NULL, NULL, NULL, NULL, NULL, NULL, OFFSET clwn, NULL
maybe there is no best way...:)
I think you should keep your data in the data section unless you have a special reason for having it in the code section. That's the way it was meant to be. :)
You're right,
thanks Odyssey:alright:
thanks Odyssey:alright: