flat assembler
Message board for the users of flat assembler.

Index > Linux > SDL program and source code to display a JPG to the screen

Author
Thread Post new topic Reply to topic
Mark Larson



Joined: 04 Nov 2006
Posts: 13
Mark Larson
I made an SDL program that displays a jpg to the screen. It also prints the FPS to the console when the program closes. I run it about 10+ seconds to get accurate timings. You can hit alt-f4 or click on the close box to close it. I modified my PROC32.INC, so I included it so you can get my code to compile correctly. You'll need to install libSDL if you haven't already. I included the file I used to compile it c5. c5 removes some options used by GCC to make it compile really small. You have to use GCC since you I am using libSDL. The image that gets displayed is background.jpg. The source code is image.asm

here's what c5 looks like. It removes a number of gcc libraries so it doesn't compile as large
Code:
fasm image.asm 
gcc -o image -s image.o -nostartfiles -nostdlib -lSDL -lc -lSDL_image
ls -la image 
    


Description:
Download
Filename: image.zip
Filesize: 8.05 KB
Downloaded: 201 Time(s)


_________________
BIOS programmers do it fastest! Wink
Post 10 Nov 2006, 02:51
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-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.