txtC db ' dGeomSetPosition (&box,p[0],11,22,&p[1],p[2],&dat1,dat2);',0
;out: dGeomSetPosition,box,[p.0],11,22,p.1,[p.2],dat1,[dat2]
macro FindAnySymbol t { local .1,.2,.3
xor cl,cl
mov al,[t]
mov ah,al
sub ah,"a"
cmp ah,"z"-"a"
ja .1
mov cl,1
.1:
sub al,48
cmp al,9
ja .3
mov cl,2
.3: test cl,cl
}
Start: mov edx,txtC
mov ebx,outTxt+6
mov dword [ebx-6],'ode_'
mov word [ebx-2],' ,'
.back: mov al,[edx]
mov [ebx],al
inc ebx
inc edx
cmp byte [edx],"("
jnz .back
mov word [ebx-1],' ,'
add ebx,2
mov esi,ptrKu
upp: inc edx
cmp byte [edx],0
jz ennnn
FindAnySymbol edx
jz upp
mov [esi],edx
mov [esi+4],cl
add esi,6
upp2: inc edx
cmp byte [edx],0
jz ennnn
cmp byte [edx],'('
jnz enn2
mov byte [edx],','
jmp upp
enn2:
cmp byte [edx],','
jnz upp2
jmp upp
ennnn:
;copy txt
mov esi,ptrKu
lea edx,[ebx-1]
.zu:
mov cl,[esi+4]
mov eax,[esi]
test eax,eax
jz endinn
cmp cl,2
jz .zu0
cmp byte [eax-1],'&'
jnz .zu2
mov byte [skobnet],1
.zu0: mov ch,[eax]
cmp ch,'['
jnz .zuX
mov ch,'.'
.zuX:
cmp ch,','
jz @f
cmp ch,';'
jz endinn
mov [edx],ch
inc eax
inc edx
jmp .zu0
.zu2: mov byte [edx],'['
inc edx
jmp .zu0
@@: cmp cl,2
jz .ziko
cmp byte [skobnet],1
;jz .ziko
jnz .zikoU
cmp byte [edx-1],']'
jnz .ziko
mov byte [edx-1],' '
jmp .ziko
.zikoU:
cmp byte [edx-1],']'
jz .ziko
mov byte [edx],']'
inc edx
.ziko: mov byte [edx],','
inc edx
mov byte [skobnet],0
add esi,6
jmp .zu
endinn: mov byte [edx-1],']'
invoke MessageBox,0,outTxt,0,0
;outTxt rb 50000
;ptrKu rd 200
;skobnet db 0