SDL in ASM

Hello SDL Users,

I am a Assembler geek, and this is the first time that I want to code something Graphical. So, I took SDL.dll. Ive read the Export Table and I had a look at the SDL Library Documentation.

The problem is, the Library Documentation is completly written for C++ and I have not really an idea what he retruns.
So, well is there anyone who is known with Assembler in SDL?
What does it return in wich registers?

Well, thanks a lot…
I hope there is a ASM Geek there who wants to help me.

Thank you alot,
and Kind Regards,
Robin Vossen_________________________________________________________________
Doe de quiz, upload je foto en download gratis jouw topsporter Wink!
http://yourinnerathlete.windowslive.com?locale=nl-nl&ocid=TXT_TAGLM_WLYIA_whichathlete_nl

Hi,

I’m sorry to be so blunt, but this is the 21st century!

I love assembler, used it on tons of embedded systems (6809, Z80s, 6502 etc etc) but…man it’s just so much hassle
these days. So much so I just wrote a C system for all the above processors. Performance isn’t as good but hey,
it takes 1/10th the time to code.

SDL is meant to be cross-platform and anything you write in asm, as you well know, isn’t exactly suitable for porting
onto other hardware.

I would strongly avoid it. Of course, if you want to write a super-fast blitter with your asm skills, then go right ahead :slight_smile:

Ed> ----- Original Message -----

From: robin-vossen@hotmail.com (Robin Vossen)
To: sdl at lists.libsdl.org
Sent: Wednesday, 27 August, 2008 10:53:09 AM
Subject: [SDL] SDL in ASM

Hello SDL Users,

I am a Assembler geek, and this is the first time that I want to code something Graphical. So, I took SDL.dll. Ive read the Export Table and I had a look at the SDL Library Documentation.

The problem is, the Library Documentation is completly written for C++ and I have not really an idea what he retruns.

So, well is there anyone who is known with Assembler in SDL?
What does it return in wich registers?

Well, thanks a lot…
I hope there is a ASM Geek there who wants to help me.

Thank you alot,
and Kind Regards,
Robin Vossen


Lees jij al je Hotmail op je mobiel? Probeer het nu!

Send instant messages to your online friends http://uk.messenger.yahoo.com

SDL is not made for performance, at least for what I know, and I’m not speaking of the next release (1.3).

So coding a program in assembly and making SDL calls seems weird to me.
Why not code your own blit routines instead, directly in assembly …
or use something like SVGA lib maybe (http://www.svgalib.org/)

Regards
Julien

— En date de?: Mer 27.8.08, Robin Vossen a ?crit?:de: Robin Vossen
Objet: [SDL] SDL in ASM
?: sdl at lists.libsdl.org
Date: Mercredi 27 Ao?t 2008, 11h53

#yiv534603091 .hmmessage P
{
margin:0px;padding:0px;}
#yiv534603091 {
FONT-SIZE:10pt;FONT-FAMILY:Tahoma;}

Hello SDL Users,

?

?

I am a Assembler geek, and this is the first time that I want to code something Graphical. So, I took SDL.dll. Ive read the Export Table and I had a look at the SDL Library Documentation.

?

The problem is, the Library Documentation is completly written for C++ and I have not really an idea what he retruns.

So, well is there anyone who is known with Assembler in SDL?

What does it return in wich registers?

?

Well, thanks a lot…

I hope there is a ASM Geek there who wants to help me.

?

Thank you alot,

and Kind Regards,

Robin Vossen

Lees jij al je Hotmail op je mobiel? Probeer het nu!


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

  _____________________________________________________________________________ 

Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr

Under this two links you will find explenation of calling conventions.

http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/C-Calling-Convention.html
http://gcc.gnu.org/onlinedocs/gnat_ugn_unw/Stdcall-Calling-Convention.html#Stdcall-Calling-Convention

Regards
MarunOn Wed, Aug 27, 2008 at 12:56 PM, julien CLEMENT wrote:

SDL is not made for performance, at least for what I know, and I’m not
speaking of the next release (1.3).

So coding a program in assembly and making SDL calls seems weird to me.
Why not code your own blit routines instead, directly in assembly …
or use something like SVGA lib maybe (http://www.svgalib.org/)

Regards
Julien

— En date de : Mer 27.8.08, Robin Vossen a
?crit :

De: Robin Vossen
Objet: [SDL] SDL in ASM
?: sdl at lists.libsdl.org
Date: Mercredi 27 Ao?t 2008, 11h53

Hello SDL Users,

I am a Assembler geek, and this is the first time that I want to code
something Graphical. So, I took SDL.dll. Ive read the Export Table and I had
a look at the SDL Library Documentation.

The problem is, the Library Documentation is completly written for C++ and I
have not really an idea what he retruns.

So, well is there anyone who is known with Assembler in SDL?
What does it return in wich registers?

Well, thanks a lot…
I hope there is a ASM Geek there who wants to help me.

Thank you alot,
and Kind Regards,
Robin Vossen


Lees jij al je Hotmail op je mobiel? Probeer het nu!


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Envoy? avec Yahoo! Mail.
Une boite mail plus intelligente.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Here is a very small example I wrote some time ago in x86 gnu asm :
http://icps.u-strasbg.fr/~marchesin/sdl/sdl_asm.tgz
This works on linux, not sure about windows though…

StephaneOn Wed, Aug 27, 2008 at 11:53 AM, Robin Vossen wrote:

Hello SDL Users,

I am a Assembler geek, and this is the first time that I want to code
something Graphical. So, I took SDL.dll. Ive read the Export Table and I had
a look at the SDL Library Documentation.

The problem is, the Library Documentation is completly written for C++ and I
have not really an idea what he retruns.

So, well is there anyone who is known with Assembler in SDL?
What does it return in wich registers?

Well, thanks a lot…
I hope there is a ASM Geek there who wants to help me.

Hello all again,

First I have to say… Sorry If I do this wrong. I am not really used to MailingLists.
I prefer forums. So I hope I do send this message how its supposed to.

I did read all your messages and I am really happy with all of them.

@Stephane
Thank you a lot, I changed your code in Win32 NASM assembler and it works great :slight_smile:

@Ed
The reason that I code in ASM is a bit embarrassing. I don’t understand how the Linking Process and the Including process works.
For some reason I can never manage to compile it complety. And how after some training I think I understand it. But well I also still want to Polish my Assembler skills.
Since I am not really in the Graphical Coding, I am more into Security Research. I do a lot of Code Reversing. And I am learning to write Shellcode.
Thats why I code Asm in the first place. I just want to have a bit more experience in it. And I wanted to use SDL as training Library :wink:

@Marun

Thank you, that also helped some =)

@Julien
I am going to have a look into that.
I love the idea of VGAlib since well it looks cool =)
But as I am trying to do Win32 ASM. I cant use it :frowning:

I think I am going to play with the Framebuffer thing of ASM later aswell.
The int10h system.

@All,
Well thanks a lot. Ive got a Window now and I am trying to load a Bitmap in it at this very moment.
I found out that the SDL_loadBMP is not a Function in the DLL. So well I am having so much fun playing with this. ^^

Well kind Regards,
Robin_________________________________________________________________
Doe de quiz, upload je foto en download gratis jouw topsporter Wink!
http://yourinnerathlete.windowslive.com?locale=nl-nl&ocid=TXT_TAGLM_WLYIA_whichathlete_nl

Hello !

The computer industry still needs people who are able
to code in ASM, so keep on doing it.

CU

The computer industry still needs people who are able
to code in ASM, so keep on doing it.

It’s a very niche market, and depending on the company – they may only keep
you on board for as long as the immediate need is present. Other places
realize your value and keep you indefinitely.

I work in an embedded company… so… we like asm coders :). Too bad our
pay is horrid heh.

-Will

The computer industry still needs people who are able

to code in ASM, so keep on doing it.

It’s a very niche market, and depending on the company – they may only
keep you on board for as long as the immediate need is present. Other
places realize your value and keep you indefinitely.

I work in an embedded company… so… we like asm coders :). Too bad our
pay is horrid heh.

It seems like every few months I see some article from an expert in the
embedded systems market complaining about how hard it is to hire people with
embedded coding skills. But, when I asked one of the “experts” about it, It
turned out that there were only a couple of hundred unfilled embedded coding
jobs available in the US and 90% were fairly short term contracts. And,
yeah, they paid for shit. ASM used to be my bread and butter, but I haven’t
seen a job ad asking for that skill for over 20 years.

OTOH, I’m a firm believer that you need to learn at least two different
assembly languages if you want to be a well rounded programmer.

Bob PendletonOn Thu, Aug 28, 2008 at 4:04 PM, Will Langford wrote:

-Will


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

±-------------------------------------+

It seems like every few months I see some article from an expert in the
embedded systems market complaining about how hard it is to hire people with
embedded coding skills. But, when I asked one of the “experts” about it, It
turned out that there were only a couple of hundred unfilled embedded coding
jobs available in the US and 90% were fairly short term contracts. And,
yeah, they paid for shit. ASM used to be my bread and butter, but I haven’t
seen a job ad asking for that skill for over 20 years.

OTOH, I’m a firm believer that you need to learn at least two different
assembly languages if you want to be a well rounded programmer.

Bob Pendleton

x86 assembly is pointless. uC abilities (8051, arm, avr, 68k, etc) seems to
be in more demand and more useful on a resume… although alot of those have
C compilers for them, some companies prefer a direct assembly approach.

In the x86 world, I’ve only seen bios stuff and perhaps a few low level
driver things really want assembly over, say, C. And yeah – most of the
assembly coder things I’ve seen are short term contracts as well. They need
something specialized written real quick but not a full time full year
employee. Contract work can be lucrative, but it has alot of expenses to go
with it :(.

-Will>From my experience, unless you’re doing device drivers or bios level stuff,

Or until you turn 30, whichever comes first :wink:

JeffOn Thu August 28 2008 14:04, Will Langford wrote:

It’s a very niche market, and depending on the company – they may only
keep you on board for as long as the immediate need is present. Other
places realize your value and keep you indefinitely.

RENEW!

-bill!On Thu, Aug 28, 2008 at 06:30:02PM -0700, Jeff wrote:

Or until you turn 30, whichever comes first :wink:

Yeah! But… I can’t?seem to find that button…?

//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
’-- http://www.reologica.se - Rheology instrumentation --'On Saturday 30 August 2008, Bill Kendrick wrote:

On Thu, Aug 28, 2008 at 06:30:02PM -0700, Jeff wrote:

Or until you turn 30, whichever comes first :wink:

RENEW!

Or until you turn 30, whichever comes first :wink:

There’s actually some truth to this :). Usually by 30, coders realize some
of their worth and start to want more :). I’ve hit 30 this year, done alot
of device driver, API, bios stuff… and my pay is peanuts, but in order for
me to quit my job that I do actually like, I’ll have to be offered 3x what I
currently get :).

-Will

By the time coders reach 30, they have (or should have) learned enough to say
no to the boss (typically a clueless business type) when asked to do the
impossible. Dimwitted PHBs don’t like that, so they get rid of anyone who has
enough experience to be really good at programming.

Stupidity and greed are the reasons the economy in the USA is going down the
hole.

By I digress–I’ll go back to doing what I like best: not having to put up
with stupid bosses :slight_smile:

Jeff - Dilbert is not a comic strip, it’s a documentary.On Fri August 29 2008 15:58, Will Langford wrote:

Or until you turn 30, whichever comes first :wink:

There’s actually some truth to this :). Usually by 30, coders realize some
of their worth and start to want more :). I’ve hit 30 this year, done alot
of device driver, API, bios stuff… and my pay is peanuts, but in order
for me to quit my job that I do actually like, I’ll have to be offered 3x
what I currently get :).

By the time coders reach 30, they have (or should have) learned enough to
say
no to the boss (typically a clueless business type) when asked to do the
impossible. Dimwitted PHBs don’t like that, so they get rid of anyone who
has
enough experience to be really good at programming.

There’s not a lot that my boss asks for that’s not impossible. Been several
ugly hacks and plenty of ‘it will cost you X $ to do it’, though. But, I
guess I’ve gotten to the point where my boss respects my input… which is
rare, I know :). I think the only time I had a firm argument about stuff
was relating to porting something bought third party with no documentation
from tasm ideal mode to masm… which I didn’t care to waste week(s) of my
life doing.

By I digress–I’ll go back to doing what I like best: not having to put up
with stupid bosses :slight_smile:

Lucky bastard :). Other than maybe some hobby coding, I’ll probably always
prefer having a boss.

-Will

Oh, I still have bosses, but they have PhDs, they’re not stupid. And instead
of herding a bunch of programmers, I herd a bunch of “eager young minds”. If
you think that makes me a lucky bastard, I concur wholeheartedly.

I also still write software, but it’s all GPL/FOSS*. I gain more from the fact
that it’s used in universities and industry around the world, than I did from
the software I wrote for companies that sold it for $xxx. It all depends on
one’s priorities. A good man/woman leaves the world a better place than it
was when he/she entered it.

I’m not belittling those who write software for pay. Bills have to be paid and
food has to be put on the table. But damn, if that’s all one does, one has a
meager sort of existence. Look at it this way - Sam works for Blizzard, but
he also produces SDL which he gives away for free. Major league kudos. Big
time karma. You get the idea.

Jeff

*GPL - Gnu General Public License.
*FOSS - Free Open Source Software.On Fri August 29 2008 21:47, Will Langford wrote:

By I digress–I’ll go back to doing what I like best: not having to put
up with stupid bosses :slight_smile:

Lucky bastard :). Other than maybe some hobby coding, I’ll probably always
prefer having a boss.

By the time coders reach 30, they have (or should have) learned enough to
say
no to the boss

By the time I reached 24 I quit my job and I’ve been my own boss since -
http://www.mysterystudio.com/aboutus.php

I’ve never regretted the decision. Not once. If you can do it, by all means,
do it. If you’re under 30 you probably don’t have so many responsibilities.
You’re still young and have time to fail. If there’s a moment to do it, it’s
now. Don’t become a bitter 50 year old wondering “what if” every day. These
were some of the arguments I used to convince myself to quit my job back
then.

–Gabriel

PS : Fsck, I’m only 27 now, do I sound that old?
PS2 : If the numbers don’t add up - I started Mystery in 2002 but went
fulltime in late 2004

http://www.mysterystudio.com/aboutus.php

i went to your website and did not see anything for linux.

matt