1000
Moderator:Æron
1000
- Bocaj Claw
- Posts:8523
- Joined:Mon Apr 25, 2005 11:31 am
- Location:Not Stetson University
- Contact:
- MuffinSticks
- Posts:2865
- Joined:Thu Nov 06, 2008 3:16 am
- Location:Vancouver, Washington
- MuffinSticks
- Posts:2865
- Joined:Thu Nov 06, 2008 3:16 am
- Location:Vancouver, Washington
Forth post!Fourth post.
Code: Select all
CODE inner_loop ( addr1 addr2 Nmax lower_limit -- ) ( f: x -- x)
fld FSIZE FSTACK_MEMORY \ f: -> fpu:
mov ecx, ebx \ ecx = r2
pop eax \ eax = Nmax
( addr1 ebx=addr2)
push edx ( addr1 edx ebx)
mov edx, 4 [esp] \ edx = addr1)
\ begin loop
L$1: fld [ebx] [edi] ( fpu: aa m[addr2]
fmul st, st(1) ( fpu: aa m2*aa)
fld [edx] [edi] ( fpu: aa m2*aa m1)
fxch st(1) ( fpu: aa m1 m2*aa)
fsubp st(1), st ( fpu: aa m1-m2*aa)
fstp [edx] [edi] ( fpu: aa)
add [edx], # 8 \ increment addresses
add [ebx], # 8
inc ecx \ add 1 to loop variable
cmp eax, ecx \ test for done
jl L$1 \ loop if I <Nmax> f:
next,
END-CODE
- LewisTheTank
- Posts:765
- Joined:Sun Aug 24, 2008 7:30 am
- Location:Florida, USA
- Contact:
I GOT IT! (Not hilarious but indeed worth the bother!)Forth post!Fourth post.
(...worst pun ever?)Code: Select all
CODE inner_loop ( addr1 addr2 Nmax lower_limit -- ) ( f: x -- x) fld FSIZE FSTACK_MEMORY \ f: -> fpu: mov ecx, ebx \ ecx = r2 pop eax \ eax = Nmax ( addr1 ebx=addr2) push edx ( addr1 edx ebx) mov edx, 4 [esp] \ edx = addr1) \ begin loop L$1: fld [ebx] [edi] ( fpu: aa m[addr2] fmul st, st(1) ( fpu: aa m2*aa) fld [edx] [edi] ( fpu: aa m2*aa m1) fxch st(1) ( fpu: aa m1 m2*aa) fsubp st(1), st ( fpu: aa m1-m2*aa) fstp [edx] [edi] ( fpu: aa) add [edx], # 8 \ increment addresses add [ebx], # 8 inc ecx \ add 1 to loop variable cmp eax, ecx \ test for done jl L$1 \ loop if I <Nmax> f: next, END-CODE
"Do you really think you have what it takes? Do you?"
- Tom Flapwell
- Posts:5465
- Joined:Wed Feb 23, 2005 1:48 pm
- Location:DC
- Contact:
Bummer, I never used that code.
See other much-maligned creatures in my webcomic: http://downscale.comicgenesis.com
Who is online
Users browsing this forum: No registered users and 34 guests