flat assembler
Message board for the users of flat assembler.

Index > Windows > Heehee!

Author
Thread Post new topic Reply to topic
Imagist



Joined: 13 Jun 2004
Posts: 114
Location: Pennsylvania (USA)
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.


Description: remind program replacement -- it does nothing!
Download
Filename: PIPELINE.zip
Filesize: 696 Bytes
Downloaded: 388 Time(s)


_________________
Many things are possible. Few things are likely.
Post 31 Jul 2004, 23:51
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8363
Location: Kraków, Poland
Tomasz Grysztar 31 Jul 2004, 23:55
Code:
format PE GUI
ret    
Post 31 Jul 2004, 23:55
View user's profile Send private message Visit poster's website Reply with quote
Imagist



Joined: 13 Jun 2004
Posts: 114
Location: Pennsylvania (USA)
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.
Post 01 Aug 2004, 01:37
View user's profile Send private message Visit poster's website Reply with quote
Imagist



Joined: 13 Jun 2004
Posts: 114
Location: Pennsylvania (USA)
Imagist 01 Aug 2004, 03:36
Ah, I see. Very nice.

What exactly does ret do?
Post 01 Aug 2004, 03:36
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
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.
Post 01 Aug 2004, 09:14
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Rookie



Joined: 21 Aug 2003
Posts: 44
Location: Planet Romania
Rookie 02 Aug 2004, 19:06
This is just a suggestion, as it's been a while since I last saw a certain computer that had the same problem. 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. This was on a computer at school. And, as I remember, remind.exe was mentioned somewhere in win.ini. Took me a while to find it, and hopefully I remember correctly, as this would certainly "streamline" your code down to 0 bytes Very Happy

_________________
This is who I choose to be.
Post 02 Aug 2004, 19:06
View user's profile Send private message Reply with quote
Vortex



Joined: 17 Jun 2003
Posts: 318
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...
Post 02 Aug 2004, 19:45
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
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: Very Happy
Code:
org $100
ret
    
Post 02 Aug 2004, 20:17
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Imagist



Joined: 13 Jun 2004
Posts: 114
Location: Pennsylvania (USA)
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.
Post 03 Aug 2004, 00:56
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.