@va!n:
Ok. Having other priorities in mind - I totally agree with you to complete and
remove any bugs from the purebasic core. First a solid core should exits
before spending too much time on other complex matters like 3D for example.
Nevertheless, considering the fact that Purebasic exists for multiple OS and
it is a commercial application that competes against other languages like
BlitzBasic, I think Fred found a good way so far and built a damn cool system/
language.
However, back to topic
I did a quick test on that LOOP thing and it seems to be pretty lame compared
to the normal FOR-construct created by Purebasic. So forget the source
I wrote above :roll:
ts-soft's version seems to be pretty much the same as the normal FOR-
construct.
The generated ASM Code for a FOR/NEXT Loop looks like this:
Code: Select all
i.l = 10
!_For1:
!XOR eax,eax
!CMP eax,dword [v_i]
!JG _Next2
; Next i
!_NextContinue2:
!DEC dword [v_i]
!JMP _For1
!_Next2:
whereas the generated WHILE-Loop is something like this:
Code: Select all
i.l = 10
; While (i)
!_While1:
!CMP dword [v_i],0
!JE _Wend1
;!DEC[v_i]
; i-1
!DEC dword [v_i]
; Debug i
; Wend
!JMP _While1
!_Wend1:
So, acutally the same just the XOR-command is missing and the comparision
is between value and a constant which could make it slightly faster

But
maybe an assembler pro wants to comment that.
And btw, @ts-soft:
There isn't any different between
!DEC[v_i] and
i-1, is it
