source/page03/initial.asm
changeset 19 271dfee8e3ad
parent 17 41d98670c2d3
child 23 5252151efccf
--- a/source/page03/initial.asm	Thu May 08 01:58:42 2014 -0400
+++ b/source/page03/initial.asm	Thu May 08 02:47:08 2014 -0400
@@ -8,7 +8,7 @@
 		ld		(curRow), hl
 		ld		hl, aBaseCode1_19
 		call	j_PutS
-		bit		1, (iy+35h)
+		bit		localizeHookActive, (iy+hookflags3)
 		jr		z, p03loc_401F
 		ld		a, 79h ; 'y'
 		call	j_call_character_hook
@@ -36,9 +36,9 @@
 		cp		5
 		jp		nz, JForceCmdNoChar
 		call	j_ClrScrn
-		res		4, (iy+33h)
-		set		2, (iy+24h)
-		res		2, (iy+8)
+		res		bPLinkOn, (iy+hookflags1)
+		set		resetOnPowerOn, (iy+selfTestFlag)
+		res		apdAble, (iy+apdFlags)
 		ld		hl, 0
 		ld		(curGStyle), hl
 		rst		28h
@@ -256,7 +256,7 @@
 p03loc_41AB:
 		xor		a
 		ld		(unk_9CAF), a
-		res		4, (iy+9)
+		res		onInterrupt, (iy+onFlags)
 		ld		de, 8181h
 		call	p03sub_424B
 		ld		d, 0FFh
@@ -295,7 +295,7 @@
 
 p03loc_41FE:
 		; p03sub_409E+14Aj ...
-		res		4, (iy+9)
+		res		onInterrupt, (iy+onFlags)
 		call	j_ClrScrn
 		ld		a, (contrast)
 		call	p03sub_41A1
@@ -858,15 +858,15 @@
 ; ---------------------------------------------------------------------------
 
 p03loc_44AB:
-		bit		2, (iy+0Dh)
+		bit		appAutoScroll, (iy+appFlags)
 		jr		z, p03loc_449E
-		res		2, (iy+0Dh)
+		res		appAutoScroll, (iy+appFlags)
 		ld		de, (curRow)
 		push	de
 		call	j_wputc
 		pop		hl
 		ld		(curRow), hl
-		set		2, (iy+0Dh)
+		set		appAutoScroll, (iy+appFlags)
 		ret
 ; End of function p03sub_4492
 
@@ -875,11 +875,11 @@
 
 
 p03sub_44C6:
-		bit		2, (iy+0Dh)
+		bit		appAutoScroll, (iy+appFlags)
 		jp		z, p03loc_4587
-		res		2, (iy+0Dh)
+		res		appAutoScroll, (iy+appFlags)
 		call	p03loc_4587
-		set		2, (iy+0Dh)
+		set		appAutoScroll, (iy+appFlags)
 		ret
 ; End of function p03sub_44C6
 
@@ -916,7 +916,7 @@
 		cp		(hl)
 		jr		nz, p03loc_451A
 		ld		a, 1
-		bit		2, (iy+35h)
+		bit		windowHookActive, (iy+hookflags3)
 		jr		z, p03loc_4510
 		call	Page0Call_362D
 		jr		nz, p03loc_4513
@@ -939,7 +939,7 @@
 		cp		53h ; 'S'
 		jr		z, p03loc_453E
 		ld		a, 2
-		bit		2, (iy+35h)
+		bit		windowHookActive, (iy+hookflags3)
 		jr		z, p03loc_4534
 		call	Page0Call_362D
 		jr		nz, p03loc_4537
@@ -959,7 +959,7 @@
 
 p03loc_4540:
 		call	j_PutC
-		bit		2, (iy+35h)
+		bit		windowHookActive, (iy+hookflags3)
 		jr		z, p03loc_454F
 		ld		a, 3
 		call	Page0Call_362D
@@ -968,7 +968,7 @@
 p03loc_454F:
 		ld		l, (ix+1)
 		ld		h, (ix+2)
-		bit		1, (iy+35h)
+		bit		localizeHookActive, (iy+hookflags3)
 		jr		z, p03loc_4565
 		push	bc
 		ld		b, (ix+0)
@@ -1085,7 +1085,7 @@
 ; ---------------------------------------------------------------------------
 
 p03loc_4602:
-		bit		2, (iy+35h)
+		bit		windowHookActive, (iy+hookflags3)
 		jr		z, p03loc_460F
 		ld		a, 5
 		call	Page0Call_362D
@@ -1175,7 +1175,7 @@
 		pop		af
 		ret
 ; ---------------------------------------------------------------------------
-		bit		2, (iy+35h)
+		bit		windowHookActive, (iy+hookflags3)
 		jr		z, p03loc_4690
 		ld		b, a
 		push	ix
@@ -1218,7 +1218,7 @@
 		call	ParseAndStoreSysVar
 		call	DisplayEditSysVar
 		ld		a, 1
-		bit		2, (iy+35h)
+		bit		windowHookActive, (iy+hookflags3)
 		jr		z, p03loc_46D9
 		call	Page0Call_362D
 		jr		nz, p03loc_46DC
@@ -1274,9 +1274,9 @@
 p03sub_4727:
 
 		call	ParseAndStoreSysVar
-		bit		4, (iy+1)
+		bit		monAbandon, (iy+monFlags)
 		call	z, DisplayEditSysVar
-		res		4, (iy+1)
+		res		monAbandon, (iy+monFlags)
 		ld		ix, (unk_9700)
 		ret
 ; End of function p03sub_4727
@@ -1364,7 +1364,7 @@
 		call	ParseAndStoreSysVar
 		call	DisplayEditSysVar
 		ld		a, 2
-		bit		2, (iy+35h)
+		bit		windowHookActive, (iy+hookflags3)
 		jr		z, p03loc_47B7
 		call	Page0Call_362D
 		jr		nz, p03loc_47BA
@@ -1433,7 +1433,7 @@
 ; ---------------------------------------------------------------------------
 
 p03loc_4814:
-		bit		7, (iy+0Eh)
+		bit		enableQueue, (iy+rclFlag)
 		jr		nz, CallCommon
 		cp		8Ah ; '�'
 		ret		z
@@ -1459,7 +1459,7 @@
 p03loc_482E:
 		cp		0Dh
 		jp		nz, p03loc_4858
-		set		5, (iy+0Ch)
+		set		cmdVirgin, (iy+cmdFlags)
 		set		5, (iy+5)
 		call	Page0Call_366F
 		call	CanAlphIns
@@ -1467,7 +1467,7 @@
 		call	Page03_37A7
 		call	GETLASTENTRY
 		call	j_RCLENTRYTOEDIT
-		res		5, (iy+0Ch)
+		res		cmdVirgin, (iy+cmdFlags)
 		call	j_BufToTop
 		call	j_fdispEOL
 		ret
@@ -1476,7 +1476,7 @@
 p03loc_4858:
 		cp		2
 		jr		nz, p03loc_489E
-		res		4, (iy+5)
+		res		textInsMode, (iy+textFlags)
 		call	j_BufLeft
 		jp		z, p03sub_48F5
 ; End of function CallCommon
@@ -1489,7 +1489,7 @@
 
 
 
-		res		2, (iy+5)
+		res		textScrolled, (iy+textFlags)
 		call	IsAtTop
 		jp		z, p03loc_48FE
 		ld		hl, (editTail)
@@ -1527,7 +1527,7 @@
 p03loc_489E:
 		cp		1
 		jr		nz, p03loc_48FA
-		res		4, (iy+5)
+		res		textInsMode, (iy+textFlags)
 		call	j_BUFPEEK
 		ret		z
 		call	j_GetTokLen
@@ -1619,7 +1619,7 @@
 p03loc_4917:
 		cp		21h ; '!'
 		jr		nz, p03loc_4929
-		res		4, (iy+5)
+		res		textInsMode, (iy+textFlags)
 		call	j_BufLeft
 		jr		z, p03sub_48F5
 		call	CommonKeys
@@ -1635,7 +1635,7 @@
 		call	p03sub_48F5
 
 Leftmore:
-		res		4, (iy+5)
+		res		textInsMode, (iy+textFlags)
 		call	j_BufDelete
 		ret		z
 		set		5, (iy+5)
@@ -1665,7 +1665,7 @@
 
 p03loc_4960:
 		call	Page0Call_366F
-		bit		7, (iy+0Eh)
+		bit		enableQueue, (iy+rclFlag)
 		jr		nz, p03loc_4972
 		bit		1, (iy+2Ah)
 		jr		nz, p03loc_4972
@@ -1763,7 +1763,7 @@
 
 finsDisp:
 		push	de
-		bit		4, (iy+5)
+		bit		textInsMode, (iy+textFlags)
 		jr		nz, p03loc_49F1
 		call	j_BufReplace
 		pop		de
@@ -1925,7 +1925,7 @@
 closeeditbufnor:
 		; ParseAndStoreSysVar+Ap ...
 		call	CanAlphIns
-		bit		2, (iy+1)
+		bit		editOpen, (iy+editFlags)
 		ret		z
 		call	j_CloseEditEqu
 		ret
@@ -1950,7 +1950,7 @@
 		; ParseAndStoreSysVar+8j
 		set		6, (iy+5)
 		call	closeeditbufnor
-		bit		4, (iy+1)
+		bit		monAbandon, (iy+monFlags)
 		jr		nz, p03sub_4AE9
 		call	page0_166E
 		call	j_ParseInp
@@ -1969,7 +1969,7 @@
 ; ---------------------------------------------------------------------------
 
 p03loc_4AD8:
-		bit		2, (iy+35h)
+		bit		windowHookActive, (iy+hookflags3)
 		jr		z, p03loc_4AE5
 		ld		a, 6
 		call	Page0Call_362D
@@ -1990,7 +1990,7 @@
 		jr		releaseBuffer
 
 p03loc_4AEE:
-		res		3, (iy+14h)
+		res		grfSplitOverride, (iy+sGrFlags)
 
 ; =============== S U B	R O U T	I N E =======================================
 
@@ -2016,7 +2016,7 @@
 		ld		ix, (unk_9700)
 		call	p03sub_473A
 		jp		nz, p03loc_445F
-		bit		2, (iy+35h)
+		bit		windowHookActive, (iy+hookflags3)
 		jr		z, p03loc_4B16
 		ld		a, 9
 		call	Page0Call_362D
@@ -2133,7 +2133,7 @@
 		call	pushErrorHandleR
 		call	ParseAndStoreSysVar
 		call	popErrorHandleR
-		res		3, (iy+14h)
+		res		grfSplitOverride, (iy+sGrFlags)
 		ret
 ; End of function p03sub_4B7F
 
@@ -2165,7 +2165,7 @@
 		jr		c, p03loc_4BCC
 		add		hl, de
 		ld		a, 8
-		bit		2, (iy+35h)
+		bit		windowHookActive, (iy+hookflags3)
 		jr		z, p03loc_4BC6
 		call	Page0Call_362D
 		jr		nz, p03loc_4BC7
@@ -2292,7 +2292,7 @@
 		call	j_SolveRedisp
 		jr		p03loc_4C21
 ; ---------------------------------------------------------------------------
-		set		4, (iy+0Ch)
+		set		curLock, (iy+curFlags)
 
 numRedisp:
 		jp		j_rstrShadow
@@ -2306,7 +2306,7 @@
 		call	j_SetMenuFlags
 
 numError02:
-		bit		2, (iy+1)
+		bit		editOpen, (iy+editFlags)
 		jr		nz, p03loc_4CAA
 		call	page0_166E
 		call	j_setupEditEqu
@@ -2372,9 +2372,9 @@
 		and		1Fh
 		cp		3
 		jp		z, SetTblGraphDraw
-		bit		1, (iy+17h)
+		bit		smarter_test, (iy+smartFlags)
 		jp		nz, SetTblGraphDraw
-		set		0, (iy+17h)
+		set		smartGraph, (iy+smartFlags)
 		jp		SetTblGraphDrawPreserveSmartTest
 ; ---------------------------------------------------------------------------
 
@@ -2454,7 +2454,7 @@
 
 Load_SFont:
 		push	bc
-		bit		5, (iy+35h)
+		bit		fontHookActive, (iy+hookflags3)
 		jr		z, p03loc_4D7B
 		ld		b, a
 		ld		a, 0
@@ -2463,7 +2463,7 @@
 		jr		z, p03loc_4D97
 
 p03loc_4D7B:
-		bit		1, (iy+35h)
+		bit		localizeHookActive, (iy+hookflags3)
 		jr		z, p03loc_4D8A
 		ld		b, a
 		ld		a, 75h ; 'u'
@@ -2484,7 +2484,7 @@
 ; ---------------------------------------------------------------------------
 
 SFont_Len:
-		bit		5, (iy+35h)
+		bit		fontHookActive, (iy+hookflags3)
 		jr		z, p03loc_4DA7
 		ld		b, a
 		ld		a, 2
@@ -2493,7 +2493,7 @@
 		ret		z
 
 p03loc_4DA7:
-		bit		1, (iy+35h)
+		bit		localizeHookActive, (iy+hookflags3)
 		jr		z, p03loc_4DB5
 		ld		b, a
 		ld		a, 77h ; 'w'
@@ -2585,14 +2585,14 @@
 		call	j_rclToQueue
 		jp		c, ErrMemory
 		call	popErrorHandleR
-		res		2, (iy+0Dh)
+		res		appAutoScroll, (iy+appFlags)
 		ld		hl, (editCursor)
 		ld		de, (rclQueue)
 		call	j_finishoutput
-		set		2, (iy+0Dh)
+		set		appAutoScroll, (iy+appFlags)
 		pop		hl
 		ld		(curRow), hl
-		res		5, (iy+0)
+		res		donePrgm, (iy+doneFlags)
 		ei
 		ret
 p03loc_4E65:
@@ -2605,7 +2605,7 @@
 
 p03sub_4E6C:
 		ld		a, 0
-		bit		2, (iy+35h)
+		bit		windowHookActive, (iy+hookflags3)
 		jr		z, p03loc_4E78
 p03loc_4E74:
 		call	Page0Call_362D
@@ -4663,7 +4663,7 @@
 		ld		hl, p03loc_569D
 		call	AppInit
 		call	j_CleanAll
-		set		3, (iy+14h)
+		set		grfSplitOverride, (iy+sGrFlags)
 
 p03loc_5681:
 		sub		a
@@ -4673,9 +4673,9 @@
 		jr		p03loc_568D
 
 p03loc_568D:
-		res		2, (iy+0Ch)
-		res		3, (iy+0Ch)
-		set		4, (iy+0Ch)
+		res		curAble, (iy+curFlags)
+		res		curOn, (iy+curFlags)
+		set		curLock, (iy+curFlags)
 		ret
 p03loc_569A:
 		jp		p03loc_5681
@@ -4688,8 +4688,8 @@
 		.dw		p03loc_569A
 		.db		0Ah
 p03loc_56AA:
-		res		4, (iy+0Ch)
-		res		3, (iy+14h)
+		res		curLock, (iy+curFlags)
+		res		grfSplitOverride, (iy+sGrFlags)
 		xor		a
 		ld		(varClass), a
 p03loc_56B6:
@@ -4713,7 +4713,7 @@
 
 Page03_3A77:
 		res		1, (iy+19h)
-		set		3, (iy+14h)
+		set		grfSplitOverride, (iy+sGrFlags)
 		call	RESETWINTOP
 		bit		0, (iy+9)
 		jr		z, p03loc_56F0
@@ -4747,7 +4747,7 @@
 		call	page0_176F
 		ld		hl, p03loc_5814
 		call	AppInit
-		bit		2, (iy+35h)
+		bit		windowHookActive, (iy+hookflags3)
 		jr		z, p03loc_5732
 		ld		a, 4
 		call	Page0Call_362D
@@ -4756,7 +4756,7 @@
 p03loc_5732:
 		ld		hl, p03loc_595D
 		ld		a, 11h
-		bit		1, (iy+35h)
+		bit		localizeHookActive, (iy+hookflags3)
 		call	nz, j_call_character_hook
 		ld		de, OP3
 		call	Mov8B
@@ -4772,7 +4772,7 @@
 
 
 p03sub_5751:
-		bit		2, (iy+35h)
+		bit		windowHookActive, (iy+hookflags3)
 		jr		z, p03loc_575E
 		ld		a, 7
 		call	Page0Call_362D
@@ -4809,7 +4809,7 @@
 		call	page0_176F
 		ld		hl, p03loc_5970
 		ld		a, 12h
-		bit		1, (iy+35h)
+		bit		localizeHookActive, (iy+hookflags3)
 		call	nz, j_call_character_hook
 		ld		de, OP3
 		call	Mov8B
@@ -4825,10 +4825,10 @@
 		bit		0, (iy+9)
 		jp		nz, Page0Call_35F7
 		call	InitNumVec
-		set		3, (iy+14h)
+		set		grfSplitOverride, (iy+sGrFlags)
 		ld		hl, p03loc_5964
 		ld		a, 13h
-		bit		1, (iy+35h)
+		bit		localizeHookActive, (iy+hookflags3)
 		call	nz, j_call_character_hook
 		ld		de, OP3
 		call	Mov8B
@@ -5441,7 +5441,7 @@
 
 
 CLine:
-		bit		5, (iy+14h)
+		bit		g_style_active, (iy+sGrFlags)
 		jr		z, p03loc_5A41
 
 p03loc_5A41:
@@ -5454,7 +5454,7 @@
 
 p03loc_5A49:
 		ld		a, 2
-		bit		7, (iy+35h)
+		bit		drawingHookActive, (iy+hookflags3)
 		call	nz, Page0Call_3483
 		jr		z, p03loc_5A57
 		pop		af
@@ -5773,7 +5773,7 @@
 
 
 p03sub_5C38:
-		bit		5, (iy+14h)
+		bit		g_style_active, (iy+sGrFlags)
 		ret		z
 		ld		a, (unk_9775)
 		cp		2
@@ -6915,7 +6915,7 @@
 		jr		z, p03loc_638D
 
 p03loc_6373:
-		res		1, (iy+2)
+		res		plotLoc, (iy+plotFlags)
 		call	CpyTo3FPS1
 		call	CpyTo4FPST
 		call	CpyO1ToFPS1
@@ -7054,9 +7054,9 @@
 		call	p03sub_65F5
 		jr		c, p03loc_63F9
 		cp		3
-		set		6, (iy+14h)
+		set		cmp_mod_box, (iy+sGrFlags)
 		jr		c, p03loc_6485
-		res		6, (iy+14h)
+		res		cmp_mod_box, (iy+sGrFlags)
 		jp		z, p03sub_614B
 		cp		4
 		jr		z, p03loc_6481
@@ -7100,7 +7100,7 @@
 ; ---------------------------------------------------------------------------
 
 p03loc_6481:
-		res		6, (iy+14h)
+		res		cmp_mod_box, (iy+sGrFlags)
 
 p03loc_6485:
 		push	de
@@ -7529,9 +7529,9 @@
 		ld		a, b
 		cp		2
 		jp		c, p03loc_6897
-		set		6, (iy+14h)
+		set		cmp_mod_box, (iy+sGrFlags)
 		jr		z, p03loc_671A
-		res		6, (iy+14h)
+		res		cmp_mod_box, (iy+sGrFlags)
 		cp		4
 		jr		z, p03loc_671A
 		jp		nc, p03loc_68C5
@@ -7724,8 +7724,8 @@
 
 SPLOTCOORD:
 		push	af
-		set		1, (iy+5)
-		bit		0, (iy+18h)
+		set		textEraseBelow, (iy+textFlags)
+		bit		grfExpr, (iy+traceFlags)
 		jr		nz, p03loc_6847
 		ld		hl, 0
 		ld		(penCol), hl
@@ -7761,7 +7761,7 @@
 ; ---------------------------------------------------------------------------
 
 p03loc_6847:
-		bit		4, (iy+4)
+		bit		grfNoCoord, (iy+grfDBFlags)
 		jr		z, p03loc_684F
 		pop		af
 		ret
@@ -8640,10 +8640,10 @@
 		jr		nz, p03loc_6D25
 		inc		hl
 		ld		a, (hl)
-		res		0, (iy+18h)
+		res		grfExpr, (iy+traceFlags)
 		bit		0, a
 		jr		z, p03loc_6D25
-		set		0, (iy+18h)
+		set		grfExpr, (iy+traceFlags)
 
 p03loc_6D25:
 		inc		hl
@@ -8842,7 +8842,7 @@
 
 p03sub_6E2F:
 
-		bit		4, (iy+3Ch)
+		bit		useFastCirc, (iy+plotFlag3)
 		jr		z, p03loc_6E39
 		call	j_DrawCirc2
 		ret
@@ -8855,7 +8855,7 @@
 		rst		18h
 		ld		a, 60h ; '`'
 		ld		(OP1M), a
-		bit		2, (iy+0)
+		bit		trigDeg, (iy+trigFlags)
 		call	z, DToR
 		rst		18h
 		set		5, (iy+3)
@@ -9251,7 +9251,7 @@
 		ld		(unk_8D0A), a
 		ld		hl, p03loc_7650
 		call	page0_7C1
-		set		3, (iy+14h)
+		set		grfSplitOverride, (iy+sGrFlags)
 
 p03loc_70CC:
 		call	p03sub_71FC
@@ -9261,7 +9261,7 @@
 		ld		d, (hl)
 		ex		de, hl
 		ld		a, 74h ; 't'
-		bit		1, (iy+35h)
+		bit		localizeHookActive, (iy+hookflags3)
 		call	nz, j_call_character_hook
 		ld		de, OP3
 		call	Mov8B
@@ -9408,8 +9408,8 @@
 		res		4, (iy+1Ch)
 
 p03loc_71DF:
-		set		6, (iy+0Dh)
-		res		1, (iy+0Dh)
+		set		appCurWord, (iy+appFlags)
+		res		appTextSave, (iy+appFlags)
 		call	CanAlphIns
 		bit		4, (iy+1Ch)
 		ret		z
@@ -9553,8 +9553,8 @@
 ; ---------------------------------------------------------------------------
 		ld		a, (unk_89F5)
 		push	af
-		set		3, (iy+5)
-		set		0, (iy+8)
+		set		textInverse, (iy+textFlags)
+		set		preClrForMode, (iy+newDispF)
 		call	p03sub_4D49
 		pop		af
 		ld		(unk_89F5), a
@@ -9566,7 +9566,7 @@
 		call	j_PutC
 		ld		hl, p03loc_7A64
 		ld		a, 71h ; 'q'
-		bit		1, (iy+35h)
+		bit		localizeHookActive, (iy+hookflags3)
 		call	nz, j_call_character_hook
 		call	p03sub_4D49
 		ret		c
@@ -9732,7 +9732,7 @@
 ; ---------------------------------------------------------------------------
 
 p03loc_73D7:
-		bit		7, (iy+0Eh)
+		bit		enableQueue, (iy+rclFlag)
 		jr		nz, p03loc_73E0
 		cp		8Ah ; '�'
 		ret		z
@@ -9807,7 +9807,7 @@
 
 p03loc_7457:
 		call	popErrorHandleR
-		bit		4, (iy+1)
+		bit		monAbandon, (iy+monFlags)
 		ret		nz
 		ld		hl, 92C5h
 		bit		2, (hl)
@@ -9815,7 +9815,7 @@
 		res		2, (hl)
 		jp		p03loc_73B7
 p03loc_746C:
-		bit		4, (iy+1)
+		bit		monAbandon, (iy+monFlags)
 		ret		nz
 		jp		JError
 
@@ -9833,13 +9833,13 @@
 
 
 p03sub_747A:
-		set		4, (iy+1)
+		set		monAbandon, (iy+monFlags)
 		ld		hl, p03loc_748A
 		call	pushErrorHandleR
 		call	Page0Call_3435
 		call	popErrorHandleR
 p03loc_748A:
-		res		4, (iy+1)
+		res		monAbandon, (iy+monFlags)
 		ret
 ; End of function p03sub_747A
 
@@ -9862,7 +9862,7 @@
 p03loc_74A3:
 		call	page0_740
 		call	p03sub_7474
-		res		3, (iy+14h)
+		res		grfSplitOverride, (iy+sGrFlags)
 ; End of function p03sub_748F
 
 
@@ -9881,8 +9881,8 @@
 
 p03sub_74B9:
 
-		res		6, (iy+0Dh)
-		set		1, (iy+0Dh)
+		res		appCurWord, (iy+appFlags)
+		set		appTextSave, (iy+appFlags)
 		ret
 ; End of function p03sub_74B9
 
@@ -9958,7 +9958,7 @@
 		ld		a, (ix+5)
 		ld		(curRow+1), a
 		jr		nc, p03loc_756F
-		bit		1, (iy+35h)
+		bit		localizeHookActive, (iy+hookflags3)
 		jr		z, p03loc_755C
 		ld		h, (ix+0Dh)
 		ld		l, (ix+0Eh)
@@ -9972,7 +9972,7 @@
 
 p03loc_7561:
 		ld		b, a
-		set		3, (iy+5)
+		set		textInverse, (iy+textFlags)
 		ld		a, 20h ; ' '
 
 p03loc_7568:
@@ -9988,15 +9988,15 @@
 		and		(ix+0Ch)
 		cp		(ix+0Bh)
 		jr		nz, p03loc_7584
-		set		3, (iy+5)
+		set		textInverse, (iy+textFlags)
 		jr		p03loc_7588
 ; ---------------------------------------------------------------------------
 
 p03loc_7584:
-		set		0, (iy+8)
+		set		preClrForMode, (iy+newDispF)
 
 p03loc_7588:
-		bit		1, (iy+35h)
+		bit		localizeHookActive, (iy+hookflags3)
 		jr		z, p03loc_759B
 		ld		h, (ix+0Dh)
 		ld		l, (ix+0Eh)
@@ -10050,7 +10050,7 @@
 		call	pushErrorHandleR
 		call	p03sub_7C6C
 		call	PopRealO1
-		res		3, (iy+14h)
+		res		grfSplitOverride, (iy+sGrFlags)
 		call	p03sub_7474
 		call	p03sub_74B9
 		call	j_ClrScrnFull
@@ -10088,14 +10088,14 @@
 p03loc_7621:
 		bit		7, (iy+9)
 		call	nz, Page0Call_344D
-		bit		0, (iy+14h)
+		bit		grfSplit, (iy+sGrFlags)
 		call	nz, j_GrBufCpy
 		set		6, (iy+1Ch)
 		ld		a, 40h ; '@'
 		call	newContext
 		ret
 p03loc_7639:
-		res		6, (iy+9)
+		res		statsValid, (iy+statFlags)
 		res		7, (iy+9)
 		res		7, a
 		jp		JError
@@ -11725,7 +11725,7 @@
 
 
 p03sub_7D48:
-		res		1, (iy+15h)
+		res		saIndic, (iy+newIndicFlags)
 		ld		a, (unk_97A1)
 		ld		b, a
 		ld		ix, (unk_979F)