Chat on IRC |
Writting a screen saver in ASM or QBASIC?
Posted by AnyoneEB [send private reply] at July 23, 2002, 12:48:38 PM
I wrote a "screen saver" program in x86 Asmbelay (compling with TASM). I was wondering if anyone knew how to modify it so that Windows will reconize it as a valid screen saver. I found some sites that tell you how to do it in Delphi and VB, but not ASM. If you know how to write one in QBASIC that's fine too because I can call the ASM one with the SHELL command.
Delphi screensaver site: http://www.mindspring.com/~cityzoo/scrnsavr.html VB screen saver site: http://members.aol.com/danp600/vbscrnsvr.html
Posted by CViper [send private reply] at July 23, 2002, 01:12:27 PM
Assuming you got all the callbacks and stuff right, just rename the .exe to .scr and drop it into the windows directory...
Posted by AnyoneEB [send private reply] at July 23, 2002, 06:11:58 PM
I already tried just renaming it and putting it in the windows directory, didn't work. The Delphi website gives a list of what the screen saver must do:
"[1.] maintain optional settings [2.] provide a description of itself [3.] distinguish between active mode and configuration mode [4.] disallow multiple copies of itself to run [5.] exit when the user presses a key or moves the mouse" (I added #'s) I can only do #5 (which is rather simple). I know QB has some way to parse command line inputs, but I don't know how to use it (I'll look it up so that's not a problem). I don't know how to make only one copy of a program be run. Also, I need to have the program have a discription of itself.
Posted by Neumann [send private reply] at July 23, 2002, 06:17:41 PM
There are a lot of things in that list that you won't be able to do in QB nor in DOS ASM. Screen-savers in Windows needs Win32 functions in order to be correctly integrated in the system.
In the other hand, perhaps you could write a short program that handled the configuration, and other exclusive Win32 function that launches your DOS executable when it gets executed for "screen-saving".
Posted by AnyoneEB [send private reply] at July 23, 2002, 06:59:48 PM
Thanks, unforuately I don't know any Win32 languages :(. I use Java and I'm pretty sure it wouldn't support that.
I actually found a program that's supposed to make .exe's into .scr's (adding all the extra stuff), but it didn't like my .exe's. Nevermind, I played around with the program a bit more and made a screen saver with it.
Posted by DragonWolf [send private reply] at July 26, 2002, 05:25:30 AM
Someone could make a c/c++ program that deals with the function calls for you, and invokes your Qbasic file.
Posted by DragonWolf [send private reply] at July 26, 2002, 08:47:48 AM
What version of windows are you using?
Posted by AnyoneEB [send private reply] at July 26, 2002, 11:18:57 AM
I'm using XP pro corp, but I got the exe-to-scr program to work, if you want the screen saver it's on my website http://anyoneebgames.tk/ (named One's and Zero's Screen Saver)
Posted by CodeRed [send private reply] at July 26, 2002, 12:29:58 PM
It's windows programming, you cannot do it in QBASIC
Posted by Zandalf [send private reply] at July 26, 2002, 06:24:19 PM
you can do inline ASM in C and then just do some simple API commands to cover the other commands :-D
of course, that involves learning those "simple" API calls :-p
Register as a new user | ||||||||||||