flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Imagist 31 Jul 2004, 23:51
I've had this problem with a directory value in my computer going bad and looking for a file called remind.exe to run that isn't there every time I boot up my computer. I tried everything I knew how to do short of reformatting my hard drive to eradicate the problem, nothing helped. So I wrote a little .exe using FASM to replace the missing .exe so that I don't have to see the error message every time I reboot. I ran into a few problems along the way, but it's all worked out now. Here's the source code. It's great fun: a program that does nothing!
Code: format PE GUI 4.0 entry start include '%fasminc%\win32a.inc' section '.code' code readable executable start: jmp exit exit: invoke ExitProcess,0 section '.idata' import data readable writeable library kernel,'KERNEL32.DLL' import kernel,\ ExitProcess,'ExitProcess' However, this is a waste of space, so I would like to know if anybody could help me streamline this code a bit.
_________________ Many things are possible. Few things are likely. |
|||||||||||
![]() |
|
Tomasz Grysztar 31 Jul 2004, 23:55
Code: format PE GUI ret |
|||
![]() |
|
Imagist 01 Aug 2004, 01:37
I'm not sure what you mean. Do you mean that is all the code necessary?
_________________ Many things are possible. Few things are likely. |
|||
![]() |
|
Imagist 01 Aug 2004, 03:36
Ah, I see. Very nice.
What exactly does ret do? |
|||
![]() |
|
vid 01 Aug 2004, 09:14
windows pushes return address on stack before starting you app. ret pops this address from stack and jumps to it.
|
|||
![]() |
|
Vortex 02 Aug 2004, 19:45
The equivalent in 16-bit DOS is a COM file with a size of 2 bytes.
Code: org 100h use16 int 20h _________________ Code it... That's all... |
|||
![]() |
|
JohnFound 02 Aug 2004, 20:17
Vortex wrote: The equivalent in 16-bit DOS is a COM file with a size of 2 bytes. One byte, the same as in Windows: ![]() Code:
org $100
ret
|
|||
![]() |
|
Imagist 03 Aug 2004, 00:56
Quote: And as I remember, remind.exe was something that the Borland C++ 5 point something put on the system to... remind to register with Borland. Yes! That is how I got it! I will look in win.ini _________________ Many things are possible. Few things are likely. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.