flat assembler
Message board for the users of flat assembler.

Index > Windows > question about classes in FASM ....??

Author
Thread Post new topic Reply to topic
mrn2929



Joined: 22 Jun 2006
Posts: 7
mrn2929
hi ;
can i make objects and classes in FASM like VB and VC ?
Post 05 Jul 2006, 15:25
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
if you really understand OOP then you can make them yourself. for example here is simple C code to do class-like things:
Code:
struct MyClass {...};
MyClass* MyClass_MyClass() {return((MyClass*)malloc(sizeof(MyClass)));}
void MyClass_Method1(MyClass *this, ...) {...}
void MyClass_Desctructor(MyClass *this) {mfree(this)}

void main() {
MyClass a = MyClass_MyClass();
MyClass_Method1(a, ...);
MyClass_Desctructor(a);
}    

hope you got it. Same can be done in ASM. If you want smarty things like automatic desctrutor calling, scope, data access restricting, etc. then don't use assembly.

ASM is about knowing what you are doing, not letting compiler quess what you wanted to do Wink
Post 05 Jul 2006, 17:15
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
http://board.flatassembler.net/topic.php?t=1607 <- Here was discussed how to do OOP on FASM. Note that this thread is really outdated and you will need to rewrite the macros in the new way.
Post 06 Jul 2006, 12:01
View user's profile Send private message 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.