Grr, hit a snag (one of the reasons I used the old method I had), keyword clashes with the core language.
With the current parser, it's difficult to get it to ignore 'internal' keywords.
How much of a pain in the ass would it be to use it in this form ?
program
var
tc:integer
t1,t2:integer
i,j:integer
begin
t1 = millisecs
tc=1
for j = 1 to 100
for i = 1 to 100000
inc(tc)
next
next
t2 = millisecs
MessageBox('time='+(t2-t1)+' tc='+tc)
t1 = millisecs
tc = 1
asm
@mov ecx,[!tc]
@mov ebx,100
.loop0
@mov eax,100000
.loop1
@inc ecx
@dec eax
@jnz loop1
@dec ebx
@jnz loop0
@mov [!tc],ecx
endasm
t2 = millisecs
MessageBox('time='+(t2-t1)+' tc='+tc)
end
notice the prefix on the opcode, personally I don't mind it (and will help with syntax highlighting, I think), but as a coder, any views ?
It's something I would probably stick on the list to remove, but it would be way off at the mo (next gen of the compiler, when I re-write the parser),
this would be a quick hack to get assembly into the language, in a reasonable way.