能力值:
( LV15,RANK:670 )
13 楼
[font=Fixedsys][color=#000000] [/color][color=#800080].386p
.8087
[/color][color=#000000].mmx
[/color][color=#0A246A].model flat,stdcall
option casemap:none
[/color][/font][font=Comic Sans MS][color=#008000];>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
; Include 文件定义
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >
[/color][/font][font=Fixedsys][color=#0A246A]include [/color][color=#000000]windows.inc
[/color][color=#0A246A]include [/color][color=#000000]gdi32.inc
[/color][color=#0A246A]includelib [/color][color=#000000]gdi32.lib
[/color][color=#0A246A]include [/color][color=#000000]user32.inc
[/color][color=#0A246A]includelib [/color][color=#000000]user32.lib
[/color][color=#0A246A]include [/color][color=#000000]kernel32.inc
[/color][color=#0A246A]includelib [/color][color=#000000]kernel32.lib
[/color][color=#0A246A]include [/color][color=#000000]advapi32.inc
[/color][color=#0A246A]includelib [/color][color=#000000]advapi32.lib
[/color][color=#0A246A]include [/color][color=#000000]masm32.inc
[/color][color=#0A246A]includelib [/color][color=#000000]masm32.lib
[/color][color=#0A246A]includelib [/color][color=#000000]msvcrt.lib
[/color][color=#0A246A]include [/color][color=#000000]e[/color][color=#0A246A]:[/color][color=#000000]\程[/color][color=#800080]序[/color][color=#000000]\masm32\MACROS\macros.asm
[/color][/font][font=Comic Sans MS][color=#008000];================================================
[/color][/font][font=Fixedsys][color=#0A246A].data?
[/color][color=#000000]hInstDLL [/color][color=#0A246A]dd ?
[/color][color=#000000]hThreadCreate0 [/color][color=#0A246A]dd ?
[/color][color=#000000]hThreadCreate1 [/color][color=#0A246A]dd ?
[/color][color=#000000]hThreadCreate2 [/color][color=#0A246A]dd ?
[/color][color=#000000]hThreadCreate3 [/color][color=#0A246A]dd ?
[/color][color=#000000]hThreadCreate4 [/color][color=#0A246A]dd ?
[/color][color=#000000]hThreadCreate5 [/color][color=#0A246A]dd ?
[/color][color=#000000]hThreadCreate6 [/color][color=#0A246A]dd ?
[/color][color=#000000]hThreadCreate7 [/color][color=#0A246A]dd ?
[/color][color=#000000]hEventCreate [/color][color=#0A246A]dd ?
[/color][color=#000000]hHeap [/color][color=#0A246A]dd ?
[/color][color=#000000]lpMemory [/color][color=#0A246A]dd ?
[/color][color=#000000]eventout [/color][color=#0A246A]dd ?
[/color][color=#000000]PARTICLE [/color][color=#0A246A]struct
[/color][color=#000000]dpx [/color][color=#0A246A]dq ?
[/color][color=#000000]dpy [/color][color=#0A246A]dq ?
[/color][color=#000000]dpz [/color][color=#0A246A]dq ?
[/color][color=#000000]dvx [/color][color=#0A246A]dq ?
[/color][color=#000000]dvy [/color][color=#0A246A]dq ?
[/color][color=#000000]dvz [/color][color=#0A246A]dq ?
[/color][color=#000000]PARTICLE [/color][color=#0A246A]ends
[/color][color=#000000]sizeofdtparticle [/color][color=#0A246A]dd ?
[/color][color=#000000]lprand0 [/color][color=#0A246A]dd ?
[/color][color=#000000]lprand1 [/color][color=#0A246A]dd ?
[/color][color=#000000]dttime [/color][color=#0A246A]dd ?
[/color][/font][font=Comic Sans MS][color=#008000];=================================================================
[/color][/font][font=Fixedsys][color=#0A246A].data
[/color][color=#000000]dtparticle0 PARTICLE [/color][color=#0A246A]<-[/color][color=#800080]20.0[/color][color=#0A246A],[/color][color=#800080]20.0[/color][color=#0A246A],-[/color][color=#800080]20.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A]>
[/color][color=#000000]dtparticle1 PARTICLE [/color][color=#0A246A]<-[/color][color=#800080]20.0[/color][color=#0A246A],[/color][color=#800080]20.0[/color][color=#0A246A],[/color][color=#800080]20.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A]> [/color][/font][font=Comic Sans MS][color=#008000];-1,1,1
[/color][/font][font=Fixedsys][color=#000000]dtparticle2 PARTICLE [/color][color=#0A246A]<[/color][color=#800080]20.0[/color][color=#0A246A],[/color][color=#800080]20.0[/color][color=#0A246A],-[/color][color=#800080]20.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A]>
[/color][color=#000000]dtparticle3 PARTICLE [/color][color=#0A246A]<[/color][color=#800080]20.0[/color][color=#0A246A],[/color][color=#800080]20.0[/color][color=#0A246A],[/color][color=#800080]20.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A]>
[/color][color=#000000]dtparticle4 PARTICLE [/color][color=#0A246A]<-[/color][color=#800080]20.0[/color][color=#0A246A],-[/color][color=#800080]20.0[/color][color=#0A246A],-[/color][color=#800080]20.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A]>
[/color][color=#000000]dtparticle5 PARTICLE [/color][color=#0A246A]<-[/color][color=#800080]21.0[/color][color=#0A246A],-[/color][color=#800080]21.0[/color][color=#0A246A],-[/color][color=#800080]21.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A]>
[/color][color=#000000]dtparticle6 PARTICLE [/color][color=#0A246A]<[/color][color=#800080]20.0[/color][color=#0A246A],-[/color][color=#800080]20.0[/color][color=#0A246A],-[/color][color=#800080]20.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A]>
[/color][color=#000000]dtparticle7 PARTICLE [/color][color=#0A246A]<[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A]>
[/color][color=#000000]dtparticle8 PARTICLE [/color][color=#0A246A]<[/color][color=#800080]1.0[/color][color=#0A246A],[/color][color=#800080]1.0[/color][color=#0A246A],[/color][color=#800080]1.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A],[/color][color=#800080]0.0[/color][color=#0A246A]>
[/color][color=#000000]dtparticle9 PARTICLE [/color][color=#0A246A]<[/color][color=#800080]10.0[/color][color=#0A246A],[/color][color=#800080]10.0[/color][color=#0A246A],[/color][color=#800080]10.0[/color][color=#0A246A],[/color][color=#800080]10.0[/color][color=#0A246A],[/color][color=#800080]1.0[/color][color=#0A246A],[/color][color=#800080]0.9[/color][color=#0A246A]>
[/color][color=#000000]dt40 [/color][color=#0A246A]dq [/color][color=#800080]40.0
[/color][color=#000000]dt70 [/color][color=#0A246A]dq [/color][color=#800080]70.0
[/color][color=#000000]dt100 [/color][color=#0A246A]dq [/color][color=#800080]100.0
[/color][color=#000000]dt156 [/color][color=#0A246A]dq [/color][color=#800080]156.1
[/color][color=#000000]dtt [/color][color=#0A246A]dq [/color][color=#800080]0.00000001
[/color][color=#000000]dttt2 [/color][color=#0A246A]dq [/color][color=#800080]0.00000000000000005
[/color][color=#000000]dtm [/color][color=#0A246A]dq [/color][color=#800080]1.0
[/color][color=#000000]dtlimit [/color][color=#0A246A]dq [/color][color=#800080]40000.0
[/color][color=#000000]dtlimitf [/color][color=#0A246A]dq -[/color][color=#800080]10000.0
[/color][color=#000000]dtlimitz [/color][color=#0A246A]dq [/color][color=#800080]10000.0
[/color][/font][font=Comic Sans MS][color=#008000];==================================================
[/color][/font][font=Fixedsys][color=#0A246A].const
[/color][color=#000000]szEvent [/color][color=#0A246A]db [/color][/font][font=Comic Sans MS][color=#008000]'create'[/color][/font][font=Fixedsys][color=#0A246A],[/color][color=#800080]0
[/color][color=#000000]szEventWhich [/color][color=#0A246A]db [/color][/font][font=Comic Sans MS][color=#008000]'which'[/color][/font][font=Fixedsys][color=#0A246A],[/color][color=#800080]0
[/color][/font][font=Comic Sans MS][color=#008000];===================================================
[/color][/font][font=Fixedsys][color=#0A246A].code
[/color][color=#000000]Calc [/color][color=#0A246A]proc uses [/color][color=#FF8000]esi eax ebx ecx [/color][color=#000000]_which
[/color][color=#0A246A]local [/color][color=#000000]@thisparticle[/color][color=#0A246A]:[/color][color=#000000]PARTICLE [/color][/font][font=Comic Sans MS][color=#008000];本次计算的粒子
[/color][/font][font=Fixedsys][color=#0A246A]local [/color][color=#000000]@calcparticle[/color][color=#0A246A]:[/color][color=#000000]PARTICLE [/color][/font][font=Comic Sans MS][color=#008000];要计算的粒子
[/color][/font][font=Fixedsys][color=#0A246A]local [/color][color=#000000]@forceXX[/color][color=#0A246A]:qword
local [/color][color=#000000]@forceYY[/color][color=#0A246A]:qword
local [/color][color=#000000]@forceZZ[/color][color=#0A246A]:qword
local [/color][color=#000000]@middle[/color][color=#0A246A]:qword [/color][/font][font=Comic Sans MS][color=#008000];记录力的大小
[/color][/font][font=Fixedsys][color=#0A246A]local [/color][color=#000000]@middle1[/color][color=#0A246A]:qword [/color][/font][font=Comic Sans MS][color=#008000];记录差值的绝对值
[/color][/font][font=Fixedsys][color=#0A246A]local [/color][color=#000000]@dta[/color][color=#0A246A]:qword [/color][/font][font=Comic Sans MS][color=#008000];记录加速度a
[/color][/font][font=Fixedsys][color=#0A246A]local [/color][color=#000000]@tmp0[/color][color=#0A246A]:qword
local [/color][color=#000000]@tmp1[/color][color=#0A246A]:qword
fldz
fst [/color][color=#000000]@forceXX
[/color][color=#0A246A]fst [/color][color=#000000]@forceYY
[/color][color=#0A246A]fst [/color][color=#000000]@forceZZ [/color][/font][font=Comic Sans MS][color=#008000];初始化力
[/color][/font][font=Fixedsys][color=#0A246A]mov [/color][color=#FF8000]eax[/color][color=#0A246A],[/color][color=#000000]_which
[/color][color=#0A246A]mul [/color][color=#000000]sizeofdtparticle
[/color][color=#0A246A]mov [/color][color=#FF8000]esi[/color][color=#0A246A],offset [/color][color=#000000]dtparticle0
[/color][color=#0A246A]add [/color][color=#FF8000]esi[/color][color=#0A246A],[/color][color=#FF8000]eax [/color][/font][font=Comic Sans MS][color=#008000];获取要计算粒子相对于粒子0的偏移量
[/color][/font][font=Fixedsys][color=#0A246A]finit
assume [/color][color=#FF8000]esi[/color][color=#0A246A]:ptr [/color][color=#000000]PARTICLE
[/color][color=#0A246A]fld [[/color][color=#FF8000]esi[/color][color=#0A246A]][/color][color=#000000].dpx
[/color][color=#0A246A]fstp [/color][color=#000000]@thisparticle.dpx
[/color][color=#0A246A]fld [[/color][color=#FF8000]esi[/color][color=#0A246A]][/color][color=#000000].dpy
[/color][color=#0A246A]fstp [/color][color=#000000]@thisparticle.dpy
[/color][color=#0A246A]fld [[/color][color=#FF8000]esi[/color][color=#0A246A]][/color][color=#000000].dpz
[/color][color=#0A246A]fstp [/color][color=#000000]@thisparticle.dpz
[/color][color=#0A246A]fld [[/color][color=#FF8000]esi[/color][color=#0A246A]][/color][color=#000000].dvx
[/color][color=#0A246A]fstp [/color][color=#000000]@thisparticle.dvx
[/color][color=#0A246A]fld [[/color][color=#FF8000]esi[/color][color=#0A246A]][/color][color=#000000].dvy
[/color][color=#0A246A]fstp [/color][color=#000000]@thisparticle.dvy
[/color][color=#0A246A]fld [[/color][color=#FF8000]esi[/color][color=#0A246A]][/color][color=#000000].dvz
[/color][color=#0A246A]fstp [/color][color=#000000]@thisparticle.dvz
[/color][color=#0A246A]assume [/color][color=#FF8000]esi[/color][color=#0A246A]:nothing [/color][/font][font=Comic Sans MS][color=#008000];保存要计算的粒子
[/color][/font][font=Fixedsys][color=#0A246A]mov [/color][color=#FF8000]ecx[/color][color=#0A246A],[/color][color=#800080]0 [/color][/font][font=Comic Sans MS][color=#008000];计算8个粒子
[/color][/font][font=Fixedsys][color=#0A246A].while [/color][color=#FF8000]ecx[/color][color=#0A246A]<[/color][color=#800080]8
[/color][color=#0A246A].if [/color][color=#000000]_which[/color][color=#0A246A]==[/color][color=#FF8000]ecx
[/color][color=#0A246A]inc [/color][color=#FF8000]ecx
[/color][color=#0A246A].continue
.endif [/color][/font][font=Comic Sans MS][color=#008000];不计算本粒子的
[/color][/font][font=Fixedsys][color=#0A246A]push [/color][color=#FF8000]ecx [/color][/font][font=Comic Sans MS][color=#008000];先保存ECX
[/color][/font][font=Fixedsys][color=#0A246A]mov [/color][color=#FF8000]eax[/color][color=#0A246A],[/color][color=#FF8000]ecx
[/color][color=#0A246A]mul [/color][color=#000000]sizeofdtparticle
[/color][color=#0A246A]mov [/color][color=#FF8000]esi[/color][color=#0A246A],offset [/color][color=#000000]dtparticle0
[/color][color=#0A246A]add [/color][color=#FF8000]esi[/color][color=#0A246A],[/color][color=#FF8000]eax [/color][/font][font=Comic Sans MS][color=#008000];获取要与计算粒子计算的粒子相对于粒子0的偏移量
[/color][/font][font=Fixedsys][color=#0A246A]finit
assume [/color][color=#FF8000]esi[/color][color=#0A246A]:ptr [/color][color=#000000]PARTICLE
[/color][color=#0A246A]fld [[/color][color=#FF8000]esi[/color][color=#0A246A]][/color][color=#000000].dpx
[/color][color=#0A246A]fstp [/color][color=#000000]@calcparticle.dpx
[/color][color=#0A246A]fld [[/color][color=#FF8000]esi[/color][color=#0A246A]][/color][color=#000000].dpy
[/color][color=#0A246A]fstp [/color][color=#000000]@calcparticle.dpy
[/color][color=#0A246A]fld [[/color][color=#FF8000]esi[/color][color=#0A246A]][/color][color=#000000].dpz
[/color][color=#0A246A]fstp [/color][color=#000000]@calcparticle.dpz
[/color][color=#0A246A]assume [/color][color=#FF8000]esi[/color][color=#0A246A]:nothing [/color][/font][font=Comic Sans MS][color=#008000];获取该粒子的参数
[/color][/font][font=Fixedsys][color=#000000]donext[/color][color=#0A246A]: [/color][/font][font=Comic Sans MS][color=#008000];不重合的时候计算,现在又calc的X,Y,Z位置
[/color][/font][font=Fixedsys][color=#0A246A]finit
fld [/color][color=#000000]@thisparticle.dpx
[/color][color=#0A246A]fsub [/color][color=#000000]@calcparticle.dpx
[/color][color=#0A246A]fst [/color][color=#000000]@calcparticle.dpx [/color][/font][font=Comic Sans MS][color=#008000];calcparticle里记录的是差值,即X1-X2
[/color][/font][font=Fixedsys][color=#0A246A]fmul [/color][color=#000000]@calcparticle.dpx
[/color][color=#0A246A]fst [/color][color=#000000]@forceXX [/color][/font][font=Comic Sans MS][color=#008000];x差值平方,下同
[/color][/font][font=Fixedsys][color=#0A246A]finit
fld [/color][color=#000000]@thisparticle.dpy
[/color][color=#0A246A]fsub [/color][color=#000000]@calcparticle.dpy
[/color][color=#0A246A]fst [/color][color=#000000]@calcparticle.dpy
[/color][color=#0A246A]fmul [/color][color=#000000]@calcparticle.dpy
[/color][color=#0A246A]fst [/color][color=#000000]@forceYY
[/color][color=#0A246A]finit
fld [/color][color=#000000]@thisparticle.dpz
[/color][color=#0A246A]fsub [/color][color=#000000]@calcparticle.dpz
[/color][color=#0A246A]fst [/color][color=#000000]@calcparticle.dpz
[/color][color=#0A246A]fmul [/color][color=#000000]@calcparticle.dpz
[/color][color=#0A246A]fst [/color][color=#000000]@forceZZ
[/color][color=#0A246A]fld [/color][color=#000000]@forceXX
[/color][color=#0A246A]fadd [/color][color=#000000]@forceYY
[/color][color=#0A246A]fadd [/color][color=#000000]@forceZZ [/color][/font][font=Comic Sans MS][color=#008000];X^2+Y^2+Z^2
[/color][/font][font=Fixedsys][color=#0A246A]fsqrt
fst [/color][color=#000000]@middle [/color][/font][font=Comic Sans MS][color=#008000];存储距离大小,因为后面限制了粒子的活动范围,所以现在的距离一定可以正常的运算出来
;下一步,比较距离,分析
[/color][/font][font=Fixedsys][color=#0A246A]finit
fld [/color][color=#000000]@middle
[/color][color=#0A246A]fcom [/color][color=#000000]dt40
[/color][color=#0A246A]fstsw [/color][color=#FF8000]ax
[/color][color=#0A246A]sahf
ja [/color][color=#000000]up40
[/color][/font][font=Comic Sans MS][color=#008000];小于40时候的代码
[/color][/font][font=Fixedsys][color=#0A246A]finit
fld [/color][color=#000000]dt40
[/color][color=#0A246A]fsub [/color][color=#000000]@middle
[/color][color=#0A246A]fld1
fscale
fst [/color][color=#000000]@middle1
[/color][color=#0A246A]jmp [/color][color=#000000]calcbranch
up40[/color][color=#0A246A]:
finit
fld [/color][color=#000000]@middle
[/color][color=#0A246A]fcom [/color][color=#000000]dt70
[/color][color=#0A246A]fstsw [/color][color=#FF8000]ax
[/color][color=#0A246A]sahf
ja [/color][color=#000000]up70
[/color][/font][font=Comic Sans MS][color=#008000];此处为40_70时候的代码
[/color][/font][font=Fixedsys][color=#0A246A]finit
fld [/color][color=#000000]dt40
[/color][color=#0A246A]fsub [/color][color=#000000]@middle
[/color][color=#0A246A]fst [/color][color=#000000]@middle1
[/color][color=#0A246A]fmul [/color][color=#000000]@middle1
[/color][color=#0A246A]fchs
fst [/color][color=#000000]@middle1 [/color][/font][font=Comic Sans MS][color=#008000];记录数值,也就是F
[/color][/font][font=Fixedsys][color=#0A246A]jmp [/color][color=#000000]calcbranch
up70[/color][color=#0A246A]:
[/color][/font][font=Comic Sans MS][color=#008000];大于70的代码
[/color][/font][font=Fixedsys][color=#0A246A]finit
fld [/color][color=#000000]dt156
[/color][color=#0A246A]fsub [/color][color=#000000]@middle
[/color][color=#0A246A]fst [/color][color=#000000]@middle1 [/color][/font][font=Comic Sans MS][color=#008000];暂时保留
[/color][/font][font=Fixedsys][color=#0A246A]fmul [/color][color=#000000]@middle1
[/color][color=#0A246A]fchs
fst [/color][color=#000000]@middle1[/color][/font][font=Comic Sans MS][color=#008000];记录数值,也就是F
[/color][/font][font=Fixedsys][color=#0A246A]fsub [/color][color=#000000]dt100
[/color][color=#0A246A]fst [/color][color=#000000]@middle1[/color][/font][font=Comic Sans MS][color=#008000];记录数值,也就是F
;在上面的计算中,没有可以超出计算范围的数字,最大的是2^40,也没有超过浮点表示范围.
[/color][/font][font=Fixedsys][color=#000000]calcbranch[/color][color=#0A246A]:
[/color][color=#000000]calcX[/color][color=#0A246A]:
finit
fld [/color][color=#000000]@calcparticle.dpx
[/color][color=#0A246A]fmul [/color][color=#000000]@middle1
[/color][color=#0A246A]fld [/color][color=#000000]@middle
[/color][color=#0A246A]fdiv
fst [/color][color=#000000]@forceXX [/color][/font][font=Comic Sans MS][color=#008000];记录X轴分力
[/color][/font][font=Fixedsys][color=#0A246A]fmul [/color][color=#000000]dtm
[/color][color=#0A246A]fmul [/color][color=#000000]dtt
[/color][color=#0A246A]fadd [/color][color=#000000]@thisparticle.dvx
[/color][color=#0A246A]fst [/color][color=#000000]@thisparticle.dvx [/color][/font][font=Comic Sans MS][color=#008000];计算速度
[/color][/font][font=Fixedsys][color=#0A246A]finit
fld [/color][color=#000000]dtt
[/color][color=#0A246A]fld [/color][color=#000000]@thisparticle.dvx
[/color][color=#0A246A]fmul
fst [/color][color=#000000]@tmp0
[/color][color=#0A246A]fld [/color][color=#000000]@forceXX
[/color][color=#0A246A]fmul [/color][color=#000000]dttt2
[/color][color=#0A246A]fadd [/color][color=#000000]@tmp0 [/color][/font][font=Comic Sans MS][color=#008000];得到位移,计算边界
[/color][/font][font=Fixedsys][color=#0A246A]fst [/color][color=#000000]@tmp0 [/color][/font][font=Comic Sans MS][color=#008000];暂存位移
[/color][/font][font=Fixedsys][color=#0A246A]fld [/color][color=#000000]dtlimit
[/color][color=#0A246A]fld [/color][color=#000000]@tmp0
[/color][color=#0A246A]fprem
fst [/color][color=#000000]@tmp0 [/color][/font][font=Comic Sans MS][color=#008000];暂存余数.
[/color][/font][font=Fixedsys][color=#0A246A]fadd [/color][color=#000000]@thisparticle.dpx [/color][/font][font=Comic Sans MS][color=#008000];得到坐标
[/color][/font][font=Fixedsys][color=#0A246A]fst [/color][color=#000000]@thisparticle.dpx
uplimitx[/color][color=#0A246A]:
finit
fld [/color][color=#000000]@thisparticle.dpx
[/color][color=#0A246A]fcom [/color][color=#000000]dtlimitz
[/color][color=#0A246A]fstsw [/color][color=#FF8000]ax
[/color][color=#0A246A]sahf
ja [/color][color=#000000]backup0x
[/color][color=#0A246A]jmp [/color][color=#000000]lowlimit0x
backup0x[/color][color=#0A246A]:
fld [/color][color=#000000]@thisparticle.dpx
[/color][color=#0A246A]fsub [/color][color=#000000]dtlimitz
[/color][color=#0A246A]fst [/color][color=#000000]@tmp1
[/color][color=#0A246A]fld [/color][color=#000000]dtlimitz
[/color][color=#0A246A]fsub [/color][color=#000000]@tmp1
[/color][color=#0A246A]fst [/color][color=#000000]@thisparticle.dpx
[/color][color=#0A246A]fld [/color][color=#000000]@thisparticle.dvx
[/color][color=#0A246A]fchs
fst [/color][color=#000000]@thisparticle.dvx
lowlimit0x[/color][color=#0A246A]:
finit
fld [/color][color=#000000]@thisparticle.dpx
[/color][color=#0A246A]fcom [/color][color=#000000]dtlimitf
[/color][color=#0A246A]fstsw [/color][color=#FF8000]ax
[/color][color=#0A246A]sahf
jb [/color][color=#000000]backlowx
[/color][color=#0A246A]jmp [/color][color=#000000]uplimit1x
backlowx[/color][color=#0A246A]:
fld [/color][color=#000000]@thisparticle.dpx
[/color][color=#0A246A]fsub [/color][color=#000000]dtlimitf
[/color][color=#0A246A]fst [/color][color=#000000]@tmp1
[/color][color=#0A246A]fld [/color][color=#000000]dtlimitf
[/color][color=#0A246A]fsub [/color][color=#000000]@tmp1
[/color][color=#0A246A]fst [/color][color=#000000]@thisparticle.dpx
[/color][color=#0A246A]fld [/color][color=#000000]@thisparticle.dvx
[/color][color=#0A246A]fchs
fst [/color][color=#000000]@thisparticle.dvx
uplimit1x[/color][color=#0A246A]:
finit
fld [/color][color=#000000]@thisparticle.dpx
[/color][color=#0A246A]fcom [/color][color=#000000]dtlimitz
[/color][color=#0A246A]fstsw [/color][color=#FF8000]ax
[/color][color=#0A246A]sahf
ja [/color][color=#000000]backup1x
[/color][color=#0A246A]jmp [/color][color=#000000]calcY
backup1x[/color][color=#0A246A]:
fld [/color][color=#000000]@thisparticle.dpx
[/color][color=#0A246A]fsub [/color][color=#000000]dtlimitz
[/color][color=#0A246A]fst [/color][color=#000000]@tmp1
[/color][color=#0A246A]fld [/color][color=#000000]dtlimitz
[/color][color=#0A246A]fsub [/color][color=#000000]@tmp1
[/color][color=#0A246A]fst [/color][color=#000000]@thisparticle.dpx
[/color][color=#0A246A]fld [/color][color=#000000]@thisparticle.dvx
[/color][color=#0A246A]fchs
fst [/color][color=#000000]@thisparticle.dvx
calcY[/color][color=#0A246A]:
finit
fld [/color][color=#000000]@calcparticle.dpy
[/color][color=#0A246A]fmul [/color][color=#000000]@middle1
[/color][color=#0A246A]fld [/color][color=#000000]@middle
[/color][color=#0A246A]fdiv
fst [/color][color=#000000]@forceYY [/color][/font][font=Comic Sans MS][color=#008000];记录Y轴分力
[/color][/font][font=Fixedsys][color=#0A246A]fmul [/color][color=#000000]dtm
[/color][color=#0A246A]fmul [/color][color=#000000]dtt
[/color][color=#0A246A]fadd [/color][color=#000000]@thisparticle.dvy
[/color][color=#0A246A]fst [/color][color=#000000]@thisparticle.dvy [/color][/font][font=Comic Sans MS][color=#008000];计算速度
[/color][/font][font=Fixedsys][color=#0A246A]finit
fld [/color][color=#000000]dtt
[/color][color=#0A246A]fld [/color][color=#000000]@thisparticle.dvy
[/color][color=#0A246A]fmul
fst [/color][color=#000000]@tmp0
[/color][color=#0A246A]fld [/color][color=#000000]@forceYY
[/color][color=#0A246A]fmul [/color][color=#000000]dttt2
[/color][color=#0A246A]fadd [/color][color=#000000]@tmp0 [/color][/font][font=Comic Sans MS][color=#008000];得到位移,计算边界
[/color][/font][font=Fixedsys][color=#0A246A]fst [/color][color=#000000]@tmp0 [/color][/font][font=Comic Sans MS][color=#008000];暂存位移
[/color][/font][font=Fixedsys][color=#0A246A]fld [/color][color=#000000]dtlimit
[/color][color=#0A246A]fld [/color][color=#000000]@tmp0
[/color][color=#0A246A]fprem
fst [/color][color=#000000]@tmp0 [/color][/font][font=Comic Sans MS][color=#008000];暂存余数.
[/color][/font][font=Fixedsys][color=#0A246A]fadd [/color][color=#000000]@thisparticle.dpy [/color][/font][font=Comic Sans MS][color=#008000];得到坐标
[/color][/font][font=Fixedsys][color=#0A246A]fst [/color][color=#000000]@thisparticle.dpy
uplimity[/color][color=#0A246A]:
finit
fld [/color][color=#000000]@thisparticle.dpy
[/color][color=#0A246A]fcom [/color][color=#000000]dtlimitz
[/color][color=#0A246A]fstsw [/color][color=#FF8000]ax
[/color][color=#0A246A]sahf
ja [/color][color=#000000]backup0y
[/color][color=#0A246A]jmp [/color][color=#000000]lowlimit0y
backup0y[/color][color=#0A246A]:
fld [/color][color=#000000]@thisparticle.dpy
[/color][color=#0A246A]fsub [/color][color=#000000]dtlimitz
[/color][color=#0A246A]fst [/color][color=#000000]@tmp1
[/color][color=#0A246A]fld [/color][color=#000000]dtlimitz
[/color][color=#0A246A]fsub [/color][color=#000000]@tmp1
[/color][color=#0A246A]fst [/color][color=#000000]@thisparticle.dpy
[/color][color=#0A246A]fld [/color][color=#000000]@thisparticle.dvy
[/color][color=#0A246A]fchs
fst [/color][color=#000000]@thisparticle.dvy
lowlimit0y[/color][color=#0A246A]:
finit
fld [/color][color=#000000]@thisparticle.dpy
[/color][color=#0A246A]fcom [/color][color=#000000]dtlimitf
[/color][color=#0A246A]fstsw [/color][color=#FF8000]ax
[/color][color=#0A246A]sahf
jb [/color][color=#000000]backlowy
[/color][color=#0A246A]jmp [/color][color=#000000]uplimit1y
backlowy[/color][color=#0A246A]:
fld [/color][color=#000000]@thisparticle.dpy
[/color][color=#0A246A]fsub [/color][color=#000000]dtlimitf
[/color][color=#0A246A]fst [/color][color=#000000]@tmp1
[/color][color=#0A246A]fld [/color][color=#000000]dtlimitf
[/color][color=#0A246A]fsub [/color][color=#000000]@tmp1
[/color][color=#0A246A]fst [/color][color=#000000]@thisparticle.dpy
[/color][color=#0A246A]fld [/color][color=#000000]@thisparticle.dvy
[/color][color=#0A246A]fchs
fst [/color][color=#000000]@thisparticle.dvy
uplimit1y[/color][color=#0A246A]:
finit
fld [/color][color=#000000]@thisparticle.dpy
[/color][color=#0A246A]fcom [/color][color=#000000]dtlimitz
[/color][color=#0A246A]fstsw [/color][color=#FF8000]ax
[/color][color=#0A246A]sahf
ja [/color][color=#000000]backup1y
[/color][color=#0A246A]jmp [/color][color=#000000]calcZ
backup1y[/color][color=#0A246A]:
fld [/color][color=#000000]@thisparticle.dpy
[/color][color=#0A246A]fsub [/color][color=#000000]dtlimitz
[/color][color=#0A246A]fst [/color][color=#000000]@tmp1
[/color][color=#0A246A]fld [/color][color=#000000]dtlimitz
[/color][color=#0A246A]fsub [/color][color=#000000]@tmp1
[/color][color=#0A246A]fst [/color][color=#000000]@thisparticle.dpy
[/color][color=#0A246A]fld [/color][color=#000000]@thisparticle.dvy
[/color][color=#0A246A]fchs
fst [/color][color=#000000]@thisparticle.dvy
calcZ[/color][color=#0A246A]:
finit
fld [/color][color=#000000]@calcparticle.dpz
[/color][color=#0A246A]fmul [/color][color=#000000]@middle1
[/color][color=#0A246A]fld [/color][color=#000000]@middle
[/color][color=#0A246A]fdiv
fst [/color][color=#000000]@forceZZ [/color][/font][font=Comic Sans MS][color=#008000];记录Z轴分力
[/color][/font][font=Fixedsys][color=#0A246A]fmul [/color][color=#000000]dtm
[/color][color=#0A246A]fmul [/color][color=#000000]dtt
[/color][color=#0A246A]fadd [/color][color=#000000]@thisparticle.dvz
[/color][color=#0A246A]fst [/color][color=#000000]@thisparticle.dvz [/color][/font][font=Comic Sans MS][color=#008000];计算速度
[/color][/font][font=Fixedsys][color=#0A246A]finit
fld [/color][color=#000000]dtt
[/color][color=#0A246A]fmul [/color][color=#000000]@thisparticle.dvz
[/color][color=#0A246A]fst [/color][color=#000000]@tmp0
[/color][color=#0A246A]fld [/color][color=#000000]@forceZZ
[/color][color=#0A246A]fmul [/color][color=#000000]dttt2
[/color][color=#0A246A]fadd [/color][color=#000000]@tmp0 [/color][/font][font=Comic Sans MS][color=#008000];得到位移,计算边界
[/color][/font][font=Fixedsys][color=#0A246A]fst [/color][color=#000000]@tmp0 [/color][/font][font=Comic Sans MS][color=#008000];暂存位移
[/color][/font][font=Fixedsys][color=#0A246A]fld [/color][color=#000000]dtlimit
[/color][color=#0A246A]fld [/color][color=#000000]@tmp0
[/color][color=#0A246A]fprem
fst [/color][color=#000000]@tmp0 [/color][/font][font=Comic Sans MS][color=#008000];暂存余数.
[/color][/font][font=Fixedsys][color=#0A246A]fadd [/color][color=#000000]@thisparticle.dpz [/color][/font][font=Comic Sans MS][color=#008000];得到坐标
[/color][/font][font=Fixedsys][color=#0A246A]fst [/color][color=#000000]@thisparticle.dpz
uplimitz[/color][color=#0A246A]:
finit
fld [/color][color=#000000]@thisparticle.dpz
[/color][color=#0A246A]fcom [/color][color=#000000]dtlimitz
[/color][color=#0A246A]fstsw [/color][color=#FF8000]ax
[/color][color=#0A246A]sahf
ja [/color][color=#000000]backup0z
[/color][color=#0A246A]jmp [/color][color=#000000]lowlimit0z
backup0z[/color][color=#0A246A]:
fld [/color][color=#000000]@thisparticle.dpz
[/color][color=#0A246A]fsub [/color][color=#000000]dtlimitz
[/color][color=#0A246A]fst [/color][color=#000000]@tmp1
[/color][color=#0A246A]fld [/color][color=#000000]dtlimitz
[/color][color=#0A246A]fsub [/color][color=#000000]@tmp1
[/color][color=#0A246A]fst [/color][color=#000000]@thisparticle.dpz
[/color][color=#0A246A]fld [/color][color=#000000]@thisparticle.dvz
[/color][color=#0A246A]fchs
fst [/color][color=#000000]@thisparticle.dvz
lowlimit0z[/color][color=#0A246A]:
finit
fld [/color][color=#000000]@thisparticle.dpz
[/color][color=#0A246A]fcom [/color][color=#000000]dtlimitf
[/color][color=#0A246A]fstsw [/color][color=#FF8000]ax
[/color][color=#0A246A]sahf
jb [/color][color=#000000]backlowz
[/color][color=#0A246A]jmp [/color][color=#000000]uplimit1z
backlowz[/color][color=#0A246A]:
fld [/color][color=#000000]@thisparticle.dpz
[/color][color=#0A246A]fsub [/color][color=#000000]dtlimitf
[/color][color=#0A246A]fst [/color][color=#000000]@tmp1
[/color][color=#0A246A]fld [/color][color=#000000]dtlimitf
[/color][color=#0A246A]fsub [/color][color=#000000]@tmp1
[/color][color=#0A246A]fst [/color][color=#000000]@thisparticle.dpz
[/color][color=#0A246A]fld [/color][color=#000000]@thisparticle.dvz
[/color][color=#0A246A]fchs
fst [/color][color=#000000]@thisparticle.dvz
uplimit1z[/color][color=#0A246A]:
finit
fld [/color][color=#000000]@thisparticle.dpz
[/color][color=#0A246A]fcom [/color][color=#000000]dtlimitz
[/color][color=#0A246A]fstsw [/color][color=#FF8000]ax
[/color][color=#0A246A]sahf
ja [/color][color=#000000]backup1z
[/color][color=#0A246A]jmp [/color][color=#000000]outcalc
backup1z[/color][color=#0A246A]:
fld [/color][color=#000000]@thisparticle.dpz
[/color][color=#0A246A]fsub [/color][color=#000000]dtlimitz
[/color][color=#0A246A]fst [/color][color=#000000]@tmp1
[/color][color=#0A246A]fld [/color][color=#000000]dtlimitz
[/color][color=#0A246A]fsub [/color][color=#000000]@tmp1
[/color][color=#0A246A]fst [/color][color=#000000]@thisparticle.dpz
[/color][color=#0A246A]fld [/color][color=#000000]@thisparticle.dvz
[/color][color=#0A246A]fchs
fst [/color][color=#000000]@thisparticle.dvz
outcalc[/color][color=#0A246A]:
mov [/color][color=#FF8000]eax[/color][color=#0A246A],[/color][color=#000000]_which
[/color][color=#0A246A]mul [/color][color=#000000]sizeofdtparticle
[/color][color=#0A246A]mov [/color][color=#FF8000]esi[/color][color=#0A246A],offset [/color][color=#000000]dtparticle0
[/color][color=#0A246A]add [/color][color=#FF8000]esi[/color][color=#0A246A],[/color][color=#FF8000]eax [/color][/font][font=Comic Sans MS][color=#008000];获取要与计算粒子计算的粒子相对于粒子0的偏移量
[/color][/font][font=Fixedsys][color=#0A246A]finit
assume [/color][color=#FF8000]esi[/color][color=#0A246A]:ptr [/color][color=#000000]PARTICLE
[/color][color=#0A246A]fld [/color][color=#000000]@thisparticle.dpx
[/color][color=#0A246A]fstp [[/color][color=#FF8000]esi[/color][color=#0A246A]][/color][color=#000000].dpx
[/color][color=#0A246A]fld [/color][color=#000000]@thisparticle.dpy
[/color][color=#0A246A]fstp [[/color][color=#FF8000]esi[/color][color=#0A246A]][/color][color=#000000].dpy
[/color][color=#0A246A]fld [/color][color=#000000]@thisparticle.dpz
[/color][color=#0A246A]fstp [[/color][color=#FF8000]esi[/color][color=#0A246A]][/color][color=#000000].dpz
[/color][color=#0A246A]fld [/color][color=#000000]@thisparticle.dvx
[/color][color=#0A246A]fstp [[/color][color=#FF8000]esi[/color][color=#0A246A]][/color][color=#000000].dvx
[/color][color=#0A246A]fld [/color][color=#000000]@thisparticle.dvy
[/color][color=#0A246A]fstp [[/color][color=#FF8000]esi[/color][color=#0A246A]][/color][color=#000000].dvy
[/color][color=#0A246A]fld [/color][color=#000000]@thisparticle.dvz
[/color][color=#0A246A]fstp [[/color][color=#FF8000]esi[/color][color=#0A246A]][/color][color=#000000].dvz
[/color][color=#0A246A]assume [/color][color=#FF8000]esi[/color][color=#0A246A]:nothing [/color][/font][font=Comic Sans MS][color=#008000];保存要计算的粒子
[/color][/font][font=Fixedsys][color=#0A246A]pop [/color][color=#FF8000]ecx [/color][/font][font=Comic Sans MS][color=#008000];恢复
[/color][/font][font=Fixedsys][color=#0A246A]inc [/color][color=#FF8000]ecx
[/color][color=#0A246A].endw
ret
[/color][color=#000000]Calc [/color][color=#0A246A]endp
[/color][/font][font=Comic Sans MS][color=#008000];==================================================
[/color][/font][font=Fixedsys][color=#000000]printfnumber [/color][color=#0A246A]proc uses [/color][color=#FF8000]eax ebx [/color][color=#000000]middlee[/color][color=#0A246A]:qword
local [/color][color=#000000]@test
[/color][color=#0A246A]mov [/color][color=#FF8000]esi[/color][color=#0A246A],[/color][color=#000000]lpMemory
[/color][color=#0A246A]mov [/color][color=#FF8000]eax[/color][color=#0A246A],dword ptr [/color][color=#000000]middlee
[/color][color=#0A246A]mov [/color][color=#FF8000]ebx[/color][color=#0A246A],[/color][color=#000000]lprand0
[/color][color=#0A246A].if [/color][color=#FF8000]ebx[/color][color=#0A246A]>[/color][color=#800080]38000
[/color][color=#0A246A]xor [/color][color=#FF8000]ebx[/color][color=#0A246A],[/color][color=#FF8000]ebx
[/color][color=#0A246A]mov dword ptr [[/color][color=#FF8000]esi[/color][color=#0A246A]],[/color][color=#FF8000]eax
[/color][color=#0A246A]mov [/color][color=#000000]lprand0[/color][color=#0A246A],[/color][color=#FF8000]ebx
[/color][color=#0A246A].else
add [/color][color=#FF8000]esi[/color][color=#0A246A],[/color][color=#000000]lprand0
[/color][color=#0A246A]mov dword ptr [[/color][color=#FF8000]esi[/color][color=#0A246A]],[/color][color=#FF8000]eax
[/color][color=#0A246A]add [/color][color=#000000]lprand0[/color][color=#0A246A],[/color][color=#800080]4
[/color][color=#0A246A].endif
ret
[/color][color=#000000]printfnumber [/color][color=#0A246A]endp
[/color][/font][font=Comic Sans MS][color=#008000];====================================================
[/color][/font][font=Fixedsys][color=#000000]Calc0 [/color][color=#0A246A]proc uses [/color][color=#FF8000]ebx eax [/color][/font][font=Comic Sans MS][color=#008000];线程函数,进行运算的
[/color][/font][font=Fixedsys][color=#0A246A]local [/color][color=#000000]@test
[/color][color=#0A246A]local [/color][color=#000000]@for
[/color][color=#0A246A]invoke [/color][color=#000000]WaitForSingleObject[/color][color=#0A246A],[/color][color=#000000]hEventCreate[/color][color=#0A246A],[/color][color=#000000]INFINITE [/color][/font][font=Comic Sans MS][color=#008000];等待可以开始事件
[/color][/font][font=Fixedsys][color=#0A246A].while [/color][color=#000000]TRUE
[/color][color=#0A246A]mov [/color][color=#FF8000]ebx[/color][color=#0A246A],[/color][color=#800080]350
[/color][color=#0A246A].while [/color][color=#FF8000]ebx[/color][color=#000000]![/color][color=#0A246A]=[/color][color=#800080]0
[/color][color=#0A246A]dec [/color][color=#FF8000]ebx
[/color][color=#0A246A]push [/color][color=#FF8000]ebx
[/color][color=#0A246A]invoke [/color][color=#000000]Calc[/color][color=#0A246A],[/color][color=#800080]0
[/color][color=#0A246A]pop [/color][color=#FF8000]ebx
[/color][color=#0A246A].endw
invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle0.dpx
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle0.dpy
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle0.dpz
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle0.dvx
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle0.dvy
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle0.dvz
[/color][color=#0A246A]invoke [/color][color=#000000]Sleep[/color][color=#0A246A],[/color][color=#000000]dttime
[/color][color=#0A246A]mov [/color][color=#FF8000]eax[/color][color=#0A246A],[/color][color=#000000]eventout
[/color][color=#0A246A].if [/color][color=#FF8000]eax
[/color][color=#0A246A]ret
.endif
.endw
[/color][color=#000000]Calc0 [/color][color=#0A246A]endp
[/color][/font][font=Comic Sans MS][color=#008000];==================================================
[/color][/font][font=Fixedsys][color=#000000]Calc1 [/color][color=#0A246A]proc uses [/color][color=#FF8000]ebx eax [/color][/font][font=Comic Sans MS][color=#008000];线程函数,进行运算的
[/color][/font][font=Fixedsys][color=#0A246A]local [/color][color=#000000]@test
[/color][color=#0A246A]local [/color][color=#000000]@for
[/color][color=#0A246A]invoke [/color][color=#000000]WaitForSingleObject[/color][color=#0A246A],[/color][color=#000000]hEventCreate[/color][color=#0A246A],[/color][color=#000000]INFINITE [/color][/font][font=Comic Sans MS][color=#008000];等待可以开始事件
[/color][/font][font=Fixedsys][color=#0A246A].while [/color][color=#000000]TRUE
[/color][color=#0A246A]mov [/color][color=#FF8000]ebx[/color][color=#0A246A],[/color][color=#800080]350
[/color][color=#0A246A].while [/color][color=#FF8000]ebx[/color][color=#000000]![/color][color=#0A246A]=[/color][color=#800080]0
[/color][color=#0A246A]dec [/color][color=#FF8000]ebx
[/color][color=#0A246A]push [/color][color=#FF8000]ebx
[/color][color=#0A246A]invoke [/color][color=#000000]Calc[/color][color=#0A246A],[/color][color=#800080]1
[/color][color=#0A246A]pop [/color][color=#FF8000]ebx
[/color][color=#0A246A].endw
invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle1.dpx
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle1.dpy
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle1.dpz
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle1.dvx
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle1.dvy
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle1.dvz
[/color][color=#0A246A]invoke [/color][color=#000000]Sleep[/color][color=#0A246A],[/color][color=#000000]dttime
[/color][color=#0A246A]mov [/color][color=#FF8000]eax[/color][color=#0A246A],[/color][color=#000000]eventout
[/color][color=#0A246A].if [/color][color=#FF8000]eax
[/color][color=#0A246A]ret
.endif
.endw
[/color][color=#000000]Calc1 [/color][color=#0A246A]endp
[/color][/font][font=Comic Sans MS][color=#008000];======================================================
[/color][/font][font=Fixedsys][color=#000000]Calc2 [/color][color=#0A246A]proc uses [/color][color=#FF8000]ebx eax [/color][/font][font=Comic Sans MS][color=#008000];线程函数,进行运算的
[/color][/font][font=Fixedsys][color=#0A246A]local [/color][color=#000000]@test
[/color][color=#0A246A]local [/color][color=#000000]@for
[/color][color=#0A246A]invoke [/color][color=#000000]WaitForSingleObject[/color][color=#0A246A],[/color][color=#000000]hEventCreate[/color][color=#0A246A],[/color][color=#000000]INFINITE [/color][/font][font=Comic Sans MS][color=#008000];等待可以开始事件
[/color][/font][font=Fixedsys][color=#0A246A].while [/color][color=#000000]TRUE
[/color][color=#0A246A]mov [/color][color=#FF8000]ebx[/color][color=#0A246A],[/color][color=#800080]350
[/color][color=#0A246A].while [/color][color=#FF8000]ebx[/color][color=#000000]![/color][color=#0A246A]=[/color][color=#800080]0
[/color][color=#0A246A]dec [/color][color=#FF8000]ebx
[/color][color=#0A246A]push [/color][color=#FF8000]ebx
[/color][color=#0A246A]invoke [/color][color=#000000]Calc[/color][color=#0A246A],[/color][color=#800080]2
[/color][color=#0A246A]pop [/color][color=#FF8000]ebx
[/color][color=#0A246A].endw
invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle2.dpx
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle2.dpy
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle2.dpz
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle2.dvx
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle2.dvy
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle2.dvz
[/color][color=#0A246A]invoke [/color][color=#000000]Sleep[/color][color=#0A246A],[/color][color=#000000]dttime
[/color][color=#0A246A]mov [/color][color=#FF8000]eax[/color][color=#0A246A],[/color][color=#000000]eventout
[/color][color=#0A246A].if [/color][color=#FF8000]eax
[/color][color=#0A246A]ret
.endif
.endw
[/color][color=#000000]Calc2 [/color][color=#0A246A]endp
[/color][/font][font=Comic Sans MS][color=#008000];=========================================================
[/color][/font][font=Fixedsys][color=#000000]Calc3 [/color][color=#0A246A]proc uses [/color][color=#FF8000]ebx eax [/color][/font][font=Comic Sans MS][color=#008000];线程函数,进行运算的
[/color][/font][font=Fixedsys][color=#0A246A]local [/color][color=#000000]@test
[/color][color=#0A246A]local [/color][color=#000000]@for
[/color][color=#0A246A]invoke [/color][color=#000000]WaitForSingleObject[/color][color=#0A246A],[/color][color=#000000]hEventCreate[/color][color=#0A246A],[/color][color=#000000]INFINITE [/color][/font][font=Comic Sans MS][color=#008000];等待可以开始事件
[/color][/font][font=Fixedsys][color=#0A246A].while [/color][color=#000000]TRUE
[/color][color=#0A246A]mov [/color][color=#FF8000]ebx[/color][color=#0A246A],[/color][color=#800080]350
[/color][color=#0A246A].while [/color][color=#FF8000]ebx[/color][color=#000000]![/color][color=#0A246A]=[/color][color=#800080]0
[/color][color=#0A246A]dec [/color][color=#FF8000]ebx
[/color][color=#0A246A]push [/color][color=#FF8000]ebx
[/color][color=#0A246A]invoke [/color][color=#000000]Calc[/color][color=#0A246A],[/color][color=#800080]3
[/color][color=#0A246A]pop [/color][color=#FF8000]ebx
[/color][color=#0A246A].endw
invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle3.dpx
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle3.dpy
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle3.dpz
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle3.dvx
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle3.dvy
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle3.dvz
[/color][color=#0A246A]invoke [/color][color=#000000]Sleep[/color][color=#0A246A],[/color][color=#000000]dttime
[/color][color=#0A246A]mov [/color][color=#FF8000]eax[/color][color=#0A246A],[/color][color=#000000]eventout
[/color][color=#0A246A].if [/color][color=#FF8000]eax
[/color][color=#0A246A]ret
.endif
.endw
[/color][color=#000000]Calc3 [/color][color=#0A246A]endp
[/color][/font][font=Comic Sans MS][color=#008000];-----------------------------------------------------
[/color][/font][font=Fixedsys][color=#000000]Calc4 [/color][color=#0A246A]proc uses [/color][color=#FF8000]ebx eax [/color][/font][font=Comic Sans MS][color=#008000];线程函数,进行运算的
[/color][/font][font=Fixedsys][color=#0A246A]local [/color][color=#000000]@test
[/color][color=#0A246A]local [/color][color=#000000]@for
[/color][color=#0A246A]invoke [/color][color=#000000]WaitForSingleObject[/color][color=#0A246A],[/color][color=#000000]hEventCreate[/color][color=#0A246A],[/color][color=#000000]INFINITE [/color][/font][font=Comic Sans MS][color=#008000];等待可以开始事件
[/color][/font][font=Fixedsys][color=#0A246A].while [/color][color=#000000]TRUE
[/color][color=#0A246A]mov [/color][color=#FF8000]ebx[/color][color=#0A246A],[/color][color=#800080]350
[/color][color=#0A246A].while [/color][color=#FF8000]ebx[/color][color=#000000]![/color][color=#0A246A]=[/color][color=#800080]0
[/color][color=#0A246A]dec [/color][color=#FF8000]ebx
[/color][color=#0A246A]push [/color][color=#FF8000]ebx
[/color][color=#0A246A]invoke [/color][color=#000000]Calc[/color][color=#0A246A],[/color][color=#800080]4
[/color][color=#0A246A]pop [/color][color=#FF8000]ebx
[/color][color=#0A246A].endw
invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle4.dpx
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle4.dpy
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle4.dpz
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle4.dvx
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle4.dvy
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle4.dvz
[/color][color=#0A246A]invoke [/color][color=#000000]Sleep[/color][color=#0A246A],[/color][color=#000000]dttime
[/color][color=#0A246A]mov [/color][color=#FF8000]eax[/color][color=#0A246A],[/color][color=#000000]eventout
[/color][color=#0A246A].if [/color][color=#FF8000]eax
[/color][color=#0A246A]ret
.endif
.endw
[/color][color=#000000]Calc4 [/color][color=#0A246A]endp
[/color][color=#000000]Calc5 [/color][color=#0A246A]proc uses [/color][color=#FF8000]ebx eax [/color][/font][font=Comic Sans MS][color=#008000];线程函数,进行运算的
[/color][/font][font=Fixedsys][color=#0A246A]local [/color][color=#000000]@test
[/color][color=#0A246A]local [/color][color=#000000]@for
[/color][color=#0A246A]invoke [/color][color=#000000]WaitForSingleObject[/color][color=#0A246A],[/color][color=#000000]hEventCreate[/color][color=#0A246A],[/color][color=#000000]INFINITE [/color][/font][font=Comic Sans MS][color=#008000];等待可以开始事件
[/color][/font][font=Fixedsys][color=#0A246A].while [/color][color=#000000]TRUE
[/color][color=#0A246A]mov [/color][color=#FF8000]ebx[/color][color=#0A246A],[/color][color=#800080]350
[/color][color=#0A246A].while [/color][color=#FF8000]ebx[/color][color=#000000]![/color][color=#0A246A]=[/color][color=#800080]0
[/color][color=#0A246A]dec [/color][color=#FF8000]ebx
[/color][color=#0A246A]push [/color][color=#FF8000]ebx
[/color][color=#0A246A]invoke [/color][color=#000000]Calc[/color][color=#0A246A],[/color][color=#800080]5
[/color][color=#0A246A]pop [/color][color=#FF8000]ebx
[/color][color=#0A246A].endw
invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle5.dpx
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle5.dpy
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle5.dpz
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle5.dvx
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle5.dvy
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle5.dvz
[/color][color=#0A246A]invoke [/color][color=#000000]Sleep[/color][color=#0A246A],[/color][color=#000000]dttime
[/color][color=#0A246A]mov [/color][color=#FF8000]eax[/color][color=#0A246A],[/color][color=#000000]eventout
[/color][color=#0A246A].if [/color][color=#FF8000]eax
[/color][color=#0A246A]ret
.endif
.endw
[/color][color=#000000]Calc5 [/color][color=#0A246A]endp
[/color][color=#000000]Calc6 [/color][color=#0A246A]proc uses [/color][color=#FF8000]ebx eax [/color][/font][font=Comic Sans MS][color=#008000];线程函数,进行运算的
[/color][/font][font=Fixedsys][color=#0A246A]local [/color][color=#000000]@test
[/color][color=#0A246A]local [/color][color=#000000]@for
[/color][color=#0A246A]invoke [/color][color=#000000]WaitForSingleObject[/color][color=#0A246A],[/color][color=#000000]hEventCreate[/color][color=#0A246A],[/color][color=#000000]INFINITE [/color][/font][font=Comic Sans MS][color=#008000];等待可以开始事件
[/color][/font][font=Fixedsys][color=#0A246A].while [/color][color=#000000]TRUE
[/color][color=#0A246A]mov [/color][color=#FF8000]ebx[/color][color=#0A246A],[/color][color=#800080]350
[/color][color=#0A246A].while [/color][color=#FF8000]ebx[/color][color=#000000]![/color][color=#0A246A]=[/color][color=#800080]0
[/color][color=#0A246A]dec [/color][color=#FF8000]ebx
[/color][color=#0A246A]push [/color][color=#FF8000]ebx
[/color][color=#0A246A]invoke [/color][color=#000000]Calc[/color][color=#0A246A],[/color][color=#800080]6
[/color][color=#0A246A]pop [/color][color=#FF8000]ebx
[/color][color=#0A246A].endw
invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle6.dpx
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle6.dpy
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle6.dpz
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle6.dvx
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle6.dvy
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle6.dvz
[/color][color=#0A246A]invoke [/color][color=#000000]Sleep[/color][color=#0A246A],[/color][color=#000000]dttime
[/color][color=#0A246A]mov [/color][color=#FF8000]eax[/color][color=#0A246A],[/color][color=#000000]eventout
[/color][color=#0A246A].if [/color][color=#FF8000]eax
[/color][color=#0A246A]ret
.endif
.endw
[/color][color=#000000]Calc6 [/color][color=#0A246A]endp
[/color][color=#000000]Calc7 [/color][color=#0A246A]proc uses [/color][color=#FF8000]ebx eax [/color][/font][font=Comic Sans MS][color=#008000];线程函数,进行运算的
[/color][/font][font=Fixedsys][color=#0A246A]local [/color][color=#000000]@test
[/color][color=#0A246A]local [/color][color=#000000]@for
[/color][color=#0A246A]invoke [/color][color=#000000]WaitForSingleObject[/color][color=#0A246A],[/color][color=#000000]hEventCreate[/color][color=#0A246A],[/color][color=#000000]INFINITE [/color][/font][font=Comic Sans MS][color=#008000];等待可以开始事件
[/color][/font][font=Fixedsys][color=#0A246A].while [/color][color=#000000]TRUE
[/color][color=#0A246A]mov [/color][color=#FF8000]ebx[/color][color=#0A246A],[/color][color=#800080]350
[/color][color=#0A246A].while [/color][color=#FF8000]ebx[/color][color=#000000]![/color][color=#0A246A]=[/color][color=#800080]0
[/color][color=#0A246A]dec [/color][color=#FF8000]ebx
[/color][color=#0A246A]push [/color][color=#FF8000]ebx
[/color][color=#0A246A]invoke [/color][color=#000000]Calc[/color][color=#0A246A],[/color][color=#800080]7
[/color][color=#0A246A]pop [/color][color=#FF8000]ebx
[/color][color=#0A246A].endw
invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle7.dpx
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle7.dpy
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle7.dpz
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle7.dvx
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle7.dvy
[/color][color=#0A246A]invoke [/color][color=#000000]printfnumber[/color][color=#0A246A],[/color][color=#000000]dtparticle7.dvz
[/color][color=#0A246A]invoke [/color][color=#000000]Sleep[/color][color=#0A246A],[/color][color=#000000]dttime
[/color][color=#0A246A]mov [/color][color=#FF8000]eax[/color][color=#0A246A],[/color][color=#000000]eventout
[/color][color=#0A246A].if [/color][color=#FF8000]eax
[/color][color=#0A246A]ret
.endif
.endw
[/color][color=#000000]Calc7 [/color][color=#0A246A]endp
[/color][/font][font=Comic Sans MS][color=#008000];=============================================================
[/color][/font][font=Fixedsys][color=#000000]starting [/color][color=#0A246A]proc
local [/color][color=#000000]@hThreadID
[/color][color=#0A246A]xor [/color][color=#FF8000]eax[/color][color=#0A246A],[/color][color=#FF8000]eax
[/color][color=#0A246A]mov [/color][color=#000000]lprand0[/color][color=#0A246A],[/color][color=#FF8000]eax
[/color][color=#0A246A]mov [/color][color=#000000]lprand1[/color][color=#0A246A],[/color][color=#FF8000]eax
[/color][color=#0A246A]mov [/color][color=#FF8000]eax[/color][color=#0A246A],[/color][color=#800080]15
[/color][color=#0A246A]mov [/color][color=#000000]dttime[/color][color=#0A246A],[/color][color=#FF8000]eax
[/color][color=#0A246A]mov [/color][color=#000000]sizeofdtparticle[/color][color=#0A246A],sizeof [/color][color=#000000]dtparticle0
[/color][color=#0A246A]invoke [/color][color=#000000]CreateEvent[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],[/color][color=#000000]TRUE[/color][color=#0A246A],[/color][color=#000000]FALSE[/color][color=#0A246A],addr [/color][color=#000000]szEvent
[/color][color=#0A246A]mov [/color][color=#000000]hEventCreate[/color][color=#0A246A],[/color][color=#FF8000]eax[/color][/font][font=Comic Sans MS][color=#008000];创建产生事件
[/color][/font][font=Fixedsys][color=#0A246A]xor [/color][color=#FF8000]eax[/color][color=#0A246A],[/color][color=#FF8000]eax
[/color][color=#0A246A]mov [/color][color=#000000]eventout[/color][color=#0A246A],[/color][color=#FF8000]eax
[/color][color=#0A246A]invoke [/color][color=#000000]CreateThread[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],addr [/color][color=#000000]Calc0[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],addr [/color][color=#000000]@hThreadID
[/color][color=#0A246A]mov [/color][color=#000000]hThreadCreate0[/color][color=#0A246A],[/color][color=#FF8000]eax
[/color][color=#0A246A]invoke [/color][color=#000000]CreateThread[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],addr [/color][color=#000000]Calc1[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],addr [/color][color=#000000]@hThreadID
[/color][color=#0A246A]mov [/color][color=#000000]hThreadCreate1[/color][color=#0A246A],[/color][color=#FF8000]eax
[/color][color=#0A246A]invoke [/color][color=#000000]CreateThread[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],addr [/color][color=#000000]Calc2[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],addr [/color][color=#000000]@hThreadID
[/color][color=#0A246A]mov [/color][color=#000000]hThreadCreate2[/color][color=#0A246A],[/color][color=#FF8000]eax
[/color][color=#0A246A]invoke [/color][color=#000000]CreateThread[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],addr [/color][color=#000000]Calc3[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],addr [/color][color=#000000]@hThreadID
[/color][color=#0A246A]mov [/color][color=#000000]hThreadCreate3[/color][color=#0A246A],[/color][color=#FF8000]eax
[/color][color=#0A246A]invoke [/color][color=#000000]CreateThread[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],addr [/color][color=#000000]Calc4[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],addr [/color][color=#000000]@hThreadID
[/color][color=#0A246A]mov [/color][color=#000000]hThreadCreate4[/color][color=#0A246A],[/color][color=#FF8000]eax
[/color][color=#0A246A]invoke [/color][color=#000000]CreateThread[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],addr [/color][color=#000000]Calc5[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],addr [/color][color=#000000]@hThreadID
[/color][color=#0A246A]mov [/color][color=#000000]hThreadCreate5[/color][color=#0A246A],[/color][color=#FF8000]eax
[/color][color=#0A246A]invoke [/color][color=#000000]CreateThread[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],addr [/color][color=#000000]Calc6[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],addr [/color][color=#000000]@hThreadID
[/color][color=#0A246A]mov [/color][color=#000000]hThreadCreate6[/color][color=#0A246A],[/color][color=#FF8000]eax
[/color][color=#0A246A]invoke [/color][color=#000000]CreateThread[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],addr [/color][color=#000000]Calc7[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],[/color][color=#000000]NULL[/color][color=#0A246A],addr [/color][color=#000000]@hThreadID
[/color][color=#0A246A]mov [/color][color=#000000]hThreadCreate7[/color][color=#0A246A],[/color][color=#FF8000]eax
[/color][color=#0A246A]invoke [/color][color=#000000]Sleep[/color][color=#0A246A],[/color][color=#800080]1
[/color][color=#0A246A]invoke [/color][color=#000000]HeapCreate[/color][color=#0A246A],[/color][color=#000000]HEAP_NO_SERIALIZE[/color][color=#0A246A],[/color][color=#800080]38046[/color][color=#0A246A],[/color][color=#800080]0
[/color][color=#0A246A].if [/color][color=#FF8000]eax
[/color][color=#0A246A]mov [/color][color=#000000]hHeap[/color][color=#0A246A],[/color][color=#FF8000]eax
[/color][color=#0A246A].endif
invoke [/color][color=#000000]HeapAlloc[/color][color=#0A246A],[/color][color=#000000]hHeap[/color][color=#0A246A],[/color][color=#000000]HEAP_NO_SERIALIZE[/color][color=#0A246A],[/color][color=#800080]38046
[/color][color=#0A246A].if [/color][color=#FF8000]eax
[/color][color=#0A246A]mov [/color][color=#000000]lpMemory[/color][color=#0A246A],[/color][color=#FF8000]eax
[/color][color=#0A246A].endif
invoke [/color][color=#000000]SetEvent[/color][color=#0A246A],[/color][color=#000000]hEventCreate
[/color][color=#0A246A]ret
[/color][color=#000000]starting [/color][color=#0A246A]endp
[/color][/font][font=Comic Sans MS][color=#008000];==========================================================
[/color][/font][font=Fixedsys][color=#000000]getrand [/color][color=#0A246A]proc uses [/color][color=#FF8000]ebx ecx esi
[/color][color=#0A246A]xor [/color][color=#FF8000]ecx[/color][color=#0A246A],[/color][color=#FF8000]ecx
[/color][color=#0A246A]mov [/color][color=#FF8000]ebx[/color][color=#0A246A],[/color][color=#000000]lprand1
[/color][color=#0A246A]mov [/color][color=#FF8000]esi[/color][color=#0A246A],[/color][color=#000000]lpMemory
[/color][color=#0A246A].if [/color][color=#FF8000]ebx[/color][color=#0A246A]>[/color][color=#800080]38000
[/color][color=#0A246A]xor [/color][color=#FF8000]ebx[/color][color=#0A246A],[/color][color=#FF8000]ebx
[/color][color=#0A246A]mov [/color][color=#000000]lprand1[/color][color=#0A246A],[/color][color=#FF8000]ebx
[/color][color=#0A246A].else
add [/color][color=#FF8000]esi[/color][color=#0A246A],[/color][color=#FF8000]ebx
[/color][color=#0A246A]add [/color][color=#000000]lprand1[/color][color=#0A246A],[/color][color=#800080]4
[/color][color=#0A246A].endif
mov [/color][color=#FF8000]eax[/color][color=#0A246A],dword ptr [[/color][color=#FF8000]esi[/color][color=#0A246A]]
.while [/color][color=#FF8000]eax[/color][color=#0A246A]==[/color][color=#800080]0
[/color][color=#0A246A]invoke [/color][color=#000000]Sleep[/color][color=#0A246A],[/color][color=#800080]50
[/color][color=#0A246A]mov [/color][color=#FF8000]eax[/color][color=#0A246A],dword ptr [[/color][color=#FF8000]esi[/color][color=#0A246A]]
.endw
mov dword ptr [[/color][color=#FF8000]esi[/color][color=#0A246A]],[/color][color=#FF8000]ecx
[/color][color=#0A246A]ret
[/color][color=#000000]getrand [/color][color=#0A246A]endp
[/color][/font][font=Comic Sans MS][color=#008000];==================================================================
[/color][/font][font=Fixedsys][color=#000000]endrand [/color][color=#0A246A]proc
mov [/color][color=#FF8000]eax[/color][color=#0A246A],[/color][color=#800080]1
[/color][color=#0A246A]mov [/color][color=#000000]eventout[/color][color=#0A246A],[/color][color=#FF8000]eax
[/color][color=#0A246A]invoke [/color][color=#000000]HeapDestroy[/color][color=#0A246A],[/color][color=#000000]hHeap
[/color][color=#0A246A]ret
[/color][color=#000000]endrand [/color][color=#0A246A]endp
[/color][/font][font=Comic Sans MS][color=#008000];================================================
[/color][/font][font=Fixedsys][color=#000000]DLLEntry [/color][color=#0A246A]proc [/color][color=#000000]_hInstance[/color][color=#0A246A],[/color][color=#000000]_dwReason[/color][color=#0A246A],[/color][color=#000000]_dwReserved
[/color][color=#0A246A]push [/color][color=#000000]_hInstance
[/color][color=#0A246A]pop [/color][color=#000000]hInstDLL
[/color][color=#0A246A]mov [/color][color=#FF8000]eax[/color][color=#0A246A],[/color][color=#000000]TRUE
[/color][color=#0A246A]ret
[/color][color=#000000]DLLEntry [/color][color=#0A246A]endp
End [/color][color=#000000]DLLEntry
[/color][/font]
加上颜色阅读比较方便。