Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

Win95 is not a virus; a virus does something. -- unknown source


programming / comp.lang.asm.x86 / Re: org-asm (new asembler for x86)

SubjectAuthor
* org-asm (new asembler for x86)firr
`* Re: org-asm (new asembler for x86)Terje Mathisen
 `* Re: org-asm (new asembler for x86)firr
  `- Re: org-asm (new asembler for x86)firr

1
Subject: org-asm (new asembler for x86)
From: firr
Newsgroups: comp.lang.asm.x86
Organization: A noiseless patient Spider
Date: Sun, 29 Dec 2019 02:05 UTC
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: profesor...@nospicedham.gmail.com (firr)
Newsgroups: comp.lang.asm.x86
Subject: org-asm (new asembler for x86)
Date: Sat, 28 Dec 2019 18:05:39 -0800 (PST)
Organization: A noiseless patient Spider
Lines: 224
Approved: fbkotler@myfairpoint.net - comp.lang.asm.x86 moderation team.
Message-ID: <76f1fedc-32fa-428d-968e-736fdd4da189@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Date: Sun, 29 Dec 2019 02:05:39 +0000
Injection-Info: reader02.eternal-september.org; posting-host="8d55963a69dfeefbfcadf4ad30961b9e";
logging-data="32152"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/5rF+GHhLSLZSJnayK2b2LWcA3V2eNVlM="
User-Agent: G2/1.0
Cancel-Lock: sha1:aQvFiRLpAXc5piVixNrJycmuBJg=
View all headers
i got so terrible problems last half of year i was like unable to concentrate on coding, still not feeling well to be honest but i think maybe i can back for a while

the idea is to maybe upbuild (build it up) my assembler (so called organic assembler) so maybe i will show that project and maybe some more specific questions/topics will appear

vurrent version to download:

http://minddetonator.htw.pl/org-asm.zip

(for windows32, i mean it runs as win32 console tool and assembles win32 executables)

i added some example pice of asm code in it
as sorta example how to use it



main:

 call test_1M_loop
 call test_1M_loop
 call test_1M_loop
 call test_1M_loop
 call test_1M_loop
 call test_1M_loop
 call test_1M_loop
 call test_1M_loop
 call test_1M_loop
 call test_1M_loop
 call test_1M_loop
 call test_1M_loop
 call test_1M_loop
 call test_1M_loop


 ret

////////////////////////



test_1M_loop:
  nop
  nop
  mov esi 1000000
  rdtsc
  push edx
  push eax
 loop:
//==================

  nop
  nop
  nop
//  mov ebx esi
//  add ebx 19
//  mov edx 1000
//  mov eax 1000
//  div edax ebx

//=================
  dec esi
  jne loop
  rdtsc
  pop ebx
  pop ecx
  sub eax ebx
  sbb edx ecx
  call print_eax
  ret

////////////////////////////


inner_test:

  ret

//////////////////////////////

  @ note_eax: "\x0d\x0a rdtsc eax = %d \x00"

print_eax:
  push eax
  push note_eax
  call msvcrt.printf
  pop eax
  pop eax
  ret



this pice of asm makes loop of 1M rolls and
measures how many cycles it takes by rtdsc command

this itself may be interesting for someone who would like to toy a bit and measure what amount of cycles given assembly comands and routines take on your cpu

for example gien loop with 3 nops gives that result (here on my old cpu)



 rdtsc eax = 2000103

 rdtsc eax = 2000117

 rdtsc eax = 2000082

 rdtsc eax = 2000082

 rdtsc eax = 2000082

 rdtsc eax = 2000082

 rdtsc eax = 2000082

 rdtsc eax = 2000082

 rdtsc eax = 2000082

 rdtsc eax = 2000082

 rdtsc eax = 2000082

 rdtsc eax = 2042404

 rdtsc eax = 2415266

 rdtsc eax = 2266271

if i delete that 3 nops it gives



 rdtsc eax = 1000125

 rdtsc eax = 1000111

 rdtsc eax = 1000083

 rdtsc eax = 1000076

 rdtsc eax = 1000076

 rdtsc eax = 1000083

 rdtsc eax = 1000083

 rdtsc eax = 1000076

 rdtsc eax = 1000076

 rdtsc eax = 1000076

 rdtsc eax = 1000076

 rdtsc eax = 1000076

 rdtsc eax = 1000076

 rdtsc eax = 1000076

so it shows that 1 nop takes only like 0.33 cycle, and that dec esi and jne jump itself take only one cycle

if someone is interested how fast things execute that kind of tests may be usefull
(it could be done in more popular assemblers but the entry level of my own may be easier, for me its easier for sure)

things can be tested easily, for example if i want to test rand() i just put a line

  call msvcrt.rand

instead of that 3 nops and i get the result



 rdtsc eax = 28016989

 rdtsc eax = 28000112

 rdtsc eax = 28043897

 rdtsc eax = 28001589

 rdtsc eax = 28001498

 rdtsc eax = 28105077

 rdtsc eax = 28000161

 rdtsc eax = 28001904

 rdtsc eax = 28016415

 rdtsc eax = 28024360

 rdtsc eax = 28000084

 rdtsc eax = 28012999

 rdtsc eax = 28026061

 rdtsc eax = 28002849

so its 27 cycles..and so on


if someone would like to toy with my assembler i could improve it (i not typed all possiblemnemonic register combinations yet as it seems to be posiibly thousands of them)

i need yet also make some improve,ments in syntax of that asm... im quite satisfied as to cyntax of code (which i a bit refreshed if compared to intel by rejecting periods and turning square brackets into round brackets but i quess i still need to work on  data format and also repair some holes here



Subject: Re: org-asm (new asembler for x86)
From: Terje Mathisen
Newsgroups: comp.lang.asm.x86
Organization: Aioe.org NNTP Server
Date: Sun, 29 Dec 2019 09:02 UTC
References: 1
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: terje.ma...@nospicedham.tmsw.no (Terje Mathisen)
Newsgroups: comp.lang.asm.x86
Subject: Re: org-asm (new asembler for x86)
Date: Sun, 29 Dec 2019 10:02:13 +0100
Organization: Aioe.org NNTP Server
Lines: 204
Approved: fbkotler@myfairpoint.net - comp.lang.asm.x86 moderation team.
Message-ID: <qu9q2k$14sj$1@gioia.aioe.org>
References: <76f1fedc-32fa-428d-968e-736fdd4da189@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: reader02.eternal-september.org; posting-host="8d55963a69dfeefbfcadf4ad30961b9e";
logging-data="30731"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19N1eNCLy2r2EcptBV8zu71+9WGNDs/VzE="
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101
Firefox/52.0 SeaMonkey/2.49.4
Cancel-Lock: sha1:MOj/N/fdLaZoW6WGvp7k3DIajjU=
View all headers
firr wrote:
i got so terrible problems last half of year i was like unable to
concentrate on coding, still not feeling well to be honest but i
think maybe i can back for a while

Hope you'll get better!

the idea is to maybe upbuild (build it up) my assembler (so called
organic assembler) so maybe i will show that project and maybe some
more specific questions/topics will appear

vurrent version to download:

http://minddetonator.htw.pl/org-asm.zip

(for windows32, i mean it runs as win32 console tool and assembles
win32 executables)

That is interesting, thanks for uploading.

Happy New Year everyone!

Terje


i added some example pice of asm code in it as sorta example how to
use it



main:

call test_1M_loop call test_1M_loop call test_1M_loop call
test_1M_loop call test_1M_loop call test_1M_loop call test_1M_loop call test_1M_loop call test_1M_loop call test_1M_loop call
test_1M_loop call test_1M_loop call test_1M_loop call test_1M_loop


ret

////////////////////////



test_1M_loop: nop nop mov esi 1000000 rdtsc push edx push eax loop: //==================

nop nop nop //  mov ebx esi //  add ebx 19 //  mov edx 1000 //  mov
eax 1000 //  div edax ebx

//================= dec esi jne loop rdtsc pop ebx pop ecx sub eax
ebx sbb edx ecx call print_eax ret

////////////////////////////


inner_test:

ret

//////////////////////////////

@ note_eax: "\x0d\x0a rdtsc eax = %d \x00"

print_eax: push eax push note_eax call msvcrt.printf pop eax pop eax ret



this pice of asm makes loop of 1M rolls and measures how many cycles
it takes by rtdsc command

this itself may be interesting for someone who would like to toy a
bit and measure what amount of cycles given assembly comands and
routines take on your cpu

for example gien loop with 3 nops gives that result (here on my old
cpu)



rdtsc eax = 2000103

rdtsc eax = 2000117

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2042404

rdtsc eax = 2415266

rdtsc eax = 2266271

if i delete that 3 nops it gives



rdtsc eax = 1000125

rdtsc eax = 1000111

rdtsc eax = 1000083

rdtsc eax = 1000076

rdtsc eax = 1000076

rdtsc eax = 1000083

rdtsc eax = 1000083

rdtsc eax = 1000076

rdtsc eax = 1000076

rdtsc eax = 1000076

rdtsc eax = 1000076

rdtsc eax = 1000076

rdtsc eax = 1000076

rdtsc eax = 1000076

so it shows that 1 nop takes only like 0.33 cycle, and that dec esi
and jne jump itself take only one cycle

if someone is interested how fast things execute that kind of tests
may be usefull (it could be done in more popular assemblers but the
entry level of my own may be easier, for me its easier for sure)

things can be tested easily, for example if i want to test rand() i
just put a line

call msvcrt.rand

instead of that 3 nops and i get the result



rdtsc eax = 28016989

rdtsc eax = 28000112

rdtsc eax = 28043897

rdtsc eax = 28001589

rdtsc eax = 28001498

rdtsc eax = 28105077

rdtsc eax = 28000161

rdtsc eax = 28001904

rdtsc eax = 28016415

rdtsc eax = 28024360

rdtsc eax = 28000084

rdtsc eax = 28012999

rdtsc eax = 28026061

rdtsc eax = 28002849

so its 27 cycles..and so on


if someone would like to toy with my assembler i could improve it (i
not typed all possiblemnemonic register combinations yet as it seems
to be posiibly thousands of them)

i need yet also make some improve,ments in syntax of that asm... im
quite satisfied as to cyntax of code (which i a bit refreshed if
compared to intel by rejecting periods and turning square brackets
into round brackets but i quess i still need to work on  data format
and also repair some holes here



--
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"



Subject: Re: org-asm (new asembler for x86)
From: firr
Newsgroups: comp.lang.asm.x86
Organization: A noiseless patient Spider
Date: Wed, 1 Jan 2020 20:19 UTC
References: 1 2
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: profesor...@nospicedham.gmail.com (firr)
Newsgroups: comp.lang.asm.x86
Subject: Re: org-asm (new asembler for x86)
Date: Wed, 1 Jan 2020 12:19:42 -0800 (PST)
Organization: A noiseless patient Spider
Lines: 211
Approved: fbkotler@myfairpoint.net - comp.lang.asm.x86 moderation team.
Message-ID: <d14a8fae-27da-475d-9e7e-b5cd1c9fec58@googlegroups.com>
References: <76f1fedc-32fa-428d-968e-736fdd4da189@googlegroups.com> <qu9q2k$14sj$1@gioia.aioe.org>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Date: Wed, 01 Jan 2020 20:19:43 +0000
Injection-Info: reader02.eternal-september.org; posting-host="b87c30e29bd7e631ad08d094f6ba07ca";
logging-data="30214"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19CSqqc2aqoCTHy018j+6U2ho0D15UsAzc="
User-Agent: G2/1.0
Cancel-Lock: sha1:5517cD05GmRQafEX85ccAv6+je0=
View all headers
W dniu niedziela, 29 grudnia 2019 10:16:07 UTC+1 użytkownik Terje Mathisen napisał:
firr wrote:
i got so terrible problems last half of year i was like unable to
concentrate on coding, still not feeling well to be honest but i
think maybe i can back for a while

Hope you'll get better!

the idea is to maybe upbuild (build it up) my assembler (so called
organic assembler) so maybe i will show that project and maybe some
more specific questions/topics will appear

vurrent version to download:

http://minddetonator.htw.pl/org-asm.zip

(for windows32, i mean it runs as win32 console tool and assembles
win32 executables)

That is interesting, thanks for uploading.

Happy New Year everyone!

Terje


i added some example pice of asm code in it as sorta example how to
use it



main:

call test_1M_loop call test_1M_loop call test_1M_loop call
test_1M_loop call test_1M_loop call test_1M_loop call test_1M_loop
call test_1M_loop call test_1M_loop call test_1M_loop call
test_1M_loop call test_1M_loop call test_1M_loop call test_1M_loop


ret

////////////////////////



test_1M_loop: nop nop mov esi 1000000 rdtsc push edx push eax loop:
//=================> >
nop nop nop //  mov ebx esi //  add ebx 19 //  mov edx 1000 //  mov
eax 1000 //  div edax ebx

//================= dec esi jne loop rdtsc pop ebx pop ecx sub eax
ebx sbb edx ecx call print_eax ret

////////////////////////////


inner_test:

ret

//////////////////////////////

@ note_eax: "\x0d\x0a rdtsc eax = %d \x00"

print_eax: push eax push note_eax call msvcrt.printf pop eax pop eax
ret



this pice of asm makes loop of 1M rolls and measures how many cycles
it takes by rtdsc command

this itself may be interesting for someone who would like to toy a
bit and measure what amount of cycles given assembly comands and
routines take on your cpu

for example gien loop with 3 nops gives that result (here on my old
cpu)



rdtsc eax = 2000103

rdtsc eax = 2000117

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2042404

rdtsc eax = 2415266

rdtsc eax = 2266271

if i delete that 3 nops it gives



rdtsc eax = 1000125

rdtsc eax = 1000111

rdtsc eax = 1000083

rdtsc eax = 1000076

rdtsc eax = 1000076

rdtsc eax = 1000083

rdtsc eax = 1000083

rdtsc eax = 1000076

rdtsc eax = 1000076

rdtsc eax = 1000076

rdtsc eax = 1000076

rdtsc eax = 1000076

rdtsc eax = 1000076

rdtsc eax = 1000076

so it shows that 1 nop takes only like 0.33 cycle, and that dec esi
and jne jump itself take only one cycle

if someone is interested how fast things execute that kind of tests
may be usefull (it could be done in more popular assemblers but the
entry level of my own may be easier, for me its easier for sure)

things can be tested easily, for example if i want to test rand() i
just put a line

call msvcrt.rand

instead of that 3 nops and i get the result



rdtsc eax = 28016989

rdtsc eax = 28000112

rdtsc eax = 28043897

rdtsc eax = 28001589

rdtsc eax = 28001498

rdtsc eax = 28105077

rdtsc eax = 28000161

rdtsc eax = 28001904

rdtsc eax = 28016415

rdtsc eax = 28024360

rdtsc eax = 28000084

rdtsc eax = 28012999

rdtsc eax = 28026061

rdtsc eax = 28002849

so its 27 cycles..and so on


if someone would like to toy with my assembler i could improve it (i
not typed all possiblemnemonic register combinations yet as it seems
to be posiibly thousands of them)

i need yet also make some improve,ments in syntax of that asm... im
quite satisfied as to cyntax of code (which i a bit refreshed if
compared to intel by rejecting periods and turning square brackets
into round brackets but i quess i still need to work on  data format
and also repair some holes here




some a bit more new wersion

http://minddetonator.htw.pl/org-asm-3.zip

sadly nobody writes in it as it could help me to fopcus on typing in missed mnemonics and features



Subject: Re: org-asm (new asembler for x86)
From: firr
Newsgroups: comp.lang.asm.x86
Organization: A noiseless patient Spider
Date: Thu, 2 Jan 2020 20:38 UTC
References: 1 2 3
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder.eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: profesor...@nospicedham.gmail.com (firr)
Newsgroups: comp.lang.asm.x86
Subject: Re: org-asm (new asembler for x86)
Date: Thu, 2 Jan 2020 12:38:38 -0800 (PST)
Organization: A noiseless patient Spider
Lines: 427
Approved: fbkotler@myfairpoint.net - comp.lang.asm.x86 moderation team.
Message-ID: <4c7a5dcd-4872-425b-bfd5-84ff622af170@googlegroups.com>
References: <76f1fedc-32fa-428d-968e-736fdd4da189@googlegroups.com>
<qu9q2k$14sj$1@gioia.aioe.org> <d14a8fae-27da-475d-9e7e-b5cd1c9fec58@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Injection-Date: Thu, 02 Jan 2020 20:38:39 +0000
Injection-Info: reader02.eternal-september.org; posting-host="3d26dd7436ee58e21da67eb81e697f8b";
logging-data="18610"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18+qYDkiPSZHV6wUOwSncIeFGq35UhoBxY="
User-Agent: G2/1.0
Cancel-Lock: sha1:4M6FwtJbiTpF3Ry4AF+M16P4WrE=
View all headers
W dniu środa, 1 stycznia 2020 21:22:16 UTC+1 użytkownik firr napisał:
W dniu niedziela, 29 grudnia 2019 10:16:07 UTC+1 użytkownik Terje Mathisen napisał:
firr wrote:
i got so terrible problems last half of year i was like unable to
concentrate on coding, still not feeling well to be honest but i
think maybe i can back for a while

Hope you'll get better!

the idea is to maybe upbuild (build it up) my assembler (so called
organic assembler) so maybe i will show that project and maybe some
more specific questions/topics will appear

vurrent version to download:

http://minddetonator.htw.pl/org-asm.zip

(for windows32, i mean it runs as win32 console tool and assembles
win32 executables)

That is interesting, thanks for uploading.

Happy New Year everyone!

Terje


i added some example pice of asm code in it as sorta example how to
use it



main:

call test_1M_loop call test_1M_loop call test_1M_loop call
test_1M_loop call test_1M_loop call test_1M_loop call test_1M_loop
call test_1M_loop call test_1M_loop call test_1M_loop call
test_1M_loop call test_1M_loop call test_1M_loop call test_1M_loop


ret

////////////////////////



test_1M_loop: nop nop mov esi 1000000 rdtsc push edx push eax loop:
//=================> > >
nop nop nop //  mov ebx esi //  add ebx 19 //  mov edx 1000 //  mov
eax 1000 //  div edax ebx

//================= dec esi jne loop rdtsc pop ebx pop ecx sub eax
ebx sbb edx ecx call print_eax ret

////////////////////////////


inner_test:

ret

//////////////////////////////

@ note_eax: "\x0d\x0a rdtsc eax = %d \x00"

print_eax: push eax push note_eax call msvcrt.printf pop eax pop eax
ret



this pice of asm makes loop of 1M rolls and measures how many cycles
it takes by rtdsc command

this itself may be interesting for someone who would like to toy a
bit and measure what amount of cycles given assembly comands and
routines take on your cpu

for example gien loop with 3 nops gives that result (here on my old
cpu)



rdtsc eax = 2000103

rdtsc eax = 2000117

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2000082

rdtsc eax = 2042404

rdtsc eax = 2415266

rdtsc eax = 2266271

if i delete that 3 nops it gives



rdtsc eax = 1000125

rdtsc eax = 1000111

rdtsc eax = 1000083

rdtsc eax = 1000076

rdtsc eax = 1000076

rdtsc eax = 1000083

rdtsc eax = 1000083

rdtsc eax = 1000076

rdtsc eax = 1000076

rdtsc eax = 1000076

rdtsc eax = 1000076

rdtsc eax = 1000076

rdtsc eax = 1000076

rdtsc eax = 1000076

so it shows that 1 nop takes only like 0.33 cycle, and that dec esi
and jne jump itself take only one cycle

if someone is interested how fast things execute that kind of tests
may be usefull (it could be done in more popular assemblers but the
entry level of my own may be easier, for me its easier for sure)

things can be tested easily, for example if i want to test rand() i
just put a line

call msvcrt.rand

instead of that 3 nops and i get the result



rdtsc eax = 28016989

rdtsc eax = 28000112

rdtsc eax = 28043897

rdtsc eax = 28001589

rdtsc eax = 28001498

rdtsc eax = 28105077

rdtsc eax = 28000161

rdtsc eax = 28001904

rdtsc eax = 28016415

rdtsc eax = 28024360

rdtsc eax = 28000084

rdtsc eax = 28012999

rdtsc eax = 28026061

rdtsc eax = 28002849

so its 27 cycles..and so on


if someone would like to toy with my assembler i could improve it (i
not typed all possiblemnemonic register combinations yet as it seems
to be posiibly thousands of them)

i need yet also make some improve,ments in syntax of that asm... im
quite satisfied as to cyntax of code (which i a bit refreshed if
compared to intel by rejecting periods and turning square brackets
into round brackets but i quess i still need to work on  data format
and also repair some holes here




some a bit more new wersion

http://minddetonator.htw.pl/org-asm-3.zip

sadly nobody writes in it as it could help me to fopcus on typing in missed mnemonics and features

http://minddetonator.htw.pl/org-asm-4.zip

i added some extremally lame asm code for drawing mandelbrot (temporarely becouse of laziness)

it may illustrate how you do float assembler today (you simply add ss to mnemonics and have 8 registers)

though honestly it is visible i need to rework some things in that assembly, like turning xmm1 into x1 to be shorter etc

but im tired and will do it later

//
// unsigned background_color = 0x0;
//
// void RunFrame(int advance)
// {
//     ClearFrameData(background_color);
// }
//
//
// void ProcessMouseMove(int x, int y){}
// void ProcessKeyDown(int key){}
// void OnResize(){}
//
//
// int main(void)
// {
//
//         RegisterMouseMove( ProcessMouseMove );
//         RegisterKeyDown( ProcessKeyDown );
//         RegisterOnResize( OnResize );
//         RegisterRunFrame( RunFrame );
//         SetSleepValue(10);
//
//         SetupWindow2(" Example Green Fire App ",  20, 20,  560, 400 );
//
//         return 0;
// }


jmp start

ProcessMouseMove:   ret
ProcessKeyDown:     ret
OnResize:           ret

//////////////////////////////////////



calc_mandelbtot_for_esi_edi:


           >> minus2: -2.0f four: 4.0 dx: 0.01 dy: 0.01
           >>     c_re: 0.0 c_im: 0.0 res: 0

 push eax


  cvt si2ss xmm0 esi

  mov ss xmm1 (dx)
  mul ss xmm0 xmm1
  add ss xmm0 (minus2)
  mov ss (c_re) xmm0

  cvt si2ss xmm0 edi

  mov ss xmm1 (dy)
  mul ss xmm0 xmm1
  add ss xmm0 (minus2)
  mov ss (c_im) xmm0


  //////////////////////
   mov ecx 0


   mov ss xmm3 (c_re)
   mov ss xmm4 (c_im)

   mov ss xmm0 xmm3
   mov ss xmm1 xmm4

   mov ss xmm2 (four)

 iterations:
                     //re
   mov ss xmm5 xmm0
                    //im
   mov ss xmm6 xmm1

                     //re * re
   mul ss xmm0 xmm0
                    //im * im
   mul ss xmm1 xmm1
                   // re*re + im*im
   add ss xmm0 xmm1

   mov ss xmm1 xmm0

   cmple ss xmm1 xmm2

   cvt ss2si eax xmm1

   cmp eax 0
   je out

   mov ss xmm0 xmm5
   mov ss xmm1 xmm6
                     //re * re
   mul ss xmm0 xmm0
                     //im * im
   mul ss xmm1 xmm1
   sub ss xmm0 xmm1
   add ss xmm0 xmm3
                    // re_n = re * re - im * im + cRe;
   mov ss xmm7 xmm0

   mov ss  xmm0 xmm5
   mul ss  xmm0 xmm6
   add ss  xmm0 xmm0
   add ss  xmm0 xmm4

   mov ss  xmm1 xmm0
   mov ss  xmm0 xmm7


//
    inc ecx
    cmp ecx 100
    jl iterations

    mov ecx 0xff00ff
    pop eax
    ret
out:

   mov ecx 0xffff00
   pop eax
   ret

//    double re = cRe;
//   double im = cIm;
//
//    for(int n=1; n<man_maxiter; n++)
//    {
//      points_list[n].re = re;
//      points_list[n].im = im;
//
//      if( re * re + im * im > 4.0 ) return n;
//
//      double re_n = re * re - im * im + cRe;
//      double im_n = 2 * re * im       + cIm;
//
//      re = re_n;
//      im = im_n;
//
//    }






RunFrame:

   push 0x007000,    call green_fire.ClearFrameData,        pop eax ;


/////////////////// loop on pixels

Click here to read the complete article
1
rocksolid light 0.7.2
clearneti2ptor