flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > Would this be posible with macros?

Author
Thread Post new topic Reply to topic
Embrance



Joined: 14 Mar 2004
Posts: 116
Location: Greece
Embrance
Would it be possible to create 2 macros,one for loading an image(bmp,png,whatever) and one for showing it on the screen.

Now i know this an be done.This sint my main question.My question is this:
Can this be platform indepedent?
Example:Take an existant OS.Use my code an voila!It works!
Post 19 Feb 2005, 17:45
View user's profile Send private message MSN Messenger ICQ Number Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
there is no reason to write it as macro. Rather write procedures. But anyway, answer to your question is no, only if you will use some layer which will "encapsulate" system's API and then you macro/proc will be dependant on this layer.
Post 20 Feb 2005, 01:41
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Embrance



Joined: 14 Mar 2004
Posts: 116
Location: Greece
Embrance
So you mean in order to make this happens,ifirst must make an API,a collection of procedures or something...?
Post 20 Feb 2005, 06:40
View user's profile Send private message MSN Messenger ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Embrance, are you really, really know what is macros as a conception?

Regards.
Post 20 Feb 2005, 08:00
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Embrance



Joined: 14 Mar 2004
Posts: 116
Location: Greece
Embrance
As far as im considered macros are this:
Instead of typing a code that is used many times into the program,
you "group" the whole code under a "nme" or "sign".
When you insert it,it executes the code group.
Post 20 Feb 2005, 14:02
View user's profile Send private message MSN Messenger ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Embrance wrote:
When you insert it,it executes the code group.


It doesn't execute anything. When the preprocessor meet macro name, it simply replace this name with the text of the macro body. Macroses are source text processing techniques. As a result of "execution" of macro you will get simply some source code (it is not neccessary executable code - in most cases it is data definitions - actually IMHO, using macroses for generating source with instruction should be provided very carefuly in order to not affect readability of the source)

Regards.
Post 20 Feb 2005, 14:40
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Embrance



Joined: 14 Mar 2004
Posts: 116
Location: Greece
Embrance
Well that what i meant!lol
Thanks for the exaplanation!
Post 20 Feb 2005, 16:20
View user's profile Send private message MSN Messenger ICQ Number Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Embrance wrote:
Well that what i meant!lol
Thanks for the exaplanation!


So, if everything is clear, what is you are asking for in your first post???
Visibly you need some graphic library, not macroses...
Of course you can create macros that to contains whole procedure for loading/displaying images, but as far as such code is usually several hundreds or even thousends bytes, it is stupid to insert the same repeating code every time you want to load or display an image.

Regards.
Post 20 Feb 2005, 20:03
View user's profile Send private message Visit poster's website ICQ Number 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 GitHub, YouTube, Twitter.

Website powered by rwasa.