i want to make a simple program to call a gif file.. example i made a birdflying.gif .. i want it to appear on the screen like it was flying on my screen for a certain period of time.. but dunno how.. :( need help.. i really need help
Posted on 2004-09-10 01:30:22 by kraven
i think you really need to read many articles and books then.
Posted on 2004-09-10 10:40:25 by lifewire
but is calling an external file possible in the first place? im actually new to assembly.. where just on chapter 6 of our book in assembly :P
Posted on 2004-09-11 07:31:32 by kraven
There are 3 ways to execute a file:
- it's a dll, so we load it using an API, find by name where's the code we need, and then using a "call" instruction
- it is an .exe , we use CreateProcess to start the application
- it's any file, we use ShellExecute to open the file your Windows Explorer would have done.
Now, the .gif is neither dll nor exe, so it can be launched the 3rd way. But when you click on the file it doesn't float and stuff - you just get IE or other software display it in their window. So, it's clear you don't need to "call" this gif.
What you need is to make an app that gets the gif data, decodes it into a bitmap, and then using drawing API displays it on the screen. If you want animation, then you'll have to use a timer, and a little more complicated code to draw the picture on screen (if you don't want it making the screen "dirty").

The book you mentioned is probably AOA, it teaches 16-bit asm - just the basic stuff. What you need is the ability to use Win32 API, which you can get with the excellent tutorials by Iczelion. Fortunately gif decoding procs have been already included in the masm8 package, so you have only around 50 lines of code to make :)
But first- get through Iczelion's tutes
Posted on 2004-09-11 07:53:13 by Ultrano