	SECTION _TEXT align=1 CLASS=CODE USE32
	SECTION _DATA align=16 CLASS=DATA USE32
	SECTION _BSS align=16 CLASS=BSS USE32
	SECTION _CONST align=16 CLASS=CONST USE32
	SECTION _STRING align=4 CLASS=STRING USE32
	SECTION cstartup align=4 CLASS=INITDATA USE32
	SECTION crundown align=4 CLASS=EXITDATA USE32
	SECTION cppinit  align=4 CLASS=CPPINIT USE32
	SECTION cppexit  align=4 CLASS=CPPEXIT USE32
	GROUP DGROUP _DATA _BSS _CONST _STRING

SECTION _TEXT
[GLOBAL	_PutStatusLine]
;
; Line 7:	void PutStatusLine(WINDOW wnd, void *s, int x, int y)
;
_PutStatusLine:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 08H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
L_2:
;
; Line 8:	{
;
;
; Line 9:	int saved = FALSE, sv;
;
	MOV	DWORD [EBP-04H],00H
;
; Line 10:	if (x < ClientWidth(wnd) && y < ClientHeight(wnd))	{
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_5
	MOV	EAX,01H
	JMP	SHORT	L_6
L_5:
	MOV	EAX,00H
L_6:
	SHL	EAX,01H
	MOV	ECX,DWORD [ESI+020H]
	SUB	ECX,EAX
	CMP	DWORD [EBP+010H],ECX
	JGE	NEAR	L_3
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_7
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JE	SHORT	L_7
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_7
	MOV	EAX,03H
	JMP	SHORT	L_8
L_7:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_12
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JNE	SHORT	L_11
L_12:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_9
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_9
L_11:
	MOV	EAX,02H
	JMP	SHORT	L_10
L_9:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,014108H
	JE	SHORT	L_13
	MOV	EAX,01H
	JMP	SHORT	L_14
L_13:
	MOV	EAX,00H
L_14:
L_10:
L_8:
	MOV	ECX,DWORD [ESI+01CH]
	SUB	ECX,EAX
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,08000H
	JE	SHORT	L_15
	MOV	EAX,01H
	JMP	SHORT	L_16
L_15:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_17
	MOV	EAX,01H
	JMP	SHORT	L_18
L_17:
	MOV	EAX,00H
L_18:
L_16:
	SUB	ECX,EAX
	CMP	DWORD [EBP+014H],ECX
	JGE	NEAR	L_3
;
; Line 11:	ATTRCHR *en = (ATTRCHR *)s+ClientWidth(wnd)-x;
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_19
	MOV	EAX,01H
	JMP	SHORT	L_20
L_19:
	MOV	EAX,00H
L_20:
	SHL	EAX,01H
	MOV	ECX,DWORD [ESI+020H]
	SUB	ECX,EAX
	SHL	ECX,01H
	ADD	ECX,DWORD [EBP+0CH]
	MOV	EAX,DWORD [EBP+010H]
	SHL	EAX,01H
	SUB	ECX,EAX
	MOV	EDI,ECX
;
; Line 12:	if (tstrlen(s)+x > ClientWidth(wnd))	{
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_23
	MOV	EAX,01H
	JMP	SHORT	L_24
L_23:
	MOV	EAX,00H
L_24:
	SHL	EAX,01H
	MOV	ECX,DWORD [ESI+020H]
	SUB	ECX,EAX
	PUSH	ECX
	PUSH	DWORD [EBP+0CH]
	CALL	_tstrlen
	POP	ECX
	POP	ECX
	ADD	EAX,DWORD [EBP+010H]
	CMP	EAX,ECX
	JLE	SHORT	L_21
;
; Line 13:	sv = en->ch;
;
	MOVZX	EAX,BYTE [EDI+00H]
	MOV	EBX,EAX
;
; Line 14:	en->ch = '\0';
;
	MOV	BYTE [EDI+00H],00H
;
; Line 15:	saved = TRUE;
;
	MOV	DWORD [EBP-04H],01H
L_21:
;
; Line 17:	ClipString++;
;
	INC	DWORD [_ClipString]
;
; Line 18:	twputs(wnd, s, x+BorderAdj(wnd), y+TopBorderAdj(wnd));
;
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_25
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JE	SHORT	L_25
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_25
	MOV	EAX,03H
	JMP	SHORT	L_26
L_25:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_30
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,BYTE 08H
	JNE	SHORT	L_29
L_30:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,0100H
	JE	SHORT	L_27
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,010000H
	JE	SHORT	L_27
L_29:
	MOV	EAX,02H
	JMP	SHORT	L_28
L_27:
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,014108H
	JE	SHORT	L_31
	MOV	EAX,01H
	JMP	SHORT	L_32
L_31:
	MOV	EAX,00H
L_32:
L_28:
L_26:
	ADD	EAX,DWORD [EBP+014H]
	PUSH	EAX
	MOV	EAX,DWORD [ESI+054H]
	AND	EAX,04000H
	JE	SHORT	L_33
	MOV	EAX,01H
	JMP	SHORT	L_34
L_33:
	MOV	EAX,00H
L_34:
	ADD	EAX,DWORD [EBP+010H]
	PUSH	EAX
	PUSH	DWORD [EBP+0CH]
	PUSH	ESI
	CALL	_twputs
	ADD	ESP,BYTE 010H
;
; Line 19:	--ClipString;
;
	DEC	DWORD [_ClipString]
;
; Line 20:	if (saved)
;
	CMP	DWORD [EBP-04H],BYTE 00H
	JE	SHORT	L_35
;
; Line 21:	en->ch = sv;
;
	MOV	BYTE [EDI+00H],BL
L_35:
L_3:
;
; Line 23:	}
;
L_1:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
[GLOBAL	_StatusBarProc]
;
; Line 24:	int StatusBarProc(WINDOW wnd, MESSAGE msg, PARAM p1, PARAM p2)
;
_StatusBarProc:
	PUSH	EBP
	MOV	EBP,ESP
	SUB	ESP,BYTE 014H
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+08H]
	MOV	EDI,DWORD [EBP+014H]
L_39:
;
; Line 25:	{
;
;
; Line 29:	switch (msg)	{
;
	MOV	EAX,DWORD [EBP+0CH]
	CMP	EAX,BYTE 0AH
	JE	NEAR	L_45
	JA	SHORT	L_48
	CMP	EAX,BYTE 07H
	JE	NEAR	L_47
	JA	SHORT	L_49
	CMP	EAX,BYTE 03H
	JE	SHORT	L_42
	JMP	NEAR	L_41
L_49:
	CMP	EAX,BYTE 09H
	JE	SHORT	L_44
	JMP	NEAR	L_41
L_48:
	CMP	EAX,BYTE 015H
	JE	SHORT	L_43
	JA	NEAR	L_41
	CMP	EAX,BYTE 012H
	JE	NEAR	L_46
	JMP	NEAR	L_41
L_42:
;
; Line 31:	SendMessage(wnd, CAPTURE_CLOCK, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 013H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 32:	break;
;
	JMP	NEAR	L_40
L_43:
;
; Line 34:	if ((int)p1 == CTRL_F4)
;
	CMP	DWORD [EBP+010H],010E1H
	JNE	SHORT	L_50
;
; Line 35:	return TRUE;
;
	MOV	EAX,01H
	JMP	NEAR	L_38
L_50:
;
; Line 36:	break;
;
	JMP	NEAR	L_40
L_44:
;
; Line 38:	if (!isVisible(wnd))
;
	PUSH	ESI
	CALL	_isVisible
	POP	ECX
	TEST	EAX,EAX
	JE	NEAR	L_40
;
; Line 39:	break;
;
L_52:
;
; Line 40:	statusbar = DFcalloc(1, (WindowWidth(wnd)+1) * sizeof(ATTRCHR));
;
	MOV	EAX,DWORD [ESI+020H]
	INC	EAX
	SHL	EAX,01H
	PUSH	EAX
	PUSH	BYTE 01H
	CALL	_DFcalloc
	ADD	ESP,BYTE 08H
	MOV	DWORD [EBP-08H],EAX
;
; Line 41:	attr = clr(WndForeground(wnd), WndBackground(wnd));
;
	MOVSX	EAX,BYTE [ESI+035H]
	SAL	EAX,04H
	MOVSX	ECX,BYTE [ESI+034H]
	OR	ECX,EAX
	MOV	DWORD [EBP-04H],ECX
	MOV	EBX,00H
	JMP	SHORT	L_56
L_54:
;
; Line 44:	statusbar[i].ch = ' ';
;
	MOV	EAX,DWORD [EBP-08H]
	MOV	BYTE [EAX+EBX*2+00H],020H
;
; Line 45:	statusbar[i].attrib = attr;
;
	MOV	EAX,DWORD [EBP-08H]
	LEA	EAX,[EAX+EBX*2+00H]
	MOV	ECX,DWORD [EBP-04H]
	MOV	BYTE [EAX+01H],CL
;
; Line 42:	for (i=0; i < WindowWidth(wnd); i++)
;
L_55:
	INC	EBX
L_56:
	CMP	EBX,DWORD [ESI+020H]
	JL	SHORT	L_54
L_57:
;
; Line 47:	statusbar[WindowWidth(wnd)].ch = '\0';
;
	MOV	EAX,DWORD [EBP-08H]
	MOV	ECX,DWORD [ESI+020H]
	MOV	BYTE [EAX+ECX*2+00H],00H
	MOV	EBX,00H
	JMP	SHORT	L_60
L_58:
;
; Line 49:	statusbar[i+1].ch = "F1=Help"[i];
;
	MOV	EAX,DWORD [EBP-08H]
	MOV	ECX,EBX
	INC	ECX
	MOV	DL,BYTE [EBX+L_37+00H]
	MOV	BYTE [EAX+ECX*2+00H],DL
;
; Line 48:	for (i=0; i < 7; i++)
;
L_59:
	INC	EBX
L_60:
	CMP	EBX,BYTE 07H
	JL	SHORT	L_58
L_61:
;
; Line 50:	if (wnd->text)	{
;
	CMP	DWORD [ESI+098H],BYTE 00H
	JE	SHORT	L_62
;
; Line 51:	int len = min(tstrlen(wnd->text), WindowWidth(wnd)-17);
;
	MOV	EAX,DWORD [ESI+020H]
	SUB	EAX,BYTE 011H
	PUSH	EAX
	PUSH	DWORD [ESI+098H]
	CALL	_tstrlen
	POP	ECX
	MOV	ECX,EAX
	POP	EAX
	CMP	ECX,EAX
	JGE	SHORT	L_64
	PUSH	DWORD [ESI+098H]
	CALL	_tstrlen
	POP	ECX
	JMP	SHORT	L_65
L_64:
	MOV	EAX,DWORD [ESI+020H]
	SUB	EAX,BYTE 011H
L_65:
	MOV	DWORD [EBP-010H],EAX
;
; Line 52:	if (len > 0)	{
;
	CMP	DWORD [EBP-010H],BYTE 00H
	JLE	SHORT	L_66
;
; Line 53:	int off=(WindowWidth(wnd)-len)/2;
;
	MOV	EAX,DWORD [ESI+020H]
	SUB	EAX,DWORD [EBP-010H]
	SAR	EAX,01H
	JNS	SHORT	L_68
	ADC	EAX,BYTE 00H
L_68:
	MOV	DWORD [EBP-014H],EAX
	MOV	EBX,DWORD [EBP-014H]
	JMP	SHORT	L_71
L_69:
;
; Line 56:	statusbar[i].ch = wnd->text[i-off].ch;
;
	MOV	EAX,DWORD [ESI+098H]
	MOV	ECX,EBX
	SUB	ECX,DWORD [EBP-014H]
	MOV	CL,BYTE [EAX+ECX*2+00H]
	MOV	EAX,DWORD [EBP-08H]
	MOV	BYTE [EAX+EBX*2+00H],CL
;
; Line 57:	statusbar[i].attrib = attr;
;
	MOV	EAX,DWORD [EBP-08H]
	LEA	EAX,[EAX+EBX*2+00H]
	MOV	ECX,DWORD [EBP-04H]
	MOV	BYTE [EAX+01H],CL
;
; Line 54:	for (i= off; i < off + len; i++)
;
L_70:
	INC	EBX
L_71:
	MOV	EAX,DWORD [EBP-014H]
	ADD	EAX,DWORD [EBP-010H]
	CMP	EBX,EAX
	JL	SHORT	L_69
L_72:
L_66:
L_62:
;
; Line 61:	if (wnd->TimePosted)
;
	CMP	DWORD [ESI+011CH],BYTE 00H
	JE	SHORT	L_73
;
; Line 62:	statusbar[WindowWidth(wnd)-8].ch = '\0';
;
	MOV	EAX,DWORD [ESI+020H]
	SUB	EAX,BYTE 08H
	MOV	ECX,DWORD [EBP-08H]
	MOV	BYTE [ECX+EAX*2+00H],00H
	JMP	SHORT	L_74
L_73:
	MOV	EBX,00H
	JMP	SHORT	L_77
L_75:
;
; Line 67:	statusbar[WindowWidth(wnd) - 8 + i].ch = time_string[i];
;
	MOV	EAX,DWORD [ESI+020H]
	SUB	EAX,BYTE 08H
	ADD	EAX,EBX
	MOV	ECX,DWORD [EBP-08H]
	MOV	DL,BYTE [EBX+_time_string+00H]
	MOV	BYTE [ECX+EAX*2+00H],DL
;
; Line 65:	for (i=0; i < 9; i++)
;
L_76:
	INC	EBX
L_77:
	CMP	EBX,BYTE 09H
	JL	SHORT	L_75
L_78:
L_74:
;
; Line 70:	PutStatusLine(wnd, statusbar, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	DWORD [EBP-08H]
	PUSH	ESI
	CALL	_PutStatusLine
	ADD	ESP,BYTE 010H
;
; Line 71:	free(statusbar);
;
	PUSH	DWORD [EBP-08H]
	CALL	_free
	POP	ECX
;
; Line 72:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_38
L_45:
;
; Line 74:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_38
L_46:
;
; Line 76:	SetStandardColor(wnd);
;
	PUSH	ESI
	CALL	_SetStandardColor
	POP	ECX
;
; Line 77:	PutWindowLine(wnd, (char *)p1, WindowWidth(wnd)-8, 0);
;
	PUSH	BYTE 00H
	MOV	EAX,DWORD [ESI+020H]
	SUB	EAX,BYTE 08H
	PUSH	EAX
	PUSH	DWORD [EBP+010H]
	PUSH	ESI
	CALL	_PutWindowLine
	ADD	ESP,BYTE 010H
;
; Line 78:	wnd->TimePosted = TRUE;
;
	MOV	DWORD [ESI+011CH],01H
;
; Line 79:	SendMessage(wnd->PrevClock, msg, p1, p2);
;
	PUSH	EDI
	PUSH	DWORD [EBP+010H]
	MOVSX	EAX,WORD [EBP+0CH]
	PUSH	EAX
	PUSH	DWORD [ESI+07CH]
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 80:	return TRUE;
;
	MOV	EAX,01H
	JMP	SHORT	L_38
L_47:
;
; Line 82:	SendMessage(wnd, RELEASE_CLOCK, 0, 0);
;
	PUSH	BYTE 00H
	PUSH	BYTE 00H
	PUSH	BYTE 014H
	PUSH	ESI
	CALL	_SendMessage
	ADD	ESP,BYTE 010H
;
; Line 83:	break;
;
	JMP	SHORT	L_40
L_41:
;
; Line 85:	break;
;
	JMP	SHORT	L_40
L_40:
;
; Line 87:	return BaseWndProc(STATUSBAR, wnd, msg, p1, p2);
;
	PUSH	EDI
	PUSH	DWORD [EBP+010H]
	MOVSX	EAX,WORD [EBP+0CH]
	PUSH	EAX
	PUSH	ESI
	MOV	EAX,DWORD [_classdefs+0F0H]
	IMUL	EAX,BYTE 0CH
	CALL	DWORD [EAX+04H+_classdefs+00H]
	ADD	ESP,BYTE 010H
L_38:
	POP	EDI
	POP	ESI
	POP	EBX
	MOV	ESP,EBP
	POP	EBP
	RET
SECTION _STRING
L_37:
	DB	046H,031H,03DH,048H,065H,06CH,070H,00H
SECTION _CONST

SECTION _TEXT
[EXTERN	_PutWindowLine]
[EXTERN	_DFcalloc]
[EXTERN	_isVisible]
[EXTERN	_tstrlen]
[EXTERN	_ClipString]
[EXTERN	_twputs]
[EXTERN	_free]
[EXTERN	_SetStandardColor]
[EXTERN	_classdefs]
[EXTERN	_SendMessage]
[EXTERN	_time_string]
