flat assembler
Message board for the users of flat assembler.

Index > High Level Languages > High level language object oriented

Author
Thread Post new topic Reply to topic
foxz



Joined: 09 Aug 2005
Posts: 5
Location: france
foxz 09 Aug 2005, 08:21
Hello,
I'm writting a precomp for fasm (and only for it)

classic oo stuff + multi-inherance, operator/property

syntax:

class a{
t:integer write {dosomething}; // property
t:string read {result str(this.t)} write {this.t=val(t)} // overloading
proc go{} // abstract
}

class b(a) {
t:integer write {dootherthing}; // virtual
proc totor(a,b:integer){...} // if unused precomp don't declare it
}

class c(a,b) { // multi-inherance
proc go{inh go}; // virtual etc..
}

var x:a;
{
x.t=5; // that compile like mov [x.t], 5; invoke dosomething, x
}


precomp auto declare (only) needed function or dll etc


for moment only 5% of precompilator is writen (in FPC).

_________________
Syl
Post 09 Aug 2005, 08:21
View user's profile Send private message Reply with quote
flaith



Joined: 07 Feb 2005
Posts: 122
Location: $300:20 58 FC 60 N 300G => Vietnam
flaith 09 Aug 2005, 11:13
i think i'm gonna like it Wink

_________________
Je suis sur de 'rien', mais je ne suis pas sur du 'tout'.
Post 09 Aug 2005, 11:13
View user's profile Send private message Visit poster's website Reply with quote
foxz



Joined: 09 Aug 2005
Posts: 5
Location: france
foxz 01 Sep 2005, 12:19
I'm be back.

So... i'm rewrite precomp in jscript (...)

for moment :

var n,m:db;
main {
m=n;
}

give

main:
mov eax, n
mov m, eax
ret

but
m=1+n
give
mov eax, 1
add eax, n
mov m, eax

I prefer mov eax, n; inc eax; mov m,eax

funny :
m=n+1;
give
mov eax, n
inc eax
mov m, eax

well done

crazy :
m=5+((n+1)*2)
give
mov eax, 5
push eax
mov eax, n
inc eax
shl eax, 1 // unsigned
pop ebx
add eax, ebx

it's not well...

I need help to rewrite evaluator...

syl
FoxZ

_________________
Syl
Post 01 Sep 2005, 12:19
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-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.