Inline assembler support

Miscellaneous Forums/Win32 Discussion/Inline assembler support

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

struggling to think how I could inline this to make it better....

okay this is a very simple example, but generally the
max produces nice compact code...

most languages that let you inline with language variables
usually output *hideous* code, pushing and popping
between each inline "asm"

So usually no faster and ofter slower...

As for being closer to the hardware so you can extend the
language are you really interested in coding for 20
different sound cards...

Instead of trying to knock off the odd millisecond a frame
look again at your algorithm, sometimes its not the odd
millisecond but 10 times that.

rem

	mov	ebx,5
	mov	dword [ebp-4],6
	mov	edi,7
	mov	ecx,8
	mov	edx,9
	mov	eax,10
	mov	dword [ebp-8],11
	jmp	_3
_5:
	add	ebx,1
	add	dword [ebp-4],1
	add	edi,1
	add	ecx,1
	add	edx,1
	add	eax,1
	add	dword [ebp-8],1
	mov	esi,ebx
	add	esi,dword [ebp-4]
	add	esi,edi
	add	esi,ecx
	add	esi,edx
	add	esi,eax
	add	esi,dword [ebp-8]
	cmp	esi,1
	jge	_15
	jmp	_4
_15:
_3:
	cmp	ebx,10
	jl	_5

End Rem

a:Int=5
b:Int=6
c:Int=7
d:Int=8
e:Int=9
f:Int=10 ' oh no we've run out of registers!!
g:Int=11  



While a<10
a:+1 
b:+1
c:+1
d:+1
e:+1
f:+1
g:+1
If (a+b+c+d+e+f+g)<1 Then exit

Wend