Index: patches/newindu.asm
===================================================================
--- patches/newindu.asm	(revision 1836)
+++ patches/newindu.asm	(working copy)
@@ -3529,12 +3529,10 @@
 	inc ebx				// increase ID to have one more item
 	shl edx,1
 	add edx,[cargotypenamesptr]
-	mov dx,[edx]
-	mov word [edi],statictext(ident2)
-	mov [edi+2],dx			// and store it
+	mov eax, [edx-2]		// load cargo name into second word
+	mov ax, statictext(ident2)	// load first word
+	stosd				// store both
 	call .getcargosubtext
-	mov [edi+4],ax
-	add edi,6
 .skipit:
 	inc byte [callback_extrainfo]
 	inc ecx
@@ -3568,17 +3566,18 @@
 .firstslotok:
 
 // assume we'll have one output cargo
+	push edi
 	mov bx,statictext(newindu_onecargo)
+	mov edi, textrefstack+2
 // get its name
 	movzx edx,cl
 	shl edx,1
 	add edx,[cargotypenamesptr]
-	mov dx,[edx]
+	mov ax,[edx]
 // and store it
-	mov [textrefstack+2],dx
+	stosw
 	mov byte [callback_extrainfo],3
 	call .getcargosubtext
-	mov [textrefstack+4],ax
 
 // is there a second cargo?
 	test ch,ch
@@ -3588,12 +3587,12 @@
 	movzx edx,ch
 	shl edx,1
 	add edx,[cargotypenamesptr]
-	mov dx,[edx]
-	mov [textrefstack+6],dx
+	mov ax,[edx]
+	stosw
 	inc byte [callback_extrainfo]
 	call .getcargosubtext
-	mov [textrefstack+8],ax
 .nosecondcargo:
+	pop edi
 // draw the line
 	mov [textrefstack],bx
 	mov bx,ourtext(newinduproduces)
@@ -3663,23 +3662,13 @@
 
 .getcargosubtext:
 	test byte [industrycallbackflags+ebp],0x40
-	jz .default
+	jz near drawinduacceptlist.default
 
 	mov eax,ebp
 	push esi
 	xor esi,esi
-	call getnewsprite
-	pop esi
-	jc .default
-	cmp al,0xff
-	je .default
-	add ah,0xd4
-	ret
+	jmp near drawinduacceptlist.getsprite	// Much shared code; put it all together.
 
-.default:
-	mov ax,6
-	ret
-
 // Click handler. This includes reactions for pushing the button, selecting an industry type
 // or right-clicking for tooltips
 induwindow_click:
@@ -4772,7 +4761,10 @@
 	push ebp
 	push ecx
 	push edx
+	push edi
 
+	mov edi,textrefstack
+
 // check the production callback
 	movzx ebx,byte [ebp+industry.type]
 	test byte [industrycallbackflags+ebx],2+4
@@ -4784,19 +4776,16 @@
 	mov edx,[cargotypenamesptr]
 	mov bx,0x4827-1			// Requires: xxx
 
-	mov esi,textrefstack
 	xor ecx,ecx
 .nextslot:
 	movzx eax,byte [ebp+industry.accepts+ecx]
 	cmp al,-1
 	je .skip
 	inc ebx
-	mov word [esi],statictext(ident2)
-	mov ax,[edx+2*eax]
-	mov [esi+2],ax
+	mov eax,[edx+2*eax-2]		// load cargo name into second (high) word
+	mov ax,statictext(ident2)	// load low word
+	stosd				// store both
 	call .getcargosubtext
-	mov [esi+4],ax
-	add esi,6
 
 .skip:
 	inc byte [callback_extrainfo]
@@ -4806,6 +4795,7 @@
 
 	pop edx
 	pop ecx
+	pop edi
 	mov eax,[mostrecentspriteblock]
 	mov [curmiscgrf],eax
 	call [drawtextfn]
@@ -4826,8 +4816,6 @@
 // now ebx-> incoming cargo data
 	
 // fill up to three slots on the text reference stack with either message 6 (empty string) or cargo amount messages
-	push edi
-	mov edi,textrefstack
 	xor ecx,ecx
 .cargoloop:
 // fill slot with the empty string if the cargo slot is unused
@@ -4852,15 +4840,13 @@
 	add edx,[cargoamount1namesptr]
 
 .plural:
-// store the textID...
+// Store the amount ...
+	mov eax,[ebx+ecx*2-2]
+// ... and the textID
 	mov ax,[edx]
-	stosw
-// ...and the amount
-	mov ax,[ebx+ecx*2]
-	stosw
+	stosd
 
 	call .getcargosubtext
-	stosw
 
 .nextcargo:
 	inc byte [callback_extrainfo]
@@ -4897,17 +4883,23 @@
 	test byte [industrycallbackflags+eax],0x40
 	jz .default
 
-	xchg esi,ebp
+	push esi
+	mov esi,ebp
+.getsprite:
 	call getnewsprite
-	xchg esi,ebp
-	jc .default
+	jc .pop
 	cmp al,0xff
-	je .default
+	je .pop
 	add ah,0xd4
+	stosw
+	pop esi
 	ret
 
+.pop:
+	pop esi
 .default:
 	mov ax,6
+	stosw
 	ret
 	
 exported skipproducelist
@@ -4928,12 +4920,13 @@
 
 global drawinduproducelist
 drawinduproducelist:
-	mov word [textrefstack+0],statictext(ident2)
-	mov [textrefstack+2],ax
-	mov [textrefstack+4],bx
+	mov edi, textrefstack+2
+	mov word [edi-2], statictext(ident2)
+	stosw
+	xchg eax,ebx
+	stosw
 	mov byte [curcallback],0x37
 	call drawinduacceptlist.getcargosubtext
-	mov [textrefstack+6],ax
 	mov byte [curcallback],0
 	ret
 
Index: procs/newindustries.asm
===================================================================
--- procs/newindustries.asm	(revision 1836)
+++ procs/newindustries.asm	(working copy)
@@ -410,15 +410,17 @@
 	mov [textrefstack],ax
 	mov [textrefstack+2],bx
 
-codefragment newdrawinduproducelist1
+codefragment newdrawinduproducelist
+	push edi
 	mov byte [callback_extrainfo],3
+noglobal ovar cargonum, -1
 	icall drawinduproducelist
-	setfragmentsize 13
+	setfragmentsize 14
 
-codefragment newdrawinduproducelist2
-	mov byte [callback_extrainfo],4
-	icall drawinduproducelist
-	setfragmentsize 13
+codefragment newfinishinduproducelist
+	stosd
+	pop edi
+	setfragmentsize 5
 
 codefragment oldcreateindustry_chkplacement,-7
 	mov ebp,[ebp+4*edx]
@@ -664,10 +666,13 @@
 	patchcode drawinduacceptlist
 	patchcode skipproducelist
 	patchcode skipfirstproducedcargo
-	patchcode olddrawinduproducelist,newdrawinduproducelist1,1,2
-	add dword [edi+lastediadj+28],4
-	patchcode olddrawinduproducelist,newdrawinduproducelist2,1,0
-	add dword [edi+lastediadj+28],4
+%macro finishproducelist 0
+	add edi, 27+lastediadj
+	storefragment newfinishinduproducelist
+	inc byte [cargonum]
+%endmacro
+	multipatchcode olddrawinduproducelist,newdrawinduproducelist,2,finishproducelist
+
 	stringaddress oldenddrawindustrywindow,1,1
 	chainfunction enddrawindustrywindow,.oldfn
 
