swap arguments to movi, so it works like mov,
3 files changed, 7 insertions(+), 7 deletions(-)

M asm.fox
M mandelbrot-asm.fox
M mandelbrot-mt.fox
M asm.fox +2 -2
@@ 265,8 265,8 @@ 3c4 const r12	3c5 const r13	3c6 const r1
 : shrd,		swap ac0f /r ib ;
 
 			\ todo: if n is imm32, then "MOV r/m64, imm32"
-			( n r32/r64 -- )
-: movi,		dup b8 +ro regsize cp (,) ;
+			( r32/r64 n -- )
+: movi,		over b8 +ro swap regsize cp (,) ;
 
 
 		( r1 -- )

          
M mandelbrot-asm.fox +2 -2
@@ 94,8 94,8 @@ r15 const boundary
 : plot
 	x0! y0!				\ start with z = x0 + iy0
 	# x x0 mov,  y y0 mov,
-	ff ecx movi, 			\ counter=0xff
-	4 scale boundary movi,  #
+	ecx ff movi, 			\ counter
+	boundary 4 scale movi,  #
 	begin #
 		x^2 x mov,
 		x^2 sq

          
M mandelbrot-mt.fox +3 -3
@@ 65,7 65,7 @@ hex
 		( n -- addr )
 : color	# max-iter cmpeaxi, #
 		0if
-			# black dup eax movi,  here 4 - relo,v # ;;
+			# black eax over movi,  here 4 - relo,v # ;;
 		then 
 		# f andeaxi,
 		\ todo: displacement "colors" needs sign-extended, not zero-extended relocate

          
@@ 140,7 140,7 @@ r14 const boundary
 	x0! y0!						\ start with z = x0 + iy0
 	0 \ make room for rax used below
 	# x x0 mov, y y0 mov,
-	max-iter ecx movi, 			\ counter
+	ecx max-iter movi, 			\ counter
 	# begin #
 		rax x mov,   sq   x^2 rax mov,
 		rax y mov,   sq   y^2 rax mov,

          
@@ 225,7 225,7 @@ image 	\ address, where we store the ima
 
 : setup 		() setdelta adjustx adjusty alloc-space 
 					\ boundary for calculation, is fixed
-					# 4 scale boundary movi, #  ;
+					# boundary 4 scale movi, #  ;
 
 				( xt #threads -- )
 : spawn-all		begin over spawn 1- until  drop drop ;