source/page78/initial.asm
author brandonlw
Tue, 20 May 2014 02:59:10 -0400
changeset 41 9ef17625274f
parent 39 4651e87022c7
child 42 adad2f097dcb
permissions -rw-r--r--
Finished _newContext and other page 0 cleanup. Still lots left to go...

p78loc_4000:
		.dw		p78loc_4156
		.dw		p78loc_457D
		.dw		p78loc_41DD
		.dw		p78loc_4183
		.dw		p78loc_4190
		.dw		p78loc_419C
		.dw		p78loc_41C1
		.dw		p78loc_41E1
		.dw		p78loc_4747
		.dw		p78loc_4767
		.dw		p78loc_470B
		.dw		p78loc_41FB
		.dw		p78loc_4226
		.dw		p78loc_4229
		.dw		p78loc_43FE
		.dw		p78loc_44FD
		.dw		p78loc_452C
		.dw		p78loc_47B9
		.dw		p78loc_4742
		.dw		p78loc_4727
		.dw		p78loc_48D3
		.dw		p78loc_43D7
		.dw		p78loc_43DB
		.dw		p78loc_4B65
		.dw		0
		.dw		p78loc_41A7
		.dw		p78loc_4580
		.dw		p78loc_488A
		.dw		p78loc_48AE
		.dw		p78loc_437F
		.dw		p78loc_42BD
		.dw		p78loc_42C2
		.dw		p78loc_42D6
		.dw		p78loc_42DB
		.dw		p78loc_42E0
		.dw		p78loc_42D1
		.dw		p78loc_42E5
		.dw		p78loc_4BE8
		.dw		p78loc_472E
		.dw		p78loc_42EA
		.dw		p78loc_42EF
		.dw		p78loc_4C37
		.dw		p78loc_4C2D
		.dw		p78loc_4C32
		.dw		p78loc_42CC
		.dw		p78loc_42B3
		.dw		p78loc_42B8
		.dw		p78loc_42C7
		.dw		p78loc_496A
		.dw		p78loc_496A
		.dw		p78loc_496A
		.dw		p78loc_496A
		.dw		p78loc_520A
		.dw		p78loc_529D
		.dw		p78loc_498A
		.dw		p78loc_498E
		.dw		p78loc_4970
		.dw		p78loc_494E
		.dw		p78loc_494A
		.dw		p78loc_560B
		.dw		p78loc_4966
		.dw		p78loc_4952
		.dw		p78loc_4956
		.dw		p78loc_495A
		.dw		p78loc_491E
		.dw		p78loc_4978
		.dw		p78loc_4974
		.dw		p78loc_4962
		.dw		p78loc_495E
		.dw		p78loc_54D1
		.dw		p78loc_5639
		.dw		p78loc_5647
		.dw		p78loc_5655
		.dw		p78loc_566C
		.dw		p78loc_567E
		.dw		p78loc_5694
		.dw		p78loc_569C
		.dw		p78loc_5403
		.dw		p78loc_45AB
		.dw		p78loc_5407
		.dw		p78loc_547B
		.dw		p78loc_544C
		.dw		p78loc_41EB
		.dw		p78loc_49D4
		.dw		p78loc_55EA
		.dw		ErrSyntax
		.dw		ErrSyntax
		.dw		p78loc_53D4
		.dw		p78loc_4831
		.dw		p78loc_56A4
		.dw		p78loc_56AC
		.dw		p78loc_56B4
		.dw		p78loc_56BA
		.dw		p78loc_40D6
		.dw		p78loc_40D2
		.dw		p78loc_5721

; =============== S U B	R O U T	I N E =======================================


ParsePrgmName:
		call	INCFETCH
		cp		5Fh ; '_'
		jp		nz, ErrSyntax
		call	p78sub_5DCC
		ld		(hl), 5
		ld		b, 9
		jp		FetchNumLine
; End of function ParsePrgmName

p78loc_40D2:
		call	j_AsmComp
		ret
p78loc_40D6:
		call	ParsePrgmName
		call	CKENDLIN
		call	nz, p78sub_4217
		call	j_ExecutePrgm
		res		numOP1, (iy+ParsFlag2)
		ret

; =============== S U B	R O U T	I N E =======================================


p78sub_40E7:

		ld		de, 0

p78loc_40EA:
		call	NXTFETCH
		ret		c
		cp		0D0h ; '�'
		jr		nz, p78loc_4102
		ld		a, d
		or		e
		jr		nz, p78loc_410D
		ld		a, 0D0h	; '�'

p78loc_40F8:
		ld		(nextParseByte), bc
		push	af
		call	CKENDLINERR
		pop		af
		ret
; ---------------------------------------------------------------------------

p78loc_4102:
		cp		0D4h ; '�'
		jr		nz, p78loc_4114
		ld		a, d
		or		e
		ld		a, 0D4h	; '�'
		jr		z, p78loc_40F8
		dec		de

p78loc_410D:
		push	de
		call	p78sub_4137
		pop		de
		jr		p78loc_40EA
; ---------------------------------------------------------------------------

p78loc_4114:
		cp		0D3h ; '�'
		jr		nz, p78loc_411B

p78loc_4118:
		inc		de
		jr		p78loc_410D
; ---------------------------------------------------------------------------

p78loc_411B:
		cp		0D1h ; '�'
		jr		z, p78loc_4118
		cp		0D2h ; '�'
		jr		z, p78loc_4118
		cp		0CEh ; '�'
		jr		nz, p78loc_410D
		push	de
		call	p78sub_4137
		pop		de
		call	NXTFETCH
		ret		c
		cp		0CFh ; '�'
		jr		nz, p78loc_40EA
		inc		de
		jr		p78loc_410D
; End of function p78sub_40E7


; =============== S U B	R O U T	I N E =======================================


p78sub_4137:
		call	CKENDLIN
		ld		(nextParseByte), bc
		ret		z
		cp		2Ah ; '*'
		jr		nz, p78loc_414C
		call	p78sub_5379
		call	CKENDEXP
		jr		nz, p78sub_4137
		ret
; ---------------------------------------------------------------------------

p78loc_414C:
		call	isA2ByteTok
		jr		nz, p78sub_4137
		call	INCFETCH
		jr		p78sub_4137
; End of function p78sub_4137

p78loc_4156:
		call	FINDEOL
		jp		z, ErrArgument
		call	STTMPEQ
		call	BRKINC

p78loc_4162:
		jp		c, ErrSyntax
		call	NXTFETCH
		jr		c, p78loc_4162
		cp		0CFh ; '�'
		jr		nz, p78loc_4179
		ld		(nextParseByte), bc
		call	CKENDLINERR
		pop		hl
		jp		p78loc_5825
; ---------------------------------------------------------------------------

p78loc_4179:
		rst		18h
		call	p78sub_5370
		jp		nz, ErrDataType
		jp		p78loc_4295
p78loc_4183:
		call	FINDEOL

p78loc_4186:
		jp		z, ErrArgument
		call	STTMPEQ
		pop		hl
		jp		p78loc_5732
p78loc_4190:
		call	FINDEOL
		jr		z, p78loc_4186
		call	STTMPEQ
		pop		hl
		jp		p78loc_576B
p78loc_419C:
		ld		b, 0Eh
		call	p78sub_41B7

p78loc_41A1:
		call	CKFETCHVAR
		jp		p78loc_4945
p78loc_41A7:
		call	CKENDLIN
		ld		b, 14h
		call	p78sub_41B7
		call	NXTFETCH
		cp		8
		ret		z
		jr		p78loc_41A1

; =============== S U B	R O U T	I N E =======================================


p78sub_41B7:
		ld		c, 1
		call	PUSH2BOPER
		ld		a, 10h
		jp		PUSHOPER
; End of function p78sub_41B7

p78loc_41C1:
		ld		a, 1

p78loc_41C3:
		ld		(OP3), a
		call	CKENDLINERR
		call	POPOPER
		call	POP2BOPER
		pop		hl
		push	bc
		call	CKPARSEND
		jr		z, p78loc_4223
		call	POP2BOPER
		ld		a, (OP3)
		ret
p78loc_41DD:
		ld		a, 2
		jr		p78loc_41C3

; =============== S U B	R O U T	I N E =======================================

p78loc_41E1:
p78sub_41E1:
		call	CKENDLINERR
		ld		hl, (basic_end)
		ld		(nextParseByte), hl
		ret
; End of function p78sub_41E1

p78loc_41EB:
		call	CKENDLINERR
		ld		hl, lastEntryStk
		ld		(pixWide_m_2+1), hl
		ld		hl, 0
		ld		(numLastEntries), hl
		ret
p78loc_41FB:
		call	p78sub_41E1
		ld		hl, (fpBase)
		ld		de, 9
		add		hl, de
		ld		(FPS), hl
		ld		hl, (OPBase)
		ld		de, 0FFF5h
		add		hl, de
		ld		(OPS), hl
		ret

; =============== S U B	R O U T	I N E =======================================


p78sub_4213:

		call	CKENDLIN
		ret		z
; End of function p78sub_4213


; =============== S U B	R O U T	I N E =======================================


p78sub_4217:

		ld		(nextParseByte), bc

p78loc_421B:
		cp		11h
		jr		nz, p78loc_4223
		call	CKENDLIN
		ret		z

p78loc_4223:
		jp		ErrSyntax
; End of function p78sub_4217

p78loc_4226:
		xor		a
		jr		p78loc_422B
p78loc_4229:
		ld		a, 1

p78loc_422B:
		push	af
		call	BRKINC
		call	FETCHVARA
		ld		(nextParseByte), bc
		call	COMMAERR
		call	FIND_E_UNDEF
		ld		(inputDat), de
		and		1Fh

p78loc_4242:
		jp		nz, ErrDataType
		call	OP1ToOP6
		call	AHEADEQUAL
		dec		bc
		ld		(nextParseByte), bc
		or		a
		call	STEQARG3
		call	p78sub_4213
		call	BRKINC
		jr		c, p78loc_4223
		call	NXTFETCH
		jr		c, p78loc_4223
		rst		18h
		call	PushRealO6
		call	p78sub_5370
		jr		nz, p78loc_4242
		call	OP1ToOP6
		ld		hl, (inputDat)
		rst		20h
		pop		af
		push	af
		or		a
		jr		z, p78loc_427B
		call	Minus1
		jr		p78loc_427E
; ---------------------------------------------------------------------------

p78loc_427B:
		call	Plus1

p78loc_427E:
		rst		8
		call	PopRealO1
		call	PushRealO2
		call	StoOther
		call	OP6ToOP2
		pop		af
		or		a
		push	af
		call	z, Page0Call_3AAD
		pop		af
		call	nz, Page0Call_3AB3

p78loc_4295:
		call	CkOP1FP0
		call	z, p78sub_4137
		jp		p78sub_49B8

; =============== S U B	R O U T	I N E =======================================


ErrNonReal_FPST_FPS1:
		ld		b, 2
; End of function ErrNonReal_FPST_FPS1


; =============== S U B	R O U T	I N E =======================================


ErrNonReal:
		call	FPSMINUS9

p78loc_42A3:
		push	bc
		ld		a, (hl)
		and		1Fh
		jr		nz, p78loc_42B0
		call	HLMINUS9
		pop		bc
		djnz	p78loc_42A3
		ret
; ---------------------------------------------------------------------------

p78loc_42B0:
		jp		ErrDataType
; End of function ErrNonReal

p78loc_42B3:
		ld		de, p78loc_4F57
		jr		p78loc_42F2
p78loc_42B8:
		ld		de, p78loc_4F5B
		jr		p78loc_42F2
p78loc_42BD:
		ld		de, p78loc_4F5F
		jr		p78loc_42F2
p78loc_42C2:
		ld		de, p78loc_4F6F
		jr		p78loc_42F2
p78loc_42C7:
		ld		de, p78loc_4F6B
		jr		p78loc_42F2
p78loc_42CC:
		ld		de, p78loc_4F63
		jr		p78loc_42F2
p78loc_42D1:
		ld		de, p78loc_4F67
		jr		p78loc_42F2
p78loc_42D6:
		ld		de, p78loc_4F7B
		jr		p78loc_42F2
p78loc_42DB:
		ld		de, p78loc_4F7F
		jr		p78loc_42F2
p78loc_42E0:
		ld		de, p78loc_4F83
		jr		p78loc_42F2
p78loc_42E5:
		ld		de, p78loc_4F87
		jr		p78loc_42F2
p78loc_42EA:
		ld		de, p78loc_4F8B
		jr		p78loc_42F2
p78loc_42EF:
		ld		de, p78loc_4F8F
p78loc_42F2:
		call	CKENDLIN
		push	de
		jr		nz, p78loc_42FD
		call	p78sub_4391
		jr		p78loc_431F
; ---------------------------------------------------------------------------

p78loc_42FD:
		call	p78sub_4321
		cp		1
		jr		nz, p78loc_431F
		call	CkOP1Real
		cp		3
		jr		z, p78loc_4316
		or		a
		ld		a, 1
		jr		nz, p78loc_431F
		rst		18h
		call	p78sub_4391
		jr		p78loc_431D
; ---------------------------------------------------------------------------

p78loc_4316:
		call	p78sub_4391
		rst		18h
		call	OP2ToOP1

p78loc_431D:
		ld		a, 3

p78loc_431F:
		pop		hl
		jp		(hl)

; =============== S U B	R O U T	I N E =======================================


p78sub_4321:

		cp		10h
		push	af
		jr		nz, p78loc_432A
		ld		(nextParseByte), bc

p78loc_432A:
		xor		a
		ld		(curInc), a

p78loc_432E:
		call	CKENDLIN
		jr		z, p78loc_4374
		cp		5Eh ; '^'
		jr		z, p78loc_434C
		cp		0EBh ; '�'
		jr		z, p78loc_434C
		cp		5Dh ; ']'
		jr		z, p78loc_434C
		pop		af
		push	af
		call	p78sub_54A9
		ld		(pTempCnt), hl
		ld		a, (curInc)
		jr		p78loc_4369
; ---------------------------------------------------------------------------

p78loc_434C:
		call	CKFETCHVAR
		call	Page0Call_2EF5
		jp		z, Page0Call_24E1
		call	p78sub_455D
		ld		a, 3
		ld		(OP1), a
		ld		a, (OP1+1)
		cp		5Dh ; ']'
		call	z, Find_Parse_Formula
		ld		a, (curInc)
		inc		a

p78loc_4369:
		cp		0Ah
		jp		z, ErrArgument
		ld		(curInc), a
		rst		18h
		jr		p78loc_432E
; ---------------------------------------------------------------------------

p78loc_4374:
		pop		af
		call	PopRealO1
		call	CKENDLINERR
		ld		a, (curInc)
		ret
; End of function p78sub_4321

p78loc_437F:
		ld		de, p78loc_4F4E
		call	CKENDLIN
		push	de
		jp		nz, p78loc_42FD

p78loc_4389:
		call	p78sub_43CF
		ld		a, 1
		jp		p78loc_431F

; =============== S U B	R O U T	I N E =======================================


p78sub_4391:
		rst		18h
		call	p78sub_43CF
		call	PopRealO2
		rst		18h
		call	PushRealO2
		ld		a, 1
		call	p78sub_43D1
		call	PopRealO2
		ld		a, 2
		ret
; End of function p78sub_4391

; ---------------------------------------------------------------------------
		ld		de, p78loc_4F57
		call	CKENDLIN
		push	de
		jr		z, p78loc_4389
		call	p78sub_4321
		cp		1
		jp		nz, p78loc_431F
		call	CkOP1Real
		cp		3
		ld		a, 1
		jp		nz, p78loc_431F
		rst		8
		call	p78sub_43CF
		rst		18h
		call	OP2ToOP1
		ld		a, 2
		jp		p78loc_431F

; =============== S U B	R O U T	I N E =======================================


p78sub_43CF:
		; p78sub_4391+1p ...
		ld		a, 0
; End of function p78sub_43CF


; =============== S U B	R O U T	I N E =======================================


p78sub_43D1:
		call	page0_1682
		jp		Find_Parse_Formula
; End of function p78sub_43D1

p78loc_43D7:
		ld		b, 0Ch
		jr		p78loc_43DD
p78loc_43DB:
		ld		b, 0Dh

p78loc_43DD:
		jp		p78loc_4913
p78loc_43E0:
		call	CKENDLINERR
		ld		a, 1
		push	af
		call	j_PDspGrph
		ld		a, 5Fh ; '_'
		jr		p78loc_43F8
; ---------------------------------------------------------------------------

p78loc_43ED:
		xor		a
		push	af
		call	j_PDspGrph
		ld		hl, freeSaveY
		inc		(hl)
		ld		a, 4

p78loc_43F8:
		call	j_GRDECODA
		jp		p78loc_4A36
p78loc_43FE:
		xor		a
		ld		(OP1), a
		call	CKENDLIN
		jr		z, p78loc_43ED
		cp		10h
		push	af
		jr		nz, p78loc_4413
		ld		(nextParseByte), bc
		call	CKENDLIN

p78loc_4413:
		call	PARSAHEAD
		jr		c, p78loc_4429
		call	INPARG
		call	p78sub_5370
		call	CkOP1Real
		cp		4
		jp		nz, ErrDataType
		call	INCFETCH

p78loc_4429:
		call	OP1ToOP6
		call	p78sub_448B
		call	CKENDLIN
		jr		z, p78loc_4447
		ld		(nextParseByte), bc
		cp		11h

p78loc_443A:
		jp		nz, ErrSyntax
		pop		af
		push	af
		jr		nz, p78loc_443A
		call	CKENDLIN
		jp		nz, p78loc_443A

p78loc_4447:
		pop		af
		ld		a, (OP1+1)
		push	af
		call	OP6ToOP1
		ld		a, (OP1)
		or		a
		jr		z, p78loc_4460
		call	Page0Call_241E
		ld		hl, ioPrompt
		call	Page78_2D81
		jr		p78loc_4463
; ---------------------------------------------------------------------------

p78loc_4460:
		call	p78sub_7EA6

p78loc_4463:
		ei
		pop		af
		cp		0AAh ; '�'
		jr		nz, p78loc_4485
		ld		hl, (cleanTmp)
		push	hl
		ld		hl, (pTempCnt)
		ld		(cleanTmp), hl
		call	GetStringInput
		pop		hl
		set		numOP1, (iy+ParsFlag2)
		ld		a, 4
		ld		(OP1), a
		call	p78sub_44E4
		jr		p78loc_4488
; ---------------------------------------------------------------------------

p78loc_4485:
		call	p78sub_44CA

p78loc_4488:
		jp		p78loc_4FEF

; =============== S U B	R O U T	I N E =======================================


p78sub_448B:

		call	BRKINC
		push	af
		push	bc
		cp		63h ; 'c'
		push	af
		call	z, FETCHVAR
		pop		af
		call	nz, FETCHVARA
		push	bc
		call	OP1ToOP5
		pop		hl
		pop		bc
		or		a
		sbc		hl, bc
		inc		hl
		inc		hl
		call	STTMPEQ
		rst		18h
		rst		10h
		inc		de
		inc		de
		inc		de
		ld		a, (de)
		add		a, 3
		ld		l, a
		ld		h, 0
		add		hl, de
		ld		a, 63h ; 'c'
		ld		(hl), a
		inc		hl
		ld		a, 40h ; '@'
		ld		(hl), a
		call	OP5ToOP1
		pop		af
		cp		63h ; 'c'
		ret		z
		call	Page0Call_241E
		call	nc, ErrOnCertainTypes
		xor		a
		ret
; End of function p78sub_448B


; =============== S U B	R O U T	I N E =======================================


p78sub_44CA:

		ld		hl, (cleanTmp)
		push	hl
		ld		hl, (pTempCnt)
		ld		(cleanTmp), hl
		call	SAVEPARSE
		call	GetStringInput2
		call	OP1ToOP6
		call	p78sub_5A80
		call	OP6ToOP1
		pop		hl
; End of function p78sub_44CA


; =============== S U B	R O U T	I N E =======================================


p78sub_44E4:
		ld		(cleanTmp), hl
		call	CHKERRBREAK
		call	page0_1717
		call	PopRealO3
		call	PushOP1
		call	OP3ToOP1
		call	ParseInpGraph
		call	p78sub_7EF2
		ret
p78loc_44FD:
		call	CKENDLIN
		jp		z, ErrArgument
		ld		hl, (pTempCnt)
		push	hl
		cp		10h
		push	af
		jr		nz, p78loc_4510
		ld		(nextParseByte), bc

p78loc_4510:
		call	p78sub_448B
		call	p78sub_455D
		call	j_SETVARNAME
		call	p78sub_44CA
		pop		af
		pop		hl
		push	hl
		push	af
		ld		(pTempCnt), hl
		call	CKENDLIN
		jr		nz, p78loc_4510
		pop		hl
		pop		hl
		jr		p78loc_455A
p78loc_452C:
		call	CKENDLIN
		jr		nz, p78loc_4537
		call	Disp
		ei
		jr		p78loc_455A
; ---------------------------------------------------------------------------

p78loc_4537:
		ld		hl, (pTempCnt)
		push	hl
		push	af
		call	AHEADEQUAL

p78loc_453F:
		call	STEQARG2
		call	p78sub_455D
		call	p78sub_5370
		call	p78sub_7F5E
		ei
		pop		af
		pop		hl
		push	hl
		push	af
		ld		(pTempCnt), hl
		call	CKENDLIN
		jr		nz, p78loc_453F
		pop		hl
		pop		hl

p78loc_455A:
		jp		p78loc_4FEF

; =============== S U B	R O U T	I N E =======================================


p78sub_455D:
		call	CKENDLIN
		ret		z
		ld		(nextParseByte), bc
		cp		2Bh ; '+'
		jr		nz, p78loc_456F
		call	CKENDLIN
		ret		nz
		jr		p78loc_457D
; ---------------------------------------------------------------------------

p78loc_456F:
		cp		11h
		jr		nz, p78loc_457D
		pop		hl
		pop		af
		push	af
		push	hl
		jr		nz, p78loc_457D
		call	CKENDLIN
		ret		z
; End of function p78sub_455D

; START	OF FUNCTION CHUNK FOR p78sub_4747

p78loc_457D:
		jp		ErrSyntax
p78loc_4580:
		call	CKENDLIN
		cp		2Ah ; '*'
		jr		nz, p78loc_45A5
		ld		(nextParseByte), bc
		call	INCFETCH
		cp		4Ch ; 'L'
		jr		nz, p78loc_457D
		call	CKENDLIN
		jr		nz, p78loc_457D
		ld		hl, (localLanguage)
		call	j_SetXXXXOP2
		call	OP2ToOP1
		call	StoAns
		jr		p78loc_455A
; ---------------------------------------------------------------------------

p78loc_45A5:
		res		0, (iy+1Bh)
		jr		p78loc_45AF
p78loc_45AB:
		set		0, (iy+1Bh)

p78loc_45AF:
		call	Page0Call_2D87
		call	CKFETCHVAR
		push	af
		bit		0, (iy+1Bh)
		jr		nz, p78loc_45C0
		set		IDis82h, (iy+linkFlags)

p78loc_45C0:
		ld		a, (OP1+1)
		cp		5Dh ; ']'
		jr		nz, p78loc_45D7
		bit		0, (iy+1Bh)
		jr		nz, p78loc_4619
		set		IDis95h, (iy+linkFlags)
		res		IDis82h, (iy+linkFlags)
		jr		p78loc_4619
; ---------------------------------------------------------------------------

p78loc_45D7:
		cp		5Ch ; '\'
		jr		z, p78loc_4619
		pop		af

p78loc_45DC:
		call	p78sub_4213
		ld		hl, p78loc_45FC
		call	pushErrorHandleR
		set		ignoreBPLink, (iy+hookflags1)
		res		secondTimerEnabled, (iy+interruptFlags)
		di
		ld		a, 15h
		ld		(sndRecState), a
		call	j_GETVARCMD
		call	popErrorHandleR
		jp		p78loc_455A
p78loc_45FC:
		ld		hl, p78loc_460A
		call	pushErrorHandleR
		ld		a, 1
		call	j_SendSkipExitPacket
		call	popErrorHandleR
p78loc_460A:
		di
		res		indicOnly, (iy+indicFlags)
		ld		a, 5
		call	lcd_busy
		out		(10h), a
		ei
		jr		p78loc_4685
; ---------------------------------------------------------------------------

p78loc_4619:
		ld		b, a
		pop		af
		cp		10h
		jr		nz, p78loc_45DC
		push	bc
		rst		18h
		call	FIND_E_UNDEF
		call	INCFETCH
		pop		af
		push	af
		ld		de, 3E7h
		cp		5Dh ; ']'
		jr		z, p78loc_4633
		ld		de, 63h	; 'c'

p78loc_4633:
		call	p78sub_46F7
		pop		af
		push	de
		cp		5Dh ; ']'
		jr		z, p78loc_468C
		call	CKENDLIN

p78loc_463F:
		jp		z, ErrArgument
		cp		2Bh ; '+'
		jp		nz, ErrSyntax
		ld		(nextParseByte), bc
		call	CKENDLIN
		jr		z, p78loc_463F
		ld		de, 63h	; 'c'
		call	p78sub_46F7
		pop		bc
		ld		d, c
		push	de
		call	CKENDLIN
		jr		z, p78loc_466A
		cp		11h
		jp		nz, ErrSyntax
		ld		(nextParseByte), bc
		call	p78sub_4213

p78loc_466A:
		call	p78sub_46D6
		pop		de
		ld		a, h
		cp		d

p78loc_4670:
		jp		c, ErrDimension
		ld		a, l
		cp		e
		jr		c, p78loc_4670
		push	de
		call	p78sub_46E1
		pop		bc
		jr		nz, p78loc_4685
		ld		de, (unk_9311)
		call	j_PutToMat

p78loc_4685:
		res		ignoreBPLink, (iy+hookflags1)
		jp		p78loc_4FEF
; ---------------------------------------------------------------------------

p78loc_468C:
		call	CKENDLIN
		jr		z, p78loc_469D
		cp		11h
		jp		nz, ErrSyntax
		ld		(nextParseByte), bc
		call	p78sub_4213

p78loc_469D:
		call	p78sub_46D6
		pop		de
		or		a
		sbc		hl, de
		jp		c, ErrDimension
		push	de
		rst		18h
		pop		de
		push	de
		call	p78sub_46E1
		pop		hl
		jr		z, p78loc_46B6
		call	FPOPREAL
		jr		p78loc_4685
; ---------------------------------------------------------------------------

p78loc_46B6:
		push	hl
		call	CkOP1Real
		jr		z, p78loc_46C7
		ld		de, 848Bh
		ld		hl, 8489h
		ld		bc, 9
		lddr

p78loc_46C7:
		call	PopRealO3
		call	PushOP1
		call	OP3ToOP1
		pop		bc
		call	STLSTVECEL
		jr		p78loc_4685

; =============== S U B	R O U T	I N E =======================================


p78sub_46D6:

		call	PopRealO1
		call	FINDSYM_GET_SIZE
		ld		(unk_9311), de
		ret
; End of function p78sub_46D6


; =============== S U B	R O U T	I N E =======================================


p78sub_46E1:
		ld		(OP1+7), de
		ld		a, 16h
		ld		(sndRecState), a
		ld		a, 0FFh
		ld		(OP2EXT), a
		call	j_GETVARCMD
		ld		a, (OP2EXT)
		or		a
		ret
; End of function p78sub_46E1


; =============== S U B	R O U T	I N E =======================================


p78sub_46F7:

		ld		hl, (pTempCnt)
		push	hl
		push	de
		call	STEQARG2
		call	p78sub_5370
		pop		hl
		call	ConvDim00
		pop		hl
		ld		(pTempCnt), hl
		ret
; End of function p78sub_46F7

p78loc_470B:
		call	FINDEOL
		jr		z, p78loc_4720
		call	STTMPEQ
		rst		18h
		call	p78sub_5370
		call	StoAns
		call	WaitEnterKeyValue
		jp		p78sub_49B8
; ---------------------------------------------------------------------------

p78loc_4720:
		call	p78sub_4811
		call	Page78_32F1
		ret
p78loc_4727:
		call	CKENDLINERR
		call	Page78_3837
		ret
p78loc_472E:
		call	CKENDLINERR
		ld		hl, 91D9h
		call	page0_16FA
		set		reTable, (iy+tblFlags)
		ld		hl, 0
		ld		(unk_91E0), hl
		ret
p78loc_4742:
		ld		b, 0Fh
		jp		p78loc_4913

; =============== S U B	R O U T	I N E =======================================


p78sub_4747:
p78loc_4747:
		call	INCFETCH
		jp		c, p78loc_457D
		call	p78sub_5DBF
		ld		l, 0
		ld		h, a
		push	hl
		call	CKENDLIN
		jr		z, p78loc_4765
		call	INCFETCH
		call	p78sub_5DBF
		pop		hl
		ld		l, a
		push	hl
		call	CKENDLINERR

p78loc_4765:
		pop		hl
		ret
; End of function p78sub_4747

p78loc_4767:
		call	p78sub_4747
; START	OF FUNCTION CHUNK FOR p78sub_52FE

p78loc_476A:
		ex		de, hl
		ld		hl, (nextParseByte)
		push	hl
		ld		hl, (basic_start)
		dec		hl
		ld		(nextParseByte), hl
		push	de
		jr		p78loc_479B
; ---------------------------------------------------------------------------

p78loc_4779:
		push	de

p78loc_477A:
		; p78sub_52FE-B6Aj
		call	INCFETCH

p78loc_477D:
		; p78sub_52FE-B5Ej
		or		a
		jr		z, p78loc_47AF
		cp		3Fh ; '?'
		jr		z, p78loc_479B
		cp		3Eh ; '>'
		jr		z, p78loc_479B
		call	isA2ByteTok
		jr		nz, p78loc_4792
		call	INCFETCH
		jr		p78loc_477A
; ---------------------------------------------------------------------------

p78loc_4792:
		cp		2Ah ; '*'
		jr		nz, p78loc_477A
		call	p78sub_5379
		jr		p78loc_477D
; ---------------------------------------------------------------------------

p78loc_479B:
		; p78sub_52FE-B7Cj ...
		call	INCFETCH
		cp		0D6h ; '�'
		jr		nz, p78loc_477D
		call	p78sub_4747
		pop		de
		call	CpHLDE
		jr		nz, p78loc_4779
		pop		de
		jp		p78loc_4FEF
; ---------------------------------------------------------------------------

p78loc_47AF:
		pop		af
		pop		hl
		ld		(nextParseByte), hl
		ld		a, 14h
		jp		JError

p78loc_47B9:
		call	CKENDLINERR
p78loc_47BC:
		call	j_PDspGrph
		jp		p78loc_4FEF
p78loc_47C2:
		.dw		p78loc_4A0F
		.dw		p78loc_480A
		.dw		p78loc_4854
		.dw		p78loc_486F
		.dw		p78loc_43E0
		.dw		p78loc_4827
		.dw		p78loc_4835
		.dw		p78loc_4873
		.dw		p78loc_484B
		.dw		p78loc_4877
		.dw		p78loc_487B
		.dw		p78loc_4868
		.dw		p78loc_487F
		.dw		ErrInvalid
		.dw		p78loc_4883
		.dw		p78loc_4932
		.dw		p78loc_48B9
		.dw		p78loc_48C6
		.dw		p78loc_4D1E
		.dw		p78loc_4D71
		.dw		p78loc_4DD6
		.dw		p78loc_4DDF
		.dw		p78loc_4922
		.dw		p78loc_492A
		.dw		p78loc_4901
		.dw		p78loc_4905
		.dw		p78loc_4909
		.dw		p78loc_48F5
		.dw		p78loc_48F9
		.dw		p78loc_48FD
		.dw		p78loc_4993
		.dw		p78loc_4926
		.dw		p78loc_492E
		.dw		p78loc_4936
		.dw		p78loc_49C3
		.dw		p78loc_49A9
p78loc_480A:
		call	SetGraphDraw
		set		smarter_test, (iy+smartFlags)

; =============== S U B	R O U T	I N E =======================================


p78sub_4811:



		bit		plotDisp, (iy+plotFlags)
		ret		z
		bit		graphDraw, (iy+graphFlags)
		ret		z
		jr		p78loc_485F
p78loc_481D:
		and		7Fh ; ''
		cp		6
		jp		nc, JErrorNo
		jp		Page0Call_250D
p78loc_4827:
		ld		hl, p78loc_481D
		call	pushErrorHandleR
		ld		a, 89h ; '�'
		jr		p78loc_483D
p78loc_4831:
		ld		a, 65h ; 'e'
		jr		p78loc_4885
p78loc_4835:
		ld		hl, p78loc_481D
		call	pushErrorHandleR
		ld		a, 8Ah ; '�'

p78loc_483D:
		ld		hl, YFact
		ld		de, XFact
		call	Page0Call_35EB
		call	popErrorHandleR
		jr		p78loc_485C
p78loc_484B:
		ld		a, 1
		call	Page0Call_3537
		ld		a, 8Ch ; '�'
		jr		p78loc_4885
p78loc_4854:
		call	j_COPYRNG
		ld		a, 86h ; '�'
		call	Page0Call_3537

p78loc_485C:
		call	SetTblGraphDraw

p78loc_485F:
		call	j_Regraph
		call	j_GRLABELS
		jp		p78loc_4FEF

p78loc_4868:
		ld		a, 8Fh ; '�'
		call	Page0Call_35EB
		jr		p78loc_485C
p78loc_486F:
		ld		a, 87h ; '�'
		jr		p78loc_4885
p78loc_4873:
		ld		a, 8Bh ; '�'
		jr		p78loc_4885
p78loc_4877:
		ld		a, 8Dh ; '�'
		jr		p78loc_4885
p78loc_487B:
		ld		a, 8Eh ; '�'
		jr		p78loc_4885
p78loc_487F:
		ld		a, 90h ; '�'
		jr		p78loc_4885
p78loc_4883:
		ld		a, 92h ; '�'
; START	OF FUNCTION CHUNK FOR p78sub_4811

p78loc_4885:
		call	Page0Call_3537
		jr		p78loc_485C
; END OF FUNCTION CHUNK	FOR p78sub_4811
p78loc_488A:
		call	CKENDLIN
		ld		b, 17h
		jr		nz, p78loc_490D
		ld		b, 1

SetAllPlots:
		ld		hl, 92D9h
		call	p78sub_489C
		call	p78sub_489C

; =============== S U B	R O U T	I N E =======================================


p78sub_489C:
		ld		a, (hl)
		ld		c, a
		and		1
		xor		b
		call	nz, SetTblGraphDraw
		ld		a, c
		and		0F0h ; '�'
		or		b
		ld		(hl), a
		ld		de, 11h
		add		hl, de
		ret
; End of function p78sub_489C

p78loc_48AE:
		call	CKENDLIN
		ld		b, 18h
		jr		nz, p78loc_490D
		ld		b, 0
		jr		SetAllPlots
p78loc_48B9:
		call	CKENDLIN
		ld		b, 2
		jr		nz, p78loc_490D
		ld		a, 3
		call	j_AllEq
		ret
p78loc_48C6:
		call	CKENDLIN
		ld		b, 3
		jr		nz, p78loc_490D
		ld		a, 4
		call	j_AllEq
		ret
p78loc_48D3:
		call	INCFETCH
		dec		bc
		push	bc
		call	PARSAHEAD
		jr		c, p78loc_48ED
		ld		(nextParseByte), bc
		call	INCFETCH
		cp		62h ; 'b'

p78loc_48E6:
		jp		z, Page0Call_24E1
		cp		72h ; 'r'
		jr		z, p78loc_48E6

p78loc_48ED:
		pop		hl
		ld		(nextParseByte), hl
		ld		b, 0Bh
		jr		p78loc_4913
p78loc_48F5:
		ld		b, 12h
		jr		p78loc_4913
p78loc_48F9:
		ld		b, 11h
		jr		p78loc_4913
p78loc_48FD:
		ld		b, 13h
		jr		p78loc_4913
p78loc_4901:
		ld		b, 6
		jr		p78loc_4913
p78loc_4905:
		ld		b, 5
		jr		p78loc_4913
p78loc_4909:
		ld		b, 7
		jr		p78loc_4913
; ---------------------------------------------------------------------------

p78loc_490D:
		ld		c, 1
		call	PUSH2BOPER
		ret
; ---------------------------------------------------------------------------

p78loc_4913:

		ld		c, 1
		call	PUSH2BOPER
		ld		a, 10h
		call	PUSHOPER
		ret
p78loc_491E:
		ld		b, 1Ah
		jr		p78loc_4913
p78loc_4922:
		ld		b, 8
		jr		p78loc_4913
p78loc_4926:
		ld		b, 0Ah
		jr		p78loc_4913
p78loc_492A:
		ld		b, 9
		jr		p78loc_490D
p78loc_492E:
		ld		b, 16h
		jr		p78loc_490D
p78loc_4932:
		ld		b, 19h
		jr		p78loc_4913
p78loc_4936:
		ld		b, 10h

; =============== S U B	R O U T	I N E =======================================


p78sub_4938:
		ld		c, 1
		call	PUSH2BOPER
		ld		a, 10h
		call	PUSHOPER
		call	STEQARG

p78loc_4945:
		set		numOP1, (iy+ParsFlag2)
		ret
; End of function p78sub_4938

p78loc_494A:
		ld		b, 26h ; '&'
		jr		p78loc_4913
p78loc_494E:
		ld		b, 25h ; '%'
		jr		p78loc_4913
p78loc_4952:
		ld		b, 29h ; ')'
		jr		p78loc_4913
p78loc_4956:
		ld		b, 2Ah ; '*'
		jr		p78loc_4913
p78loc_495A:
		ld		b, 2Bh ; '+'
		jr		p78loc_4913
p78loc_495E:
		ld		b, 30h ; '0'
		jr		p78loc_497A
p78loc_4962:
		ld		b, 2Fh ; '/'
		jr		p78loc_497A
p78loc_4966:
		ld		b, 28h ; '('
		jr		p78loc_490D
p78loc_496A:
		ld		a, e
		add		a, 0ECh	; '�'
		ld		b, a
		jr		p78loc_4913
p78loc_4970:
		ld		b, 24h ; '$'
		jr		p78loc_4913
p78loc_4974:
		ld		b, 2Eh ; '.'
		jr		p78loc_497A
p78loc_4978:
		ld		b, 2Dh ; '-'

p78loc_497A:
		push	bc
		call	CKENDLIN
		pop		bc
		jp		nz, p78loc_490D
		ld		e, b
		xor		0
		jp		p78loc_4EBD
; ---------------------------------------------------------------------------
		jr		p78loc_4913
p78loc_498A:
		ld		b, 22h ; '"'
		jr		p78loc_4913
p78loc_498E:
		ld		b, 23h ; '#'
		jp		p78loc_490D
p78loc_4993:
		ld		b, 1
		call	p78sub_4938
		ld		hl, (nextParseByte)
		inc		hl
		ld		(nextParseByte), hl
		ld		d, 2Bh ; '+'
		call	PUSHNUM
		call	STEQARG2
		jr		p78loc_4945
p78loc_49A9:
		call	FINDEOL
		jp		z, ErrSyntax
		call	STTMPEQ
		rst		18h
		ld		a, 0A9h	; '�'
		call	Page0Call_32BB

; =============== S U B	R O U T	I N E =======================================


p78sub_49B8:
		res		numOP1, (iy+ParsFlag2)
		call	PopRealO1
		call	markTableDirty
		ret
; End of function p78sub_49B8

p78loc_49C3:
		call	FINDEOL
		jp		z, ErrSyntax
		call	STTMPEQ
		rst		18h
		ld		a, 0A8h	; '�'
		call	Page0Call_32BB
		jr		p78sub_49B8
p78loc_49D4:
		call	p78sub_49F6
		rst		18h
		call	COMMAERRF
		call	p78sub_49F6
		rst		18h
		call	p78sub_4213
		xor		a
		push	af

p78loc_49E4:
		pop		af
		call	Page0Call_35B5
		jp		z, ErrInvalid
		push	af
		ld		a, b
		cp		2
		jr		nc, p78loc_49E4
		pop		af
		ld		a, 69h ; 'i'
		jr		p78loc_4A11

; =============== S U B	R O U T	I N E =======================================


p78sub_49F6:
		call	CKENDLIN

p78loc_49F9:
		call	Page78_2D93
		jr		c, p78loc_4A03
		ld		a, 0EBh	; '�'
		jp		FETCHVARA
; ---------------------------------------------------------------------------

p78loc_4A03:
		cp		5Dh ; ']'
		jr		z, p78loc_4A09
		cp		0EBh ; '�'

p78loc_4A09:
		jp		z, CKFETCHVAR
		jp		ErrSyntax
; End of function p78sub_49F6

p78loc_4A0F:
		ld		a, 5Ah ; 'Z'

p78loc_4A11:
		push	af
		bit		graphDraw, (iy+graphFlags)
		call	z, j_GrBufCpy
		set		appCurGraphic, (iy+appFlags)
		pop		af
		call	j_GRDECODA
		res		appCurGraphic, (iy+appFlags)
		bit		allowCursor, (iy+plotFlags)
		jp		z, p78loc_4FEF
		ld		a, (curGStyle)
		sub		51h ; 'Q'
		jr		z, p78loc_4A35
		ld		a, 1

p78loc_4A35:
		push	af

p78loc_4A36:
		set		appCurGraphic, (iy+appFlags)
		bit		allowProgTokens, (iy+newDispF)
		jr		z, p78loc_4A45
		ld		a, 0AAh	; '�'
		ld		(indicBusy), a

p78loc_4A45:

		call	j_CursorOn
		res		displayCoords, (iy+newDispF)
		call	j_getkey
		call	j_CursorOff
		call	IsOnInterruptSet
		jr		nz, p78loc_4A62
		cp		5
		jr		z, p78loc_4A62
		cp		5
		call	c, j_GRDECODA

p78loc_4A60:
		jr		p78loc_4A45
; ---------------------------------------------------------------------------

p78loc_4A62:
		pop		af
		bit		0, a
		jp		z, p78loc_4B52
		call	IsOnInterruptSet
		jp		nz, p78loc_4B52
		bit		1, a
		push	af
		ld		a, 5
		call	j_GRDECODA
		pop		af
		jr		nz, p78loc_4A7E
		set		1, a
		push	af
		jr		p78loc_4A60
; ---------------------------------------------------------------------------

p78loc_4A7E:
		ld		a, (curGStyle)
		cp		81h ; '�'
		jp		nz, p78loc_4B52
		call	j_TraceOff
		ld		hl, p78loc_4B4D
		call	pushErrorHandleR
		ld		hl, 8D8Fh
		rst		20h
		rst		18h
		rst		8
		call	RclX
		rst		18h
		call	cpop1op2
		jp		c, Page0Call_2505
		ld		hl, 0
		call	CreateTempRList
		ld		(iMathPtr1), de
		ld		(tSymPtr1), hl
		call	PushRealO4
		ld		hl, 0
		call	CreateTempRList
		ld		(iMathPtr2), de
		ld		(tSymPtr2), hl
		call	PushRealO4
		ld		hl, (XOutDat)
		call	ldHLind
		ex		de, hl
		ld		hl, 0

p78loc_4AC9:
		inc		hl
		push	de
		push	hl
		ld		de, (XOutDat)
		call	j_GetLToOP1
		call	CpyTo2FPS3
		call	cpop1op2
		jr		c, p78loc_4B06
		call	CpyTo2FPS2
		call	cpop1op2
		jr		c, p78loc_4AE5
		jr		nz, p78loc_4B06

p78loc_4AE5:
		ld		de, (iMathPtr1)
		ld		a, 1
		call	j_IncLstSize
		call	j_PutToL
		pop		hl
		push	hl
		ld		de, (YOutDat)
		call	j_GetLToOP1
		ld		de, (iMathPtr2)
		ld		a, 1
		call	j_IncLstSize
		call	j_PutToL

p78loc_4B06:
		pop		hl
		pop		de
		call	CpHLDE
		jr		nz, p78loc_4AC9
		call	CpyTo1FPS4
		call	StoOther
		call	CpyTo1FPS4
		call	StoOther
		call	CpyTo1FPS3
		ld		a, (curPlotNumber)
		ld		de, 92CAh
		dec		a
		jr		z, p78loc_4B2E
		ld		de, 92DBh
		dec		a
		jr		z, p78loc_4B2E
		ld		de, 92ECh

p78loc_4B2E:
		call	popErrorHandleR
		ld		hl, OP1M
		push	hl
		call	page0_118B
		push	de
		call	CpyTo1FPS2
		pop		de
		pop		hl
		call	page0_118B
		call	SetTblGraphDraw
		ld		bc, 24h	; '$'
		call	FPOPFPS
		jp		p78loc_47BC
p78loc_4B4D:
		and		7Fh ; ''
		jp		JError
; ---------------------------------------------------------------------------

p78loc_4B52:
		res		appCurGraphic, (iy+appFlags)
		sub		a
		ld		(kbdGetKy), a
		ld		a, 0F0h	; '�'
		ld		(indicBusy), a
		call	j_TraceOff

p78loc_4B62:
		jp		p78loc_4FEF
p78loc_4B65:
		call	p78sub_6D98
		ld		hl, (curRow)
		push	hl
		ld		hl, p78loc_4BD3
		call	pushErrorHandleR
		call	SAVEPARSE
		call	j_DspCurTbl
		ei
		call	popErrorHandleR
		ld		a, 0AAh	; '�'
		ld		(indicBusy), a

p78loc_4B81:
		pop		hl
		ld		(curRow), hl
		push	hl
		call	j_getkey
		call	IsOnInterruptSet
		jr		nz, p78loc_4BA5
		cp		5
		jr		z, p78loc_4BA5
		cp		5
		jr		nc, p78loc_4B81
		ld		hl, p78loc_4BD3
		call	pushErrorHandleR
		call	Page0Call_31AD
		call	popErrorHandleR
		ei
		jr		p78loc_4B81
; ---------------------------------------------------------------------------

p78loc_4BA5:
		res		6, (iy+15h)
		res		2, (iy+1Fh)
		call	j_settblrefs
		call	p78sub_7D37
		call	PopRealO1
		call	GETPARSE
		pop		hl
		ld		(curRow), hl
		sub		a
		ld		(kbdGetKy), a
		ld		a, 0F0h	; '�'
		ld		(indicBusy), a
		call	j_RETSCREEN
		set		NEED_BUFCPY, (iy+VERTFLAG2)
		set		NEED_RETABLE, (iy+VERTFLAG2)
		jr		p78loc_4B62
p78loc_4BD3:
		call	p78sub_7D37
		pop		hl
		ld		(curRow), hl
		res		6, (iy+15h)
		res		2, (iy+1Fh)
		call	j_settblrefs
		jp		JErrorNo
p78loc_4BE8:
		call	INCFETCH
		cp		10h
		push	af
		jr		nz, p78loc_4BF3

p78loc_4BF0:
		call	INCFETCH

p78loc_4BF3:
		call	FETCHVARA
		call	ISO1NONTEMPLST
		jr		nz, p78loc_4C20
		rst		10h
		jr		c, p78loc_4C0E
		call	Page0Call_2420
		call	page0_17E6
		rst		10h
		call	DelVar
		ld		hl, 0
		call	CreateRList

p78loc_4C0E:
		call	CKENDLIN
		jr		z, p78loc_4C29
		call	INCFETCH
		or		a
		jr		z, p78loc_4C29
		cp		2Bh ; '+'
		jr		z, p78loc_4BF0
		ld		b, a
		pop		af
		ld		a, b

p78loc_4C20:
		jp		nz, ErrSyntax
		cp		11h
		jr		nz, p78loc_4C20
		jr		p78loc_4C2A
; ---------------------------------------------------------------------------

p78loc_4C29:
		pop		af

p78loc_4C2A:
		jp		p78loc_4B62
p78loc_4C2D:
		ld		de, 92DAh
		jr		p78loc_4C3A
p78loc_4C32:
		ld		de, 92EBh
		jr		p78loc_4C3A
p78loc_4C37:
		ld		de, 92C9h

p78loc_4C3A:
		push	de
		call	INCFETCH
		ld		b, 0
		cp		0FEh ; '�'
		jr		nz, p78loc_4C7F

p78loc_4C44:
		call	p78sub_538F
		call	p78sub_53C8
		ld		hl, OP1M
		call	page0_118B
		call	p78sub_53C8
		ld		hl, OP1M
		call	page0_118B

p78loc_4C59:
		call	p78sub_53B4

p78loc_4C5C:
		call	INCFETCH

p78loc_4C5F:
		ld		b, 0
		cp		7Fh ; ''
		jr		z, p78loc_4C6A
		inc		b
		cp		80h ; '�'
		jr		nz, p78loc_4C77

p78loc_4C6A:
		pop		de
		ld		a, b
		call	ShLAcc
		ex		de, hl
		or		(hl)
		ld		(hl), a
		call	p78sub_4213
		jr		p78loc_4C2A
; ---------------------------------------------------------------------------

p78loc_4C77:
		inc		b
		cp		81h ; '�'
		jr		z, p78loc_4C6A
		jp		p78loc_4D1B
; ---------------------------------------------------------------------------

p78loc_4C7F:
		inc		b
		cp		0FDh ; '�'
		jr		z, p78loc_4C44
		inc		b
		cp		0BBh ; '�'
		jr		nz, p78loc_4CBB
		call	INCFETCH
		ld		b, 2
		cp		5Ah ; 'Z'
		jr		z, p78loc_4CC5
		ld		b, 5
		cp		5Bh ; '['
		jp		nz, ErrSyntax
		call	p78sub_538F
		call	p78sub_53C8
		ld		hl, OP1M
		call	page0_118B
		call	p78sub_53B4
		call	INCFETCH
		cp		58h ; 'X'
		jr		z, p78loc_4C59
		cp		59h ; 'Y'
		jr		nz, p78loc_4C5F
		ld		hl, 0Ah
		add		hl, de
		set		4, (hl)
		jr		p78loc_4C59
; ---------------------------------------------------------------------------

p78loc_4CBB:
		inc		b
		cp		0FCh ; '�'
		jr		z, p78loc_4CC5
		inc		b
		cp		5
		jr		nz, p78loc_4D16

p78loc_4CC5:
		ld		a, b
		ld		(OP2), a
		call	p78sub_538F
		call	p78sub_53C8
		ld		hl, OP1M
		call	page0_118B
		call	p78sub_53B4
		call	CKENDLIN
		cp		82h ; '�'
		jr		nc, p78loc_4CEE
		cp		7Fh ; ''
		jr		c, p78loc_4CEE
		ld		b, a
		ld		a, (OP2)
		cp		2
		jp		z, p78loc_4C5C
		jr		p78loc_4D1B
; ---------------------------------------------------------------------------

p78loc_4CEE:
		ld		hl, 5
		add		hl, de
		cp		31h ; '1'
		jr		nz, p78loc_4CFC
		ld		(nextParseByte), bc
		jr		p78loc_4D07
; ---------------------------------------------------------------------------

p78loc_4CFC:
		push	hl
		call	p78loc_49F9
		pop		de
		ld		hl, OP1M
		call	page0_118B

p78loc_4D07:
		ld		a, (OP2)
		cp		2
		jp		z, p78loc_4C59
		pop		de
		call	p78sub_4213
		jp		p78loc_4C2A
; ---------------------------------------------------------------------------

p78loc_4D16:
		inc		b
		cp		0FCh ; '�'
		jr		z, p78loc_4CC5

p78loc_4D1B:
		jp		ErrSyntax
p78loc_4D1E:
		call	p78sub_4DEA
		cp		60h ; '`'
		jr		nz, p78loc_4D1B
		rst		18h
		call	j_PDspGrph
		call	j_TraceOff
		call	PopRealO1
		call	IsOnInterruptSet
		jp		nz, p78loc_4C2A
		call	p78sub_4E14
		call	CkOP1Real
		cp		1Fh
		jr		nz, p78loc_4D4B
		call	CreatePict
		ld		(chkDelPtr1), de
		ld		(chkDelPtr3), hl
		jr		p78loc_4D5E
; ---------------------------------------------------------------------------

p78loc_4D4B:
		ld		a, 7
		ld		(OP1), a
		ld		de, 2F6h
		ld		hl, (chkDelPtr3)
		bit		6, (hl)
		call	nz, SetTblGraphDraw
		call	CHKDELA

p78loc_4D5E:
		ld		hl, (chkDelPtr1)
		ld		bc, 2F4h
		ld		(hl), c
		inc		hl
		ld		(hl), b
		inc		hl
		ex		de, hl
		ld		hl, plotSScreen
		ldir
		jp		p78loc_4FEF
p78loc_4D71:
		call	p78sub_4DEA
		cp		60h ; '`'
		jp		nz, ErrDataType
		call	CkOP1Real
		cp		1Fh
		jp		z, ErrUndefined
		rst		18h
		bit		graphDraw, (iy+graphFlags)
		call	nz, j_Regraph
		call	PopRealO1
		call	IsOnInterruptSet
		ret		nz
		call	p78sub_4E14
		ld		hl, (chkDelPtr1)
		inc		hl
		inc		hl
		ld		bc, 3F0Ch
		call	Bit_VertSplit
		jr		z, p78loc_4DA3
		ld		bc, 3405h

p78loc_4DA3:
		ld		a, c
		ex		de, hl
		ld		hl, plotSScreen
		push	af

p78loc_4DA9:
		ld		a, (de)
		or		(hl)
		ld		(hl), a
		inc		de
		inc		hl
		dec		c
		jr		nz, p78loc_4DA9
		pop		af
		push	af
		ld		c, a
		cp		5
		jr		nz, p78loc_4DC6
		ld		a, (de)
		and		0FEh ; '�'
		or		(hl)
		ld		(hl), a
		push	bc
		ld		bc, 7
		add		hl, bc
		ex		de, hl
		add		hl, bc
		ex		de, hl
		pop		bc

p78loc_4DC6:
		dec		b
		jr		nz, p78loc_4DA9
		pop		af
		call	j_GrBufCpy
		call	j_GRLABELS
		call	j_TraceOff
		jp		p78loc_4FEF
p78loc_4DD6:
		ld		d, 61h ; 'a'
		call	p78loc_4DEC
		ld		a, 9Ah ; '�'
		jr		p78loc_4DE6
p78loc_4DDF:
		ld		d, 61h ; 'a'
		call	p78loc_4DEC
		ld		a, 9Bh ; '�'

p78loc_4DE6:
		call	Page0Call_35EB
		ret

; =============== S U B	R O U T	I N E =======================================


p78sub_4DEA:
		ld		d, 60h ; '`'

p78loc_4DEC:
		call	INCFETCH
		cp		30h ; '0'
		jr		c, p78loc_4E0E
		cp		3Ah ; ':'
		jr		nc, p78loc_4E0E
		sub		31h ; '1'
		jr		nc, p78loc_4DFD
		ld		a, 9

p78loc_4DFD:
		push	af
		call	ZeroOP1
		ld		a, d
		ld		(OP1+1), a
		pop		af
		ld		(OP1M), a
		call	CKENDLINERR
		jr		p78sub_4E14
; ---------------------------------------------------------------------------

p78loc_4E0E:
		call	FETCHVARA
		jp		nz, ErrSyntax
; End of function p78sub_4DEA


; =============== S U B	R O U T	I N E =======================================


p78sub_4E14:
		ld		a, 0FFh
		ld		(OP1), a
		call	Page0Call_241E
		ld		(chkDelPtr3), hl
		ld		(chkDelPtr1), de
		call	OP1ToOP4
		ld		a, (OP1+1)
		ret
; End of function p78sub_4E14

p78loc_4E2A:
		.dw		p78loc_4FDF
		.dw		p78loc_4F0F
		.dw		p78loc_4F9F
		.dw		p78loc_4FA2
		.dw		p78loc_4FB8
		.dw		p78loc_4FC2
		.dw		p78loc_4FC2
		.dw		p78loc_4FC2
		.dw		p78loc_5163
		.dw		p78loc_51AF
		.dw		p78loc_5188
		.dw		p78loc_4FB4
		.dw		p78loc_4FAA
		.dw		p78loc_4FAF
		.dw		p78loc_4F93
		.dw		p78loc_51CE
		.dw		p78loc_4EDB
		.dw		p78loc_4FCA
		.dw		p78loc_4FCA
		.dw		p78loc_4FCA
		.dw		p78loc_5151
		.dw		0
		.dw		p78loc_51C0
		.dw		p78loc_4F97
		.dw		p78loc_4F9A
		.dw		p78loc_5010
		.dw		p78loc_50DC
		.dw		p78loc_4F5B
		.dw		p78loc_4E8C
		.dw		p78loc_4EB0
		.dw		p78loc_4EB0
		.dw		p78loc_4EB9
		.dw		0
		.dw		0
		.dw		p78loc_4EBD
		.dw		p78loc_4EBD
		.dw		p78loc_4EBD
		.dw		p78loc_4EBD
		.dw		p78loc_4EBD
		.dw		0
		.dw		p78loc_4EBD
		.dw		p78loc_4EBD
		.dw		p78loc_4EBD
		.dw		p78loc_4EBD
		.dw		0
		.dw		p78loc_4EBD
		.dw		p78loc_4EBD
		.dw		p78loc_4EBD
		.dw		p78loc_4EBD
p78loc_4E8C:
		ld		d, 4
		push	de
		cp		d
		jr		z, p78loc_4EA4
		jr		nc, p78loc_4EB6
		cp		2
		jr		c, p78loc_4EB6
		cp		3
		jr		z, p78loc_4EA0
		rst		18h
		call	OP1Set0

p78loc_4EA0:
		rst		18h
		call	OP1Set1

p78loc_4EA4:
		rst		18h
		pop		bc
		push	bc
		call	ErrNonReal
		pop		de
		ld		a, e
		call	j_STATSHADE
		ret
p78loc_4EB0:
		ld		d, 3

p78loc_4EB2:
		push	de
		cp		d
		jr		z, p78loc_4EA4

p78loc_4EB6:
		jp		ErrArgument
p78loc_4EB9:
		ld		d, 4
		jr		p78loc_4EB2
; ---------------------------------------------------------------------------

p78loc_4EBD:
		ld		(OP3), de
		ld		hl, p78loc_4ED4
		call	pushErrorHandleR
		ld		de, (OP3)
		call	j_ExTest_INT
		call	popErrorHandleR
		jp		p78loc_4FEF
p78loc_4ED4:
		res		statsValid, (iy+statFlags)
		jp		JErrorNo
p78loc_4EDB:
		cp		2
		jp		nz, ErrArgument
		call	CkOP1Real
		jp		nz, ErrDataType
		call	CpyTo2FPST
		call	CpyO1ToFPST
		call	PushRealO2
		ld		a, 0A9h	; '�'
		call	Page0Call_32BB
		call	CpyTo1FPS1
		ld		de, (inputDat)
		call	MovFrOP1
		call	CpyTo1FPST
		call	p78sub_5370
		jp		nz, ErrDataType
		ld		a, 0A7h	; '�'
		call	Page0Call_32BB
		jp		FPOPREAL
p78loc_4F0F:
		push	af
		call	PushOP1
		pop		af
		cp		7
		jp		nc, ErrArgument
		cp		5
		jr		c, p78loc_4F21
		jr		nz, p78loc_4F3B
		jr		p78loc_4F37
; ---------------------------------------------------------------------------

p78loc_4F21:
		cp		3
		jr		z, p78loc_4F2D
		jr		nc, p78loc_4F33
		ld		hl, Xmin
		call	PushReal

p78loc_4F2D:
		ld		hl, Xmax
		call	PushReal

p78loc_4F33:
		call	OP1Set1
		rst		18h

p78loc_4F37:
		call	OP1Set1
		rst		18h

p78loc_4F3B:
		ld		b, 4
		call	ErrNonReal
		ld		a, 0A4h	; '�'
		call	Page0Call_32BB
		call	FPOPCPLX
		call	p78sub_49B8
		jp		p78sub_49B8
p78loc_4F4E:
		res		2, (iy+1Ah)
		call	j_OneVar
		jr		p78loc_4F78
p78loc_4F57:
		ld		b, 1Ch
		jr		p78loc_4F71
p78loc_4F5B:
		ld		b, 1Ah
		jr		p78loc_4F71
p78loc_4F5F:
		ld		b, 9
		jr		p78loc_4F71
p78loc_4F63:
		ld		b, 4
		jr		p78loc_4F71
p78loc_4F67:
		ld		b, 8
		jr		p78loc_4F71
p78loc_4F6B:
		ld		b, 19h
		jr		p78loc_4F71
p78loc_4F6F:
		ld		b, 0

p78loc_4F71:
		call	j_TwoVarSet
		res		2, (iy+1Ah)

p78loc_4F78:
		jp		p78loc_4FEF
p78loc_4F7B:
		ld		b, 1
		jr		p78loc_4F71
p78loc_4F7F:
		ld		b, 2
		jr		p78loc_4F71
p78loc_4F83:
		ld		b, 3
		jr		p78loc_4F71
p78loc_4F87:
		ld		b, 5
		jr		p78loc_4F71
p78loc_4F8B:
		ld		b, 6
		jr		p78loc_4F71
p78loc_4F8F:
		ld		b, 7
		jr		p78loc_4F71
p78loc_4F93:
		pop		hl
		jp		p78loc_5789
p78loc_4F97:
		scf
		jr		p78loc_4F9B
p78loc_4F9A:
		or		a

p78loc_4F9B:
		ld		b, 1
		jr		p78loc_4FA5
p78loc_4F9F:
		scf
		jr		p78loc_4FA3
p78loc_4FA2:
		or		a

p78loc_4FA3:
		ld		b, 0

p78loc_4FA5:
		call	j_YONOFF
		jr		p78loc_4FEF
p78loc_4FAA:
		call	Page0Call_3B25
		jr		p78loc_4FEF
p78loc_4FAF:
		call	Page0Call_3B1F
		jr		p78loc_4FEF
p78loc_4FB4:
		ld		a, 93h ; '�'
		jr		p78loc_4FBA
p78loc_4FB8:
		ld		a, 22h ; '"'

p78loc_4FBA:
		ld		hl, (numArguments)
		call	p78sub_6984
		jr		p78loc_4FEF
p78loc_4FC2:
		ld		b, a
		ld		a, 9Eh ; '�'
		call	Page0Call_32BB
		jr		p78loc_4FEF
p78loc_4FCA:
		cp		2
		jp		nz, ErrArgument
		ld		a, 0EFh	; '�'
		add		a, e
		push	af
		rst		18h
		call	ErrNonReal_FPST_FPS1
		pop		bc
		ld		a, 0A1h	; '�'
		call	Page0Call_32BB
		jr		p78loc_4FEF
p78loc_4FDF:
		cp		1
		jp		nz, ErrArgument
		call	p78sub_4FF4
		cp		0Ah
		jp		nc, ErrDomain
		ld		(fmtDigits), a
; START	OF FUNCTION CHUNK FOR p78sub_52FE

p78loc_4FEF:

		res		numOP1, (iy+ParsFlag2)
		ret
; END OF FUNCTION CHUNK	FOR p78sub_52FE

; =============== S U B	R O U T	I N E =======================================


p78sub_4FF4:
		call	CkOP1Real
		jp		nz, ErrDataType
		call	page0_FB5
		call	CkOP1FP0
		ret		z
		ld		a, (OP1+1)
		cp		82h ; '�'
		jp		nc, ErrDomain
		call	ErrD_OP1NotPosInt
		call	ConvOP1
		ret
; End of function p78sub_4FF4

p78loc_5010:
		res		4, (iy+24h)
		cp		3
		jp		c, ErrArgument
		push	af
		rst		18h
		pop		af
		ld		l, a
		ld		h, 0
		call	HLTimes9
		push	hl
		call	p78sub_50CF
		call	CkOP1Pos
		jr		z, p78loc_5032
		set		4, (iy+24h)
		call	p78sub_50CF

p78loc_5032:
		push	hl
		call	p78sub_4FF4
		ld		c, a
		pop		hl
		push	bc
		call	p78sub_50CF
		pop		bc
		push	hl
		push	bc
		call	p78sub_4FF4
		pop		bc
		ld		b, a
		ld		a, (lcdTallP)
		dec		a
		sub		c
		jp		c, ErrDomain
		ld		c, a
		push	bc
		call	j_PDspGrph
		pop		bc
		xor		a
		call	Page0Call_3537
		jp		nc, ErrDomain
		ld		(curGY), bc

p78loc_505D:
		pop		hl
		ld		a, h
		or		l
		jr		z, p78loc_50A8
		call	p78sub_50CF
		push	hl
		call	CkOP1Real
		cp		4
		jr		z, p78loc_5081
		or		a
		jp		nz, p78loc_5153
		ld		a, 9
		call	j_FormEReal
		call	j_FORMTOTOK
		ld		hl, 848Dh
		ld		bc, 100h
		jr		p78loc_508F
; ---------------------------------------------------------------------------

p78loc_5081:
		call	Page0Call_241E
		call	page0_1641
		jr		nz, p78loc_508B
		set		7, (hl)

p78loc_508B:
		ex		de, hl
		ld		c, (hl)
		inc		hl
		ld		b, (hl)

p78loc_508F:
		call	WRITE_TEXT
		ei
		jr		z, p78loc_505D

p78loc_5095:
		pop		hl
		ld		a, h
		or		l
		jr		z, p78loc_50A8
		call	p78sub_50CF
		push	hl
		call	page0_1641
		jr		nz, p78loc_5095
		rst		10h
		set		7, (hl)
		jr		p78loc_5095
; ---------------------------------------------------------------------------

p78loc_50A8:
		pop		de
		call	DeallocFPS1
		res		4, (iy+24h)

p78loc_50B0:
		jp		p78loc_4FEF

; =============== S U B	R O U T	I N E =======================================


WRITE_TEXT:
		; WRITE_TEXT+17j
		ld		a, b
		or		c
		ret		z
		dec		bc
		inc		hl
		call	j_BUFPEEK3
		jr		nc, p78loc_50BE
		dec		bc

p78loc_50BE:
		ld		a, d
		or		e
		ret		z
		push	hl
		push	bc
		ld		a, 93h ; '�'
		call	Page0Call_3537
		pop		bc
		pop		hl
		jr		c, WRITE_TEXT
		or		1
		ret
; End of function WRITE_TEXT


; =============== S U B	R O U T	I N E =======================================


p78sub_50CF:
		ex		de, hl
		ld		hl, (FPS)
		or		a
		sbc		hl, de
		push	de
		rst		20h
		pop		hl
		jp		HLMINUS9
; End of function p78sub_50CF

p78loc_50DC:
		cp		2
		jp		nz, p78loc_519F
		rst		18h
		call	CpyTo1FPS1
		call	p78sub_4FF4
		cp		0Ah
		jr		nc, p78loc_5121
		or		a
		jr		nz, p78loc_50F1
		ld		a, 0Ah

p78loc_50F1:
		push	af
		call	PopRealO1
		call	p78sub_4FF4
		or		a
		jr		z, p78loc_5121
		cp		8
		jr		nc, p78loc_5121
		dec		a
		pop		bc
		push	af
		call	IsFuncMode
		jr		z, p78loc_5124
		ld		hl, 9775h
		ld		a, 0Ah

p78loc_510C:
		cp		b
		jr		c, p78loc_5121
		ld		e, b
		ld		d, 0
		add		hl, de
		pop		af
		ld		(hl), a
		call	SetGraphDraw
		set		smarter_test, (iy+smartFlags)
		call	FPOPREAL
		jr		p78loc_5160
; ---------------------------------------------------------------------------

p78loc_5121:
		jp		ErrDomain
; ---------------------------------------------------------------------------

p78loc_5124:
		call	IsRecursiveMode
		jr		z, p78loc_5139
		ld		hl, polar6LineType
		cp		2
		jr		c, p78loc_5135
		cp		6
		jp		c, ErrInvalid

p78loc_5135:
		ld		a, 3
		jr		p78loc_510C
; ---------------------------------------------------------------------------

p78loc_5139:
		cp		2
		jr		c, p78loc_5142
		cp		4
		jp		c, ErrInvalid

p78loc_5142:
		ld		a, 6
		ld		hl, para6LineType
		call	IsFunctionMode
		jr		nz, p78loc_510C
		ld		hl, y0LineType
		jr		p78loc_510C
p78loc_5151:
		cp		1

p78loc_5153:
		jr		nz, p78loc_519F
		set		ignoreBPLink, (iy+hookflags1)
		call	j_SendVarCmd
		res		ignoreBPLink, (iy+hookflags1)

p78loc_5160:
		jp		p78loc_50B0
p78loc_5163:
		cp		4
		jr		z, p78loc_517D
		cp		5
		jr		nz, p78loc_519F
		rst		18h
		ld		b, 5
		call	ErrNonReal
		call	PopRealO1
		call	CkOP1FP0
		jr		nz, p78loc_5183
		ld		a, 9Ch ; '�'
		jr		p78loc_51BB
; ---------------------------------------------------------------------------

p78loc_517D:
		rst		18h
		ld		b, 4
		call	ErrNonReal

p78loc_5183:
		xor		a
		jr		p78loc_51BB
; ---------------------------------------------------------------------------
		jr		p78loc_5160
p78loc_5188:
		res		useFastCirc, (iy+plotFlag3)
		cp		4
		jr		nz, p78loc_519D
		call	CkOP1Real
		cp		0Dh
		jr		nz, p78loc_519F
		set		useFastCirc, (iy+plotFlag3)
		jr		p78loc_51A3
; ---------------------------------------------------------------------------

p78loc_519D:
		cp		3

p78loc_519F:

		jp		nz, ErrArgument
		rst		18h

p78loc_51A3:
		ld		b, 3
		call	ErrNonReal
		ld		a, 0A5h	; '�'
		call	Page0Call_35EB

p78loc_51AD:
		jr		p78loc_5160
p78loc_51AF:
		cp		1
		jr		nz, p78loc_519F
		call	CkOP1Real
		jp		nz, ErrDataType
		ld		a, 9Dh ; '�'

p78loc_51BB:
		call	Page0Call_32BB
		jr		p78loc_51AD
p78loc_51C0:
		cp		1
		jr		nz, p78loc_519F
		call	CkOP1Real
		jp		nz, ErrDataType
		ld		a, 0A6h	; '�'
		jr		p78loc_51BB
p78loc_51CE:
		cp		3
		jr		nz, p78loc_519F
		call	OP1ToOP3
		call	PopRealO1
		call	p78sub_4FF4
		push	af
		call	PopRealO1
		call	p78sub_4FF4
		pop		bc
		call	Page0Call_3819
		jr		p78loc_51AD

; =============== S U B	R O U T	I N E =======================================


p78sub_51E8:
		; p78sub_52FE:p78loc_530Dp
		call	STEQARG
		call	p78sub_5370
		and		1Fh
		cp		4
		jp		nz, ErrDataType
		call	COMMAERRF
		rst		18h
		ret
; End of function p78sub_51E8


; =============== S U B	R O U T	I N E =======================================


p78sub_51FA:
		ld		l, b
		ld		h, 0
		call	CreateTempRList
		ld		(iMathPtr3), de
		ld		(tSymPtr1), hl
		jp		PushRealO4
; End of function p78sub_51FA

p78loc_520A:
		or		1
		call	p78sub_54A9
		call	CkOP1Real
		cp		2
		jp		nz, ErrDataType
		call	CKENDLIN
		jp		z, ErrArgument
		cp		5Dh ; ']'
		jr		z, p78loc_5264
		cp		0EBh ; '�'
		jr		z, p78loc_5264
		rst		18h
		or		1
		call	p78sub_54A9
		ld		(pTempCnt), hl
		call	EOP1NotReal
		call	ConvDim
		push	af
		call	p78sub_49F6
		call	p78sub_4213
		rst		18h
		call	CpyTo1FPS1
		call	FINDSYM_GET_SIZE
		ld		(iMathPtr1), de
		pop		af
		push	af
		cp		l
		jr		c, p78loc_524E
		jp		nz, ErrDimension

p78loc_524E:
		push	hl
		ld		b, h
		call	p78sub_51FA
		call	CpyTo1FPS1
		pop		hl
		pop		af
		ld		l, a
		call	p78sub_52DF
		ld		bc, 1Bh
		call	FPOPFPS
		jr		p78loc_529A
; ---------------------------------------------------------------------------

p78loc_5264:
		call	FINDSYM_GET_SIZE
		ld		(iMathPtr1), de
		xor		a
		call	p78sub_5580
		ld		c, 1
		push	bc
		call	p78sub_51FA
		pop		hl

p78loc_5276:
		push	hl
		ld		hl, (tSymPtr1)
		res		7, (hl)
		ld		hl, (ES)
		rst		20h
		ld		(ES), hl
		pop		hl
		push	hl
		call	p78sub_52DF
		pop		hl
		inc		l
		ld		a, (curInc)
		cp		l
		jr		nc, p78loc_5276
		ld		a, (curInc)
		inc		a
		ld		l, a
		ld		h, 0
		call	DeallocFPS

p78loc_529A:
		jp		p78loc_4FEF
p78loc_529D:
		xor		a
		ld		(curInc), a

p78loc_52A1:
		or		1
		call	p78sub_54A9
		call	CkOP1Real
		cp		1
		jp		nz, ErrDataType
		ld		a, (OP1+1)
		cp		5Dh ; ']'
		call	z, Find_Parse_Formula
		call	CkOP1Real
		cp		1
		jr		nz, p78loc_52C5
		call	FINDSYM_GET_SIZE
		ld		a, h
		or		l
		jp		z, ErrDimension

p78loc_52C5:
		rst		18h
		call	CKENDLIN
		jp		z, ErrArgument
		cp		5Ch ; '\'
		jr		nz, p78loc_52A1
		call	CKFETCHVAR
		call	p78sub_4213
		ld		a, (curInc)
		inc		a
		call	Page0Call_3B4F
		jr		p78loc_529A

; =============== S U B	R O U T	I N E =======================================


p78sub_52DF:
		push	hl
		call	OP1ToOP4
		pop		bc

p78loc_52E4:
		push	bc
		call	j_GETM1TOP1A
		pop		hl
		push	hl
		ld		l, h
		ld		h, 0
		call	j_PUTTOLA1
		pop		bc
		dec		b
		jr		nz, p78loc_52E4
		call	CpyTo1FPST
		rst		18h
		call	OP4ToOP1
		jp		StoOther
; End of function p78sub_52DF


; =============== S U B	R O U T	I N E =======================================


p78sub_52FE:




		ld		hl, (pTempCnt)
		push	hl
		ld		hl, (FPS)
		ld		(unk_9311), hl
		call	p78sub_51E8
		xor		a
		push	af

p78loc_530D:
		call	p78sub_51E8
		call	INCFETCH
		call	p78sub_5DBF
		ld		(OP1+1), a
		xor		a
		ld		(OP1), a
		call	NXTFETCH
		call	Page78_2D93
		jr		nc, p78loc_532D
		cp		30h ; '0'
		jr		c, p78loc_5333
		cp		3Ah ; ':'
		jr		nc, p78loc_5333

p78loc_532D:
		call	INCFETCH
		ld		(OP1), a

p78loc_5333:
		rst		18h
		pop		af
		inc		a
		push	af
		call	CKENDLIN
		jr		z, p78loc_5347
		ld		(nextParseByte), bc
		cp		2Bh ; '+'
		jr		z, p78loc_530D
		call	p78loc_421B

p78loc_5347:
		pop		af
		cp		8
		jp		nc, ErrArgument
		ld		(OP1), a
		rst		18h
		ld		a, 13h
		call	j_LoadMenuNum
		call	IsOnInterruptSet
		jp		nz, ErrBreak
		ld		hl, (unk_9311)
		ld		(FPS), hl
		pop		de
		call	j_FixTempCnt
		sub		a
		ld		(kbdGetKy), a
		ld		hl, (OP1)
		jp		p78loc_476A
; End of function p78sub_52FE


; =============== S U B	R O U T	I N E =======================================


p78sub_5370:
		call	ParseInpGraph
		call	page0_1717
		jp		CkOP1Real
; End of function p78sub_5370


; =============== S U B	R O U T	I N E =======================================


p78sub_5379:
		call	INCFETCH
		ret		c
		call	isA2ByteTok
		jr		nz, p78loc_5387
		call	INCFETCH
		jr		p78sub_5379
; ---------------------------------------------------------------------------

p78loc_5387:
		cp		2Ah ; '*'
		ret		z
		cp		3Fh ; '?'
		ret		z
		jr		p78sub_5379
; End of function p78sub_5379


; =============== S U B	R O U T	I N E =======================================


p78sub_538F:

		ex		de, hl
		ld		(hl), b
		inc		hl
		push	hl
		ex		de, hl
		call	ZeroOP1
		ld		hl, OP1M
		call	page0_118B
		ld		hl, OP1M
		ld		(hl), 1
		call	page0_118B
		ld		hl, OP1M
		ld		(hl), 31h ; '1'
		call	page0_118B
		ex		de, hl
		ld		(hl), 1
		pop		de
		jp		SetGraphDraw
; End of function p78sub_538F


; =============== S U B	R O U T	I N E =======================================


p78sub_53B4:

		call	CKENDLIN
		jr		z, p78loc_53C3
		ld		(nextParseByte), bc
		cp		2Bh ; '+'
		ret		z
		call	p78loc_421B

p78loc_53C3:
		pop		af
		pop		de
		jp		p78loc_4FEF
; End of function p78sub_53B4


; =============== S U B	R O U T	I N E =======================================


p78sub_53C8:
		push	de
		call	ZeroOP1
		call	COMMAERRF
		call	p78sub_49F6
		pop		de
		ret
; End of function p78sub_53C8

p78loc_53D4:
		call	CKENDLINERR
		call	Bit_VertSplit
		ret		nz
		res		grfSplit, (iy+sGrFlags)
		set		vertSplit, (iy+sGrFlags)
		set		2, (iy+15h)
		set		grfSChanged, (iy+sGrFlags)
		call	j_SetYOffset
		set		NEED_BUFCPY, (iy+VERTFLAG2)
		set		NEED_RETABLE, (iy+VERTFLAG2)
		call	RESETWINTOP
		set		reTable, (iy+tblFlags)
		call	Page78_3837
		jp		SetTblGraphDraw
p78loc_5403:
		call	Page0Call_3B49
		ret
p78loc_5407:
		call	CKFETCHVAR
		call	Page0Call_241E
		ret		c
		ld		a, (OP1+1)
		cp		5Eh ; '^'
		jr		nz, p78loc_543A
		bit		5, (hl)
		call	nz, SetTblGraphDraw
		call	DelVar
		call	CkOP1Real
		call	equ_or_newequ
		ret		nz
		call	Create0Equ
		ld		a, (OP4M)
		bit		5, a
		jr		z, locret_5439
		xor		1
		ld		(OP4M), a
		call	OP4ToOP1
		rst		10h
		res		5, (hl)

locret_5439:
		ret
; ---------------------------------------------------------------------------

p78loc_543A:
		call	page0_17E9
		call	ChkFindSym
		call	DelVar
		ld		a, (OP1+1)
		cp		5Dh ; ']'
		call	z, Page0Call_321F
		ret
p78loc_544C:
		call	STEQARG
		call	p78sub_5370
		and		1Fh
		cp		4
		jp		nz, ErrDataType
		rst		18h
		call	COMMAERRF
		call	INCCURPCERREND
		cp		5Eh ; '^'
		jr		nz, p78loc_5469
		call	FETCHVAR
		jr		p78loc_54A3
; ---------------------------------------------------------------------------

p78loc_5469:
		cp		41h ; 'A'
		jr		nc, p78loc_5470

p78loc_546D:
		jp		ErrSyntax
; ---------------------------------------------------------------------------

p78loc_5470:
		cp		0AAh ; '�'
		jr		z, p78loc_5478
		cp		62h ; 'b'
		jr		nc, p78loc_546D

p78loc_5478:
		jp		ErrDataType
p78loc_547B:
		call	INCCURPCERREND
		cp		5Eh ; '^'
		jr		nz, p78loc_5469
		push	af
		call	FETCHVAR
		call	COMMAERRF
		pop		af
		call	FIND_E_UNDEF
		and		1Fh
		cp		3
		jr		z, p78loc_5498
		cp		0Bh
		jp		nz, ErrDataType

p78loc_5498:
		rst		18h
		call	INCCURPCERREND
		cp		0AAh ; '�'
		jr		nz, p78loc_5469
		call	FETCHVAR

p78loc_54A3:
		call	nz, p78sub_4217
		jp		StoOther

; =============== S U B	R O U T	I N E =======================================


p78sub_54A9:
		ld		hl, (pTempCnt)
		push	hl
		push	af
		call	STEQARG2
		call	p78sub_455D
		rst		18h
		call	p78sub_5370
		call	PopRealO3
		call	PushOP1
		call	OP3ToOP1
		rst		10h
		set		7, (hl)
		call	popOP1
		ld		a, (curInc)
		inc		a
		ld		(curInc), a
		pop		af
		pop		hl
		ret
; End of function p78sub_54A9

p78loc_54D1:
		call	CKENDLIN
		jr		nz, p78loc_54DA
		call	Page0Call_2FB5
		ret
; ---------------------------------------------------------------------------

p78loc_54DA:
		cp		10h
		push	af
		call	z, INCFETCH
		ld		l, 14h
		ld		a, 1
		call	p78sub_5580
		cp		11h
		jr		nz, p78loc_54F0
		pop		af
		jp		nz, ErrSyntax
		push	af

p78loc_54F0:
		pop		af
		ld		a, 1
		ld		(unk_970E), a
		sub		a
		ld		(unk_970F), a
		ld		(unk_9710), a
		ld		a, (curInc)
		ld		b, a
		ld		hl, (ES)
		ld		de, listName1

p78loc_5507:
		push	bc
		push	de
		call	Mov9ToOP1
		ld		hl, p78loc_5564
		call	pushErrorHandleR
		rst		10h
		jr		c, p78loc_551F
		call	IsBZero
		jr		z, p78loc_5525
		call	j_UnarchiveVar
		jr		p78loc_5525
; ---------------------------------------------------------------------------

p78loc_551F:
		ld		hl, 0
		call	CreateRList

p78loc_5525:
		call	popErrorHandleR
		ld		hl, 970Eh
		ld		a, (hl)
		dec		a
		inc		(hl)
		ld		l, a
		ld		h, 0
		call	HLTimes9
		ld		de, (ES)
		add		hl, de
		pop		de
		inc		hl
		inc		hl
		call	page0_118B
		inc		hl
		inc		hl
		pop		bc
		djnz	p78loc_5507
		ex		de, hl
		ld		a, (curInc)
		cp		14h
		jr		nz, p78loc_5551
		ld		(unk_970E), a
		jr		p78loc_555D
; ---------------------------------------------------------------------------

p78loc_5551:
		ld		(hl), 71h ; 'q'
		cp		1
		jr		nz, p78loc_555D
		ld		de, 5
		add		hl, de
		ld		(hl), 71h ; 'q'

p78loc_555D:
		ld		hl, (ES)
		ld		(FPS), hl
		ret
p78loc_5564:
		pop		hl
		pop		bc
		ld		a, (curInc)
		sub		b
		cp		2
		jr		nc, p78loc_557B
		neg
		add		a, 2
		ld		b, a

p78loc_5573:
		ld		(hl), 71h ; 'q'
		ld		de, 5
		add		hl, de
		djnz	p78loc_5573

p78loc_557B:
		ld		(hl), 71h ; 'q'
		jp		JErrorNo

; =============== S U B	R O U T	I N E =======================================


p78sub_5580:
		push	hl
		push	af
		call	SETesTOfps
		ld		hl, 0
		ld		(curInc), hl

p78loc_558B:
		call	CKENDLIN
		jp		z, ErrArgument
		call	p78sub_49F6
		ld		a, (curInc)
		pop		bc
		pop		hl
		push	hl
		push	bc
		cp		l
		jr		z, p78loc_55D5
		inc		a
		ld		(curInc), a
		bit		1, b
		jr		z, p78loc_55AB
		call	Find_Parse_Formula
		jr		p78loc_55D4
; ---------------------------------------------------------------------------

p78loc_55AB:
		bit		0, b
		jr		z, p78loc_55D4
		ld		hl, (ES)
		ld		de, 6

p78loc_55B5:
		add		hl, de
		ld		de, (FPS)
		call	CpHLDE
		jr		nc, p78loc_55D4
		push	hl
		ld		de, 847Eh
		ld		b, 5
		call	j_CmpSyms
		ld		a, c
		cp		5
		jp		z, ErrInvalid
		ld		de, 9
		pop		hl
		jr		p78loc_55B5
; ---------------------------------------------------------------------------

p78loc_55D4:
		rst		18h

p78loc_55D5:
		call	CKENDLIN
		jr		z, p78loc_55E7
		cp		2Bh ; '+'
		jr		nz, p78loc_55E4
		ld		(nextParseByte), bc
		jr		p78loc_558B
; ---------------------------------------------------------------------------

p78loc_55E4:
		call	p78sub_4213

p78loc_55E7:
		pop		bc
		pop		bc
		ret
; End of function p78sub_5580

p78loc_55EA:
		ld		l, 14h
		ld		a, 2
		call	p78sub_5580
		ld		e, 2Ch ; ','
		jp		p78loc_4EBD

; =============== S U B	R O U T	I N E =======================================


p78sub_55F6:
		call	CKFETCHVAR
		ld		a, (OP1+1)
		cp		5Ch ; '\'
		jp		nz, ErrInvalid
		ld		a, 2
		ld		(OP1), a
		rst		18h
		ld		a, (OP1M)
		ret
; End of function p78sub_55F6

p78loc_560B:
		call	p78sub_55F6
		push	af
		call	COMMAERRF
		call	p78sub_55F6
		pop		bc
		cp		b
		jp		z, ErrInvalid
		call	OP1Set0
		call	CKENDLIN
		cp		2Bh ; '+'
		jr		nz, p78loc_5631
		call	INCFETCH
		cp		a
		call	p78sub_54A9
		ld		(pTempCnt), hl
		call	EOP1NotReal

p78loc_5631:
		call	p78sub_4213
		ld		e, 27h ; '''
		jp		p78loc_4EBD
p78loc_5639:
		call	CKENDLINERR
		bit		3, (iy+18h)
		ret		z
		res		3, (iy+18h)
		jr		p78loc_5669
p78loc_5647:
		call	CKENDLINERR
		bit		3, (iy+18h)
		ret		nz
		set		3, (iy+18h)
		jr		p78loc_5669
p78loc_5655:
		call	CKENDLINERR
		bit		fmtReal, (iy+numMode)
		ret		nz
		set		fmtReal, (iy+numMode)
		res		fmtPolar, (iy+numMode)

p78loc_5665:
		res		fmtRect, (iy+numMode)

p78loc_5669:
		jp		SetTblGraphDraw
p78loc_566C:
		call	CKENDLINERR
		bit		fmtPolar, (iy+numMode)
		ret		nz
		set		fmtPolar, (iy+numMode)
		res		fmtReal, (iy+numMode)
		jr		p78loc_5665
p78loc_567E:
		call	CKENDLINERR
		bit		fmtRect, (iy+numMode)
		ret		nz
		set		fmtRect, (iy+numMode)
		res		fmtReal, (iy+numMode)
		res		fmtPolar, (iy+numMode)
		jr		p78loc_5669
p78loc_5694:
		call	CKENDLINERR
		res		grfExpr, (iy+traceFlags)
		ret
p78loc_569C:
		call	CKENDLINERR
		set		grfExpr, (iy+traceFlags)
		ret
p78loc_56A4:
		call	CKENDLINERR
		set		statDiagnosticsOn, (iy+statFlags2)
		ret
p78loc_56AC:
		call	CKENDLINERR
		res		statDiagnosticsOn, (iy+statFlags2)
		ret
p78loc_56B4:
		call	p78sub_56C2
		ret		nz
		jr		p78loc_56BE
p78loc_56BA:
		call	p78sub_56C2
		ret		z

p78loc_56BE:
		call	j_Arc_Unarc
		ret

; =============== S U B	R O U T	I N E =======================================


p78sub_56C2:
		call	INCFETCH
		cp		5Fh ; '_'
		jr		z, p78loc_56D7
		cp		62h ; 'b'

p78loc_56CB:
		jp		z, Page0Call_24B5
		cp		63h ; 'c'
		jr		z, p78loc_56CB
		call	FETCHVARA
		jr		p78loc_56E1
; ---------------------------------------------------------------------------

p78loc_56D7:
		call	p78sub_5DCC
		ld		(hl), 5
		ld		b, 9
		call	FetchNumLine

p78loc_56E1:
		call	CKENDLINERR
		call	ChkFindSym
		jr		c, p78loc_56FE

p78loc_56E9:
		call	page0_17BB
		jr		nz, p78loc_56FA
		cp		16h
		jp		z, Page0Call_24B5
		bit		allowProgTokens, (iy+newDispF)
		jp		nz, ErrInvalid

p78loc_56FA:
		call	IsBZero
		ret
; ---------------------------------------------------------------------------

p78loc_56FE:
		call	CkOP1Real
		jp		nz, ErrUndefined
		ld		a, (OP1+1)
		call	Page78_2D93
		jp		c, ErrUndefined
		call	CreateReal
		call	OP1Set0
		call	MovFrOP1
		call	OP4ToOP1
		call	ChkFindSym
		jr		nc, p78loc_56E9
		jp		ErrUndefined
; End of function p78sub_56C2

p78loc_5721:
		call	CKENDLINERR
		call	Chk_Batt_Low
		call	z, Page0Call_2E89
		ld		a, 0
		ld		b, 1
		call	Page0Call_2EB9
		ret
; ---------------------------------------------------------------------------

p78loc_5732:
		call	p78sub_5858
		call	p78sub_5877
		jr		nz, p78loc_574A

p78loc_573A:
		call	p78sub_40E7
		cp		0D0h ; '�'
		jr		z, p78loc_573A

p78loc_5741:
		call	FPOPREAL

p78loc_5744:
		call	p78sub_5869
		jp		p78loc_685A
; ---------------------------------------------------------------------------

p78loc_574A:
		call	p78sub_5905

p78loc_574D:
		cp		1
		jr		nc, p78loc_5757

p78loc_5751:
		call	FPOPREAL
		jp		p78sub_5869
; ---------------------------------------------------------------------------

p78loc_5757:
		jr		z, p78loc_575C
		jp		ErrSyntax
; ---------------------------------------------------------------------------

p78loc_575C:
		push	bc
		call	CpyTo1FPST
		call	p78sub_5877
		pop		hl
		jr		z, p78loc_5741
		call	p78loc_5910
		jr		p78loc_574D
; ---------------------------------------------------------------------------

p78loc_576B:
		call	p78sub_5858
		call	p78sub_5905

p78loc_5771:
		cp		1
		jr		c, p78loc_5751
		jr		z, p78loc_577A
		jp		ErrSyntax
; ---------------------------------------------------------------------------

p78loc_577A:
		push	bc
		call	CpyTo1FPST
		call	p78sub_5877
		pop		hl
		jr		nz, p78loc_5741
		call	p78loc_5910
		jr		p78loc_5771
; ---------------------------------------------------------------------------

p78loc_5789:
		cp		4
		jr		z, p78loc_5796
		cp		3
		jp		nz, ErrArgument
		rst		18h
		call	OP1Set1

p78loc_5796:
		call	FORSEQINIT
		call	p78loc_585B
		call	CpyTo1FPS3
		call	CpyTo2FPS2
		call	PushRealO2
		call	StoOther
		call	p78sub_5809
		jr		c, p78loc_57BD

p78loc_57AD:
		call	p78sub_40E7
		cp		0D0h ; '�'
		jr		z, p78loc_57AD

p78loc_57B4:
		ld		de, 24h	; '$'
		call	DeallocFPS1
		jp		p78loc_5744
; ---------------------------------------------------------------------------

p78loc_57BD:
		call	p78sub_5905

p78loc_57C0:
		cp		1
		jr		nc, p78loc_57CD
		ld		de, 24h	; '$'
		call	DeallocFPS1
		jp		p78sub_5869
; ---------------------------------------------------------------------------

p78loc_57CD:
		jr		z, p78loc_57D2
		jp		ErrSyntax
; ---------------------------------------------------------------------------

p78loc_57D2:
		push	bc
		call	CpyTo2FPST
		call	CpyTo1FPS3
		call	page0_16F4
		call	Page0Call_2420
		call	EOP1NotReal
		push	de
		ex		de, hl
		rst		20h
		call	OP1ToOP4
		rst		30h
		call	OP1ToOP5
		pop		de
		call	MovFrOP1
		call	p78sub_5809
		pop		hl
		jr		nc, p78loc_57B4
		push	hl
		call	OP4ToOP2
		call	OP5ToOP1
		call	cpop1op2
		jp		z, ErrIncrement
		pop		hl
		call	p78loc_5910
		jr		p78loc_57C0

; =============== S U B	R O U T	I N E =======================================


p78sub_5809:
		call	CpyTo2FPST
		call	ckop2pos
		scf
		push	af
		call	CpyTo2FPS1
		call	cpop1op2
		jr		nz, p78loc_581B
		pop		af
		ret
; ---------------------------------------------------------------------------

p78loc_581B:
		jr		c, p78loc_5821
		pop		af
		jr		z, p78loc_5823
		ret
; ---------------------------------------------------------------------------

p78loc_5821:
		pop		af
		ret		z

p78loc_5823:
		xor		a
		ret
; End of function p78sub_5809

; ---------------------------------------------------------------------------

p78loc_5825:
		call	p78sub_5858
		call	p78sub_5877
		jr		nz, p78loc_5842
		call	p78sub_40E7
		cp		0D0h ; '�'
		jp		nz, p78loc_5741
		call	p78sub_5905
		cp		1
		jp		c, p78loc_5751
		jp		z, p78loc_5741
		jr		p78loc_5855
; ---------------------------------------------------------------------------

p78loc_5842:
		call	p78sub_5905
		cp		1
		jp		c, p78loc_5751
		jp		z, p78loc_5741
		call	p78sub_40E7
		cp		0D0h ; '�'
		jp		nz, p78loc_5741

p78loc_5855:
		jp		ErrSyntax

; =============== S U B	R O U T	I N E =======================================


p78sub_5858:

		call	PushRealO1

p78loc_585B:
		ld		bc, (cleanTmp)
		call	PUSH2BOPER
		ld		hl, (pTempCnt)
		ld		(cleanTmp), hl
		ret
; End of function p78sub_5858


; =============== S U B	R O U T	I N E =======================================


p78sub_5869:

		ld		hl, (cleanTmp)
		ld		(pTempCnt), hl
		call	POP2BOPER
		ld		(cleanTmp), bc
		ret
; End of function p78sub_5869


; =============== S U B	R O U T	I N E =======================================


p78sub_5877:
		call	ParseInpGraph
		call	page0_1717
		call	EOP1NotReal
		jp		CkOP1FP0
; End of function p78sub_5877


; =============== S U B	R O U T	I N E =======================================


FORSEQINIT:
		call	EOP1NotReal
		call	CkOP1FP0
		jp		z, ErrIncrement
		call	OP1ToOP3
		call	PopRealO1
		call	EOP1NotReal
		rst		8
		call	PopRealO1
		call	page0_1851
		call	PushRealO2
		jp		PushRealO3
; End of function FORSEQINIT

; ---------------------------------------------------------------------------

GRPHPARS:
		ld		a, (curGX2)
		call	Page0Call_385B

PLOTPARS:
		ld		a, 8
		bit		regraphHookActive, (iy+hookflags3)
		call	nz, j_RunGraphingHook
		ret		nz
		ld		hl, 0
		ld		(unk_9665), hl
		ld		hl, (pTempCnt)
		push	hl
		call	SAVEPARSE
		ld		hl, p78loc_58E7
		call	pushErrorHandleR
		call	ParseInpGraph
		call	popErrorHandleR
		call	FPOPREAL
		call	POP2BOPER
		pop		hl
		ld		hl, OP1
		res		5, (hl)
		call	IsOP1Num
		jr		z, p78loc_58F8
		call	CkOP1Real
		ret		z
		cp		0Eh
		jp		z, ErrInvalid
		jr		p78loc_58F8
p78loc_58E7:
		res		g_style_active, (iy+sGrFlags)
		and		7Fh ; ''
		cp		8
		jr		nc, p78loc_5902
		call	p78sub_5A80
		pop		de
		call	j_FixTempCnt

p78loc_58F8:
		ld		hl, OP1
		set		5, (hl)
		res		numOP1, (iy+ParsFlag2)
		ret
; ---------------------------------------------------------------------------

p78loc_5902:
		jp		JErrorNo

; =============== S U B	R O U T	I N E =======================================


p78sub_5905:

		ld		hl, (nextParseByte)
		ld		de, (basic_start)
		or		a
		sbc		hl, de
		inc		hl

p78loc_5910:
		push	hl
		ld		de, (basic_start)
		add		hl, de
		ld		(nextParseByte), hl
		pop		bc
		call	PUSH2BOPER
		pop		bc
		jr		p78loc_594F
; End of function p78sub_5905


; =============== S U B	R O U T	I N E =======================================


ParseInpGraph:
		call	InitPFlgs
; End of function ParseInpGraph


; =============== S U B	R O U T	I N E =======================================


ParseInpGraphReset:
		call	p78sub_5AC8
		pop		bc
		call	PUSH2BOPER
		ld		bc, p78loc_5A67
		jr		p78loc_594F
; ---------------------------------------------------------------------------

ParseInpLastEnt:
		call	command_buf_to_OP1

ParseInp:
		xor		a
		ld		(EST), a
		call	InitPFlgs
		res		splitOverride, (iy+graphFlags2)

PARSEOFF:
		call	p78sub_5AC8
		pop		bc
		call	PUSH2BOPER
		pop		bc
		call	PUSH2BOPER
		pop		bc
		call	PUSH2BOPER
		ld		bc, p78loc_5A5F

p78loc_594F:
		; ParseInpGraphReset+Aj
		call	PUSH2BOPER
		ld		a, 0
		bit		1, (iy+36h)
		call	nz, Page0Call_2D69
		jp		nz, p78loc_67B8

p78loc_595E:
		res		3, (iy+1Ah)
		res		numOP1, (iy+ParsFlag2)
		ld		a, 0
		call	PUSHOPER
		ld		hl, 1
		ld		(numArguments), hl

p78loc_5971:
		call	CURFETCH

p78loc_5974:
		call	CHKERRBREAK
		call	p78loc_7099
		jp		z, p78loc_679F
		bit		7, (iy+9)
		call	nz, RESETWINTOP
		res		7, (iy+9)
		cp		4
		jp		z, p78loc_6839
		jp		c, p78loc_6ECE
		cp		7
		jp		z, p78loc_5D6E
		jp		c, p78loc_5D24
		cp		9
		jp		z, p78loc_5D8B
		jp		c, p78loc_5D78
		cp		10h
		jp		c, p78loc_67DA
		cp		11h
		jp		z, p78loc_5A56
		jp		c, p78loc_6850
		cp		29h ; ')'
		jp		z, p78loc_5A53
		jp		c, p78loc_67EC
		cp		2Ch ; ','
		jp		z, p78loc_5B7E
		cp		2Bh ; '+'
		jp		z, p78loc_5A56
		jp		c, p78loc_5CDF
		cp		2Dh ; '-'
		jp		z, p78loc_67DA
		cp		30h ; '0'
		jp		c, p78loc_6E3F
		cp		3Ch ; '<'
		jp		c, p78loc_5B1F
		cp		3Eh ; '>'
		jp		z, p78loc_6799
		jr		c, p78loc_5A56
		cp		40h ; '@'
		jr		z, p78loc_5A56
		cp		64h ; 'd'
		jp		c, ParseNameTokens
		cp		72h ; 'r'
		jp		z, ParseNameTokens
		cp		6Ah ; 'j'
		jp		c, p78loc_6EA8
		cp		70h ; 'p'
		jr		c, p78loc_5A56
		cp		73h ; 's'
		jp		z, p78loc_6EC2
		jr		c, p78loc_5A56
		cp		7Eh ; '~'
		jp		c, p78loc_6EA6
		jp		z, p78loc_6EA1
		cp		82h ; '�'
		jr		c, p78loc_5A53
		cp		84h ; '�'
		jr		c, p78loc_5A56
		cp		94h ; '�'
		jp		c, p78loc_6E55
		cp		96h ; '�'
		jr		c, p78loc_5A56
		cp		0AAh ; '�'
		jp		c, p78loc_6E53
		cp		0AAh ; '�'
		jp		z, ParseNameTokens
		cp		0AEh ; '�'
		jp		c, p78loc_5B7E
		cp		0B0h ; '�'
		jr		z, p78loc_5A59
		cp		0BBh ; '�'
		jp		z, p78loc_6DBF
		cp		0B0h ; '�'
		jr		c, p78loc_5A53
		cp		0CEh ; '�'
		jp		c, p78loc_6860
		cp		0E6h ; '�'
		jp		z, p78loc_6DA0
		cp		0EBh ; '�'
		jp		c, p78loc_6E43
		jp		z, ParseNameTokens
		cp		0EFh ; '�'
		jp		c, p78loc_6E3A
		jp		z, Page0Call_2555
		cp		0F2h ; '�'
		jr		c, p78loc_5A56
		cp		0FCh ; '�'
		jp		c, p78loc_6E41
		cp		0FFh
		jp		z, p78loc_6E36

p78loc_5A53:
		; ParseInpGraphReset+DDj ...
		jp		ErrSyntax
; ---------------------------------------------------------------------------

p78loc_5A56:
		; ParseInpGraphReset+99j ...
		jp		p78loc_6846
; ---------------------------------------------------------------------------

p78loc_5A59:
		; ParseInpGraphReset+26Cj
		call	p78sub_688A
		jp		p78loc_684A
; End of function ParseInpGraphReset

p78loc_5A5F:
		call	POP2BOPER
		push	bc
		call	POP2BOPER
		push	bc
p78loc_5A67:
		call	POP2BOPER
		push	bc
		call	PopRealO3
		call	PushOP1
		call	OP3ToOP1
		call	GETPARSE
		jp		popOP1
; ---------------------------------------------------------------------------

PARSESCAN:
		call	p78sub_5AC8
		call	p78sub_759D

; =============== S U B	R O U T	I N E =======================================


p78sub_5A80:
		call	PopRealO1
; End of function p78sub_5A80


; =============== S U B	R O U T	I N E =======================================


GETPARSE:
		call	POP2BOPER
		ld		a, (OP1+1)
		or		a
		jr		z, p78loc_5AAD
		push	bc
		call	ChkFindSym
		ex		de, hl
		pop		de
		jr		nc, p78loc_5A9A
		xor		a
		ld		(OP1+1), a
		jr		p78loc_5AAD
; ---------------------------------------------------------------------------

p78loc_5A9A:
		call	Page0Call_2420
		call	p78sub_5AE6
		ld		(basic_start), hl
		ex		de, hl
		add		hl, de
		ld		(nextParseByte), hl
		ex		de, hl

p78loc_5AA9:
		add		hl, bc
		ld		(basic_end), hl

p78loc_5AAD:
		ld		de, basic_prog
		jp		MovFrOP1
; End of function GETPARSE


; =============== S U B	R O U T	I N E =======================================


SAVEPARSE:
		ld		hl, (nextParseByte)
		ld		bc, (basic_start)
		or		a
		sbc		hl, bc
		ld		b, h
		ld		c, l
		call	PUSH2BOPER
		ld		hl, basic_prog
		jp		PushReal
; End of function SAVEPARSE


; =============== S U B	R O U T	I N E =======================================


p78sub_5AC8:
		; ParseInpGraphReset:PARSEOFFp	...
		call	ChkFindSym
		jp		c, ErrUndefined
		call	Page0Call_2420

p78loc_5AD1:
		ld		(chkDelPtr1), de
		call	SAVEPARSE
		ld		hl, (chkDelPtr1)
		call	p78sub_5AE6
		ld		(basic_start), hl
		ld		(nextParseByte), hl
		jr		p78loc_5AA9
; End of function p78sub_5AC8


; =============== S U B	R O U T	I N E =======================================


p78sub_5AE6:
		ld		c, (hl)
		inc		hl
		ld		b, (hl)
		dec		bc
		inc		hl
		and		0Fh
		call	page0_17BE
		ret		z
		ld		a, (OP1+1)
		cp		24h ; '$'
		ret		nz
		inc		hl
		dec		bc
		ld		a, (hl)
		or		a
		jr		z, p78loc_5B05
		add		a, 3

p78loc_5AFF:
		inc		hl
		dec		bc
		dec		a
		jr		nz, p78loc_5AFF
		ret
; ---------------------------------------------------------------------------

p78loc_5B05:
		inc		hl
		dec		bc
		ret
; End of function p78sub_5AE6


; =============== S U B	R O U T	I N E =======================================


InitPFlgs:
		; ParseInpGraphReset+13p
		ld		(iy+6),	0
		ld		(iy+7),	0
		res		3, (iy+1Ah)
		res		0, (iy+1Fh)
; End of function InitPFlgs


; =============== S U B	R O U T	I N E =======================================


p78sub_5B18:
		; ParseInpGraphReset:p78loc_67CDp	...
		ld		a, (iy+0Ah)
		ld		(iy+0Bh), a
		ret
; End of function p78sub_5B18

; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR ParseInpGraphReset

p78loc_5B1F:
		call	p78sub_6895
		call	p78sub_5BEC
		call	CURFETCH
		cp		0Bh
		jr		nz, p78loc_5B77
		call	p78cxPutAway_NoPartial5
		jr		nc, p78loc_5B3A
		ld		hl, (nextParseByte)
		dec		hl
		ld		(nextParseByte), hl
		jr		p78loc_5B77
; ---------------------------------------------------------------------------

p78loc_5B3A:
		call	OP1ToOP6
		call	p78sub_5BEC
		call	CURFETCH
		cp		0AEh ; '�'
		jp		nz, ErrSyntax
		call	OP2Set60
		call	fpdiv
		call	OP6ToOP2
		rst		30h
		call	p78cxPutAway_NoPartial5
		jr		c, p78loc_5B77
		call	OP1ToOP6
		call	p78sub_5BEC
		call	OP2Set60
		inc		(hl)
		inc		(hl)
		ld		a, 36h ; '6'
		ld		(OP2M), a
		call	fpdiv
		call	OP6ToOP2
		rst		30h
		call	CURFETCH
		cp		2Ah ; '*'
		jr		nz, p78loc_5BE9
		jr		p78loc_5BAF
; ---------------------------------------------------------------------------

p78loc_5B77:
		; ParseInpGraphReset+215j ...
		set		numOP1, (iy+ParsFlag2)
		jp		p78loc_5971
; ---------------------------------------------------------------------------

p78loc_5B7E:
		; ParseInpGraphReset+F8j
		push	af
		cp		0ABh ; '�'
		jr		nz, p78loc_5B92
		call	CKENDLIN
		cp		10h
		jr		nz, p78loc_5B92
		ld		(nextParseByte), bc
		pop		af
		jp		p78loc_5A59
; ---------------------------------------------------------------------------

p78loc_5B92:
		; ParseInpGraphReset+265j
		call	p78sub_6895
		pop		af
		cp		2Ch ; ','
		jr		z, p78loc_5BB6
		cp		0ACh ; '�'
		jr		z, p78loc_5BC0
		jr		c, p78loc_5BC7
		call	p78sub_6D98
		call	NZIf83Plus
		call	z, HandleLinkKeyActivity
		call	j_EVALF3A
		call	OP2ToOP1

p78loc_5BAF:
		; ParseInpGraphReset+29Bj ...
		set		numOP1, (iy+ParsFlag2)
		jp		p78loc_684A
; ---------------------------------------------------------------------------

p78loc_5BB6:
		call	COP1Set0
		ld		a, 10h
		ld		(OP2M), a
		jr		p78loc_5BAF
; ---------------------------------------------------------------------------

p78loc_5BC0:
		ld		a, 4
		call	GETCONOP1
		jr		p78loc_5BAF
; ---------------------------------------------------------------------------

p78loc_5BC7:
		call	p78sub_7020
		cp		4
		jr		z, p78loc_5BD3
		call	j_Random
		jr		p78loc_5BAF
; ---------------------------------------------------------------------------

p78loc_5BD3:
		call	CKENDLINERR
		call	POPOPER
		call	PopRealO1
		call	j_StoRand
		jr		p78loc_5BAF
; END OF FUNCTION CHUNK	FOR ParseInpGraphReset

; =============== S U B	R O U T	I N E =======================================


CKENDLINERR:
		call	CKENDLIN
		ret		z

p78loc_5BE5:
		ld		(nextParseByte), bc

p78loc_5BE9:
		jp		ErrSyntax
; End of function CKENDLINERR


; =============== S U B	R O U T	I N E =======================================


p78sub_5BEC:
		; ParseInpGraphReset+21Ap ...
		call	OP1Set0
		call	DecO1Exp
		ld		c, 0
		ld		b, 3
		push	bc
		call	CURFETCH
		cp		3Bh ; ';'
		jr		z, p78loc_5C52

p78loc_5BFE:
		pop		bc
		cp		0B0h ; '�'
		jr		z, p78loc_5C42
		cp		3Ah ; ':'
		jr		z, p78loc_5C36
		cp		3Bh ; ';'
		jr		z, p78loc_5C5C
		jr		nc, p78loc_5C78
		cp		30h ; '0'
		jr		c, p78loc_5C78
		bit		5, c
		jr		nz, p78loc_5C6E
		set		3, c
		cp		30h ; '0'
		jr		z, p78loc_5C26

p78loc_5C1B:
		set		7, c
		push	bc
		call	p78sub_5CBA

p78loc_5C21:
		call	BRKINC
		jr		p78loc_5BFE
; ---------------------------------------------------------------------------

p78loc_5C26:
		bit		7, c
		jr		nz, p78loc_5C1B
		bit		6, c
		jr		z, p78loc_5C4F
		call	DecO1Exp
		jp		p, p78loc_5C4F
		jr		p78loc_5C75
; ---------------------------------------------------------------------------

p78loc_5C36:
		bit		6, c
		jr		nz, p78loc_5C75
		bit		5, c
		jr		nz, p78loc_5C75
		set		6, c
		jr		p78loc_5C4F
; ---------------------------------------------------------------------------

p78loc_5C42:
		bit		5, c
		jr		z, p78loc_5C75
		ld		a, b
		cp		3
		jr		nz, p78loc_5C75
		ld		a, c
		xor		10h
		ld		c, a

p78loc_5C4F:
		push	bc
		jr		p78loc_5C21
; ---------------------------------------------------------------------------

p78loc_5C52:
		pop		bc
		push	bc
		call	p78sub_5CB8
		pop		bc
		set		7, c
		set		3, c

p78loc_5C5C:
		ld		hl, 0
		ld		(OP2), hl
		bit		5, c
		jr		nz, p78loc_5C75
		bit		3, c
		jr		z, p78loc_5C75
		set		5, c
		jr		p78loc_5C4F
; ---------------------------------------------------------------------------

p78loc_5C6E:
		ld		hl, 8484h
		rld
		djnz	p78loc_5C4F

p78loc_5C75:
		jp		ErrSyntax
; ---------------------------------------------------------------------------

p78loc_5C78:
		bit		5, c
		jr		z, p78loc_5C9B
		ld		a, b
		cp		3
		jr		z, p78loc_5C75
		bit		7, c
		jr		z, p78loc_5C9B
		push	bc
		ld		hl, 8484h
		call	p78sub_7216
		pop		bc
		ld		a, (OP1+1)
		bit		4, c
		jr		nz, p78loc_5CA5
		add		a, e
		jp		c, ErrOverflow

p78loc_5C98:
		ld		(OP1+1), a

p78loc_5C9B:
		bit		3, c
		jr		z, p78loc_5C75
		call	page0_1040
		jp		CkValidNum
; ---------------------------------------------------------------------------

p78loc_5CA5:
		sub		e
		jr		nc, p78loc_5C98
		jp		OP1Set0
; End of function p78sub_5BEC


; =============== S U B	R O U T	I N E =======================================


OP2Set60:
		; ParseInpGraphReset+23Ap
		call	OP2Set0
		ld		a, 60h ; '`'
		ld		(OP2M), a
		ld		hl, 8484h
		inc		(hl)
		ret
; End of function OP2Set60


; =============== S U B	R O U T	I N E =======================================


p78sub_5CB8:
		ld		a, 31h ; '1'
; End of function p78sub_5CB8


; =============== S U B	R O U T	I N E =======================================


p78sub_5CBA:
		push	bc
		and		0Fh
		ld		b, a
		ld		hl, OP1
		ld		a, (hl)
		bit		4, a
		jr		nz, p78loc_5CD8
		and		0Fh
		inc		(hl)
		ld		c, a
		ld		a, b
		ld		b, 0
		ld		hl, OP1M
		srl	c
		call	nc, ShLAcc
		add		hl, bc
		add		a, (hl)
		ld		(hl), a

p78loc_5CD8:
		pop		bc
		bit		6, c
		ret		nz
		jp		INCO1EXP
; End of function p78sub_5CBA

; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR ParseInpGraphReset

p78loc_5CDF:
		call	IsOP1Num
		jp		nz, ErrSyntax
		ld		e, 0

FetchQuotedString:
		push	de
		ld		bc, (nextParseByte)
		push	bc

p78loc_5CED:
		; ParseInpGraphReset+3D5j
		call	PARSAHEADS
		ld		(nextParseByte), bc
		jr		nc, p78loc_5CED
		cp		11h
		jr		z, p78loc_5CED
		pop		de
		inc		de
		ld		h, b
		ld		l, c
		or		a
		sbc		hl, de
		push	af
		push	hl
		call	CreateTempString
		inc		de
		inc		de
		pop		bc
		ld		a, c
		or		b
		jr		z, p78loc_5D14
		ld		hl, (nextParseByte)
		sbc		hl, bc
		ldir

p78loc_5D14:
		call	OP4ToOP1
		pop		af
		pop		de
		bit		0, e
		ret		nz
		cp		2Ah ; '*'
		jp		z, p78loc_5BAF
		jp		p78loc_5B77
; ---------------------------------------------------------------------------

p78loc_5D24:
		bit		5, (iy+6)
		jr		nz, p78loc_5D75
		push	af
		bit		7, (iy+6)
		jr		nz, p78loc_5D62
		bit		6, (iy+6)
		jr		z, p78loc_5D51
		set		7, (iy+6)

p78loc_5D3B:
		call	IsOP1Num
		jr		nz, p78loc_5D75
		call	p78sub_7020
		cp		6
		jr		nz, p78loc_5D75
		ld		hl, 9664h
		inc		(hl)
		jp		nz, p78loc_6856
		jp		ErrDimension
; ---------------------------------------------------------------------------

p78loc_5D51:
		ld		hl, 0
		ld		(unk_9663), hl
		ld		(iy+6),	h
		set		6, (iy+6)
		pop		af

p78loc_5D5F:
		jp		p78loc_6852
; ---------------------------------------------------------------------------

p78loc_5D62:
		bit		6, (iy+6)
		jr		nz, p78loc_5D75
		set		6, (iy+6)
		jr		p78loc_5D3B
; ---------------------------------------------------------------------------

p78loc_5D6E:
		bit		7, (iy+6)

p78loc_5D72:
		jp		nz, p78loc_6846
; END OF FUNCTION CHUNK	FOR ParseInpGraphReset
; START	OF FUNCTION CHUNK FOR p78sub_5DCC

p78loc_5D75:
		; ParseInpGraphReset+41Bj ...
		jp		ErrSyntax
; END OF FUNCTION CHUNK	FOR p78sub_5DCC
; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR ParseInpGraphReset

p78loc_5D78:
		ld		a, (iy+6)
		and		0E0h ; '�'
		jr		nz, p78loc_5D75
		ld		(iy+6),	0
		set		5, (iy+6)
		ld		a, 8
		jr		p78loc_5D5F
; ---------------------------------------------------------------------------

p78loc_5D8B:
		bit		5, (iy+6)
		jr		p78loc_5D72
; ---------------------------------------------------------------------------

p78loc_5D91:
		pop		af
		ld		hl, (nextParseByte)
		ld		de, OP1
		call	page0_118B
		dec		hl
		ld		(nextParseByte), hl
		ld		hl, (OP1+1)
		ld		(unk_9810), hl
		ld		hl, (OP1+3)
		ld		(unk_980E), hl
		jr		p78loc_5DBC
; ---------------------------------------------------------------------------

p78loc_5DAD:
		pop		af
		call	PopRealO3
		call	popOP1
		call	PushRealO3
		ld		d, 4
		call	PUSHNUM

p78loc_5DBC:
		jp		p78loc_684A
; END OF FUNCTION CHUNK	FOR ParseInpGraphReset

; =============== S U B	R O U T	I N E =======================================


p78sub_5DBF:
		call	Page78_2D93
		ret		nc
		cp		30h ; '0'
		jr		c, p78loc_5D75
		cp		3Ah ; ':'
		jr		nc, p78loc_5D75
		ret
; End of function p78sub_5DBF


; =============== S U B	R O U T	I N E =======================================


p78sub_5DCC:
		; p78sub_56C2:p78loc_56D7p ...



		call	NXTFETCH
		call	Page78_2D93
		jr		c, p78loc_5D75
		call	ZeroOP1
		ld		hl, OP1
		ret
; End of function p78sub_5DCC

; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR ParseInpGraphReset

p78loc_5DDB:
		; ParseInpGraphReset+531j
		pop		af
		ld		a, 5Dh ; ']'
		push	af
		call	p78sub_5DF2
		jp		p78loc_5EA0
; ---------------------------------------------------------------------------

p78loc_5DE5:
		call	p78sub_5DCC
		ld		(hl), 5
		ld		b, 9
		call	FetchNumLine
		jp		p78loc_5ECA
; END OF FUNCTION CHUNK	FOR ParseInpGraphReset

; =============== S U B	R O U T	I N E =======================================


p78sub_5DF2:
		; FETCHVARA+Bp
		call	p78sub_5DCC
		ld		(hl), 1
		inc		hl
		ld		(hl), 5Dh ; ']'
		ld		b, 6
; End of function p78sub_5DF2


; =============== S U B	R O U T	I N E =======================================


FetchNumLine:
		; p78sub_56C2+1Cp	...
		push	hl
		push	bc
		call	CKENDLIN
		jr		z, p78loc_5E1F
		call	Page78_2D93
		jr		nc, p78loc_5E12
		cp		30h ; '0'
		jr		nc, p78loc_5E0E

p78loc_5E0C:
		jr		p78loc_5E1F
; ---------------------------------------------------------------------------

p78loc_5E0E:
		cp		3Ah ; ':'
		jr		nc, p78loc_5E0C

p78loc_5E12:
		ld		(nextParseByte), bc
		pop		bc
		pop		hl
		inc		hl
		ld		(hl), a
		djnz	FetchNumLine
		jp		p78loc_5D75
; ---------------------------------------------------------------------------

p78loc_5E1F:
		; FetchNumLine:p78loc_5E0Cj
		pop		bc
		pop		hl
		ret
; End of function FetchNumLine

; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR ParseInpGraphReset

ParseNameTokens:
		; ParseInpGraphReset+C0j ...
		push	af
		call	p78sub_6895
		pop		af
		push	af
		cp		5Fh ; '_'
		jr		z, p78loc_5DE5
		cp		0EBh ; '�'
		jr		z, p78loc_5DDB
		call	Page78_2D93
		jr		c, p78loc_5E59
		call	p78sub_7020
		cp		4
		jr		nz, p78loc_5E57
		call	CpyTo2FPST
		ld		a, (OP2)
		and		1Fh
		cp		4
		jr		z, p78loc_5E4D
		call	IS_A_LSTorCLST
		jr		nz, p78loc_5E57

p78loc_5E4D:
		ld		hl, (nextParseByte)
		dec		hl
		ld		(nextParseByte), hl
		jp		p78loc_5DDB
; ---------------------------------------------------------------------------

p78loc_5E57:
		; ParseInpGraphReset+528j
		pop		af
		push	af

p78loc_5E59:
		call	FETCHVAR
		pop		af
		push	af
		cp		62h ; 'b'
		jr		c, p78loc_5EA0
		jp		z, p78loc_6017
		cp		0AAh ; '�'
		jr		z, p78loc_5EA0
		cp		72h ; 'r'
		jr		nz, p78loc_5E75
		call	page0_172A
		jp		nz, ErrInvalid
		jr		p78loc_5EA0
; ---------------------------------------------------------------------------

p78loc_5E75:
		ld		a, (OP1M)
		cp		6

p78loc_5E7A:
		jp		z, ErrInvalid
		cp		7
		jr		z, p78loc_5E7A
		cp		41h ; 'A'
		jp		z, p78loc_5D91
		cp		40h ; '@'
		jp		z, p78loc_5DAD
		call	page0_172A
		call	nz, p78sub_735F
		call	VARSYSADR
		ld		(OP1), a
		ld		(chkDelPtr3), de
		ld		(chkDelPtr1), hl
		jr		p78loc_5ECA
; ---------------------------------------------------------------------------

p78loc_5EA0:
		; ParseInpGraphReset+53Dj ...
		pop		af
		push	af
		ld		a, 0FFh
		ld		(OP1), a

p78loc_5EA7:
		call	Page0Call_241E
		jr		nc, p78loc_5EB9
		ld		a, (OP1+1)
		call	Page78_2D93
		jr		c, p78loc_5EB9
		call	p78sub_5F3E
		jr		p78loc_5EA7
; ---------------------------------------------------------------------------

p78loc_5EB9:
		; ParseInpGraphReset+58Fj
		ld		(chkDelPtr3), hl
		ld		(chkDelPtr1), de
		call	OP1ToOP4
		bit		3, (iy+3)
		call	nz, p78sub_7395

p78loc_5ECA:
		; ParseInpGraphReset+57Bj
		call	p78sub_7370
		call	p78sub_7020
		cp		4
		jp		z, p78loc_5FB1
		or		a
		jp		nz, p78loc_5EEB
		call	p78sub_703E
		jp		nz, p78loc_5EEB
		call	CkOP1Real
		cp		5

p78loc_5EE4:
		jp		z, p78loc_5F92
		cp		6
		jr		z, p78loc_5EE4

p78loc_5EEB:
		; ParseInpGraphReset+5B9j
		ld		a, (OP1)
		cp		0FFh
		jp		z, ErrUndefined
		call	page0_17B0
		jp		z, p78loc_5F71
		call	page0_172A
		jr		z, p78loc_5F03
		ld		hl, (chkDelPtr3)
		set		6, (hl)

p78loc_5F03:
		call	equ_or_newequ
		pop		hl
		jr		nz, p78loc_5F4A
		bit		2, (iy+17h)
		jr		z, p78loc_5F21
		call	IsRecursiveMode
		jr		z, p78loc_5F21
		call	page0_18AE
		jr		nc, p78loc_5F21
		ld		a, (OP1M)
		bit		7, a
		jp		nz, ErrInvalid

p78loc_5F21:
		; ParseInpGraphReset+5EFj ...
		call	NXTFETCH
		cp		10h
		jr		nz, p78loc_5F33
		call	INCFETCH
		ld		a, 26h ; '&'
		call	p78sub_688A
		rst		18h
		jr		p78loc_5F7E
; ---------------------------------------------------------------------------

p78loc_5F33:
		call	ParseInpGraphReset
		call	page0_1717
		call	p78sub_5B18
		jr		p78loc_5F7E
; END OF FUNCTION CHUNK	FOR ParseInpGraphReset

; =============== S U B	R O U T	I N E =======================================


p78sub_5F3E:
		call	CreateReal

p78loc_5F41:
		call	OP1Set0
		call	MovFrOP1
		jp		OP4ToOP1
; End of function p78sub_5F3E

; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR ParseInpGraphReset

p78loc_5F4A:
		set		numOP1, (iy+ParsFlag2)
		call	CkOP1Real
		jr		z, p78loc_5F74
		cp		4
		jr		z, p78loc_5F7E
		cp		0Ch
		jr		z, p78loc_5F74
		call	ISO1NONTEMPLST
		jr		nz, p78loc_5F66
		ld		hl, (chkDelPtr3)
		call	PARSE_FORMULA

p78loc_5F66:
		call	CkOP1Real
		cp		3
		jr		c, p78loc_5F81
		cp		0Dh
		jr		z, p78loc_5F81

p78loc_5F71:
		jp		ErrDataType
; ---------------------------------------------------------------------------

p78loc_5F74:
		; ParseInpGraphReset+636j
		ld		hl, (chkDelPtr3)
		ld		de, (chkDelPtr1)
		call	p78sub_664F

p78loc_5F7E:
		; ParseInpGraphReset+619j ...
		jp		p78loc_684A
; ---------------------------------------------------------------------------

p78loc_5F81:
		; ParseInpGraphReset+64Cj
		call	NXTFETCH
		cp		10h
		jr		nz, p78loc_6001
		call	INCFETCH

p78loc_5F8B:
		; ParseInpGraphReset+6ABj ...
		ld		d, 29h ; ')'
		call	PUSHNUM
		jr		p78loc_5F7E
; ---------------------------------------------------------------------------

p78loc_5F92:
		pop		hl
		call	CKENDLIN
		jp		nz, ErrSyntax
		bit		allowProgTokens, (iy+newDispF)
		jr		nz, p78loc_5FAC
		set		allowProgTokens, (iy+newDispF)
		call	ParseInpGraph
		res		allowProgTokens, (iy+newDispF)
		jr		p78loc_5FAF
; ---------------------------------------------------------------------------

p78loc_5FAC:
		call	ParseInpGraph

p78loc_5FAF:
		; ParseInpGraphReset+6E8j ...
		jr		p78loc_5F7E
; ---------------------------------------------------------------------------

p78loc_5FB1:
		call	CKENDLIN
		jr		z, p78loc_5FDE
		call	INCFETCH
		cp		10h
		jp		nz, ErrSyntax
		ld		a, (OP1)
		call	ErrOnCertainTypes
		pop		af
		ld		(OP1), a
		cp		5Dh ; ']'
		jr		z, p78loc_5F8B
		cp		5Ch ; '\'
		jr		z, p78loc_5F8B
		cp		63h ; 'c'
		jr		nz, p78loc_5FDB
		ld		a, (OP1M)
		cp		2Ah ; '*'
		jr		z, p78loc_5F8B

p78loc_5FDB:
		jp		ErrDataType
; ---------------------------------------------------------------------------

p78loc_5FDE:
		call	POPOPER
		pop		bc
		ld		a, (OP1+1)
		cp		62h ; 'b'
		ld		a, b
		jr		nz, p78loc_5FF2
		call	CpyTo1FPST
		call	p78sub_6128
		jr		p78loc_5FF5
; ---------------------------------------------------------------------------

p78loc_5FF2:
		call	p78sub_6171

p78loc_5FF5:
		call	CkOP1Real
		call	equ_or_newequ
		jp		z, p78loc_684A
		jp		p78loc_5BAF
; ---------------------------------------------------------------------------

p78loc_6001:
		ld		b, 0
		call	p78sub_66D9
		ld		a, (OP1+1)
		cp		63h ; 'c'
		jr		nz, p78loc_5FAF
		ld		a, (OP1M)
		cp		2Ah ; '*'
		call	z, p78sub_6661
		jr		p78loc_5FAF
; ---------------------------------------------------------------------------

p78loc_6017:
		ld		a, (OP1M)
		cp		21h ; '!'
		jp		z, p78loc_5EA0
		pop		hl
		call	p78sub_6026
		jp		p78loc_5BAF
; END OF FUNCTION CHUNK	FOR ParseInpGraphReset

; =============== S U B	R O U T	I N E =======================================


p78sub_6026:
		call	GETSTATPTR
		call	page0_172A
		jr		z, p78loc_6030
		set		6, (hl)

p78loc_6030:
		rst		20h
		call	CkOP1Real
		cp		0Eh
		jr		z, p78loc_604A
		ret
; End of function p78sub_6026


; =============== S U B	R O U T	I N E =======================================


GETSTATPTR:
		bit		statsValid, (iy+statFlags)
		jr		z, p78loc_604A

CMP_STATPTR:
		ld		l, a
		ld		h, 0
		call	HLTimes9
		ld		de, 8A28h
		add		hl, de
		ret
; ---------------------------------------------------------------------------

p78loc_604A:
		; GETSTATPTR+4j
		jp		ErrUndefined
; End of function GETSTATPTR


; =============== S U B	R O U T	I N E =======================================


VARSYSADR:
		; p78sub_61A2-ADp	...
		push	af
		ld		hl, p78loc_606A
		add		a, a
		ld		e, a
		ld		d, 0
		add		hl, de
		call	ldHLind
		ld		d, h
		ld		e, l
		pop		af
		cp		2Ah ; '*'
		ld		a, 0
		ret		nz
		ld		hl, 91E0h
		ld		de, 91D9h
		ld		a, 1
		ret
; End of function VARSYSADR

p78loc_606A:
		.dw		uXscl
		.dw		uYscl
		.dw		Xscl
		.dw		Yscl
		.dw		u0
		.dw		v0
		.dw		un1
		.dw		vn1
		.dw		uu0
		.dw		uv0
		.dw		Xmin
		.dw		Xmax
		.dw		Ymin
		.dw		Ymax
		.dw		TminPar
		.dw		TmaxPar
		.dw		ThetaMin
		.dw		ThetaMax
		.dw		uXmin
		.dw		uXmax
		.dw		uYmin
		.dw		uYmax
		.dw		uThetMin
		.dw		uThetMax
		.dw		uTmin
		.dw		uTmax
		.dw		TblMin
		.dw		PlotStart
		.dw		uPlotStart
		.dw		nMax
		.dw		unMax
		.dw		nMin
		.dw		unMin
		.dw		TblStep
		.dw		Tstep
		.dw		ThetaStep
		.dw		uTStep
		.dw		uThetStep
		.dw		deltaX
		.dw		deltaY
		.dw		XFact
		.dw		YFact
		.dw		JError
		.dw		fin_N
		.dw		fin_I
		.dw		fin_PV
		.dw		fin_PMT
		.dw		fin_FV
		.dw		fin_PY
		.dw		fin_CY
		.dw		w0
		.dw		uw0
		.dw		PlotStep
		.dw		uPlotStep
		.dw		XresO
		.dw		uXres
		.dw		u02
		.dw		uu02
		.dw		v02
		.dw		uv02
		.dw		w02
		.dw		uw02
		.dw		wn1
; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p78sub_61A2

StoSysTok:
		push	af
		call	PushOP1
		ld		a, 1
		ld		(OP4+1), a
		pop		af
		ld		(OP4M), a
		call	VARSYSADR
		ld		(chkDelPtr1), hl
		call	p78sub_61A2
		ret
; END OF FUNCTION CHUNK	FOR p78sub_61A2

; =============== S U B	R O U T	I N E =======================================


StoAns:
		call	CkOP1Real
		cp		0Eh
		jp		z, ErrInvalid
		call	PushOP1
		call	AnsName
		jr		StoOther
; End of function StoAns

; ---------------------------------------------------------------------------

StoTheta:
		call	PushOP1
		call	ThetaName
		jr		StoOther
; ---------------------------------------------------------------------------

StoR:
		call	PushOP1
		call	RName
		jr		StoOther
; ---------------------------------------------------------------------------

StoY:
		call	PushOP1
		call	YName
		jr		StoOther
; ---------------------------------------------------------------------------

StoN:
		rst		18h

; =============== S U B	R O U T	I N E =======================================


p78sub_6128:
		call	ErrD_OP1NotPosInt
		call	EOP1NotReal
		call	RECURNNAME
		call	StoOther
		bit		5, (iy+7)
		ret		nz
		bit		plotDisp, (iy+plotFlags)
		ret		nz
		bit		drawingGraph, (iy+graphFlags)
		ret		nz
		bit		allowCursor, (iy+plotFlags)
		ret		nz
		call	IsRecursiveMode
		call	nz, SetTblGraphDraw
		ret
; End of function p78sub_6128

; ---------------------------------------------------------------------------

StoT:
		call	PushOP1
		call	TName
		jr		StoOther
; ---------------------------------------------------------------------------

StoX:
		call	PushOP1
		call	XName

; =============== S U B	R O U T	I N E =======================================


StoOther:
		ld		a, 0FFh
		ld		(OP1), a
		call	Page0Call_241E
		jr		nc, p78loc_616A
		ld		a, (OP1+1)

p78loc_616A:
		ld		(chkDelPtr3), hl
		ld		(chkDelPtr1), de
; End of function StoOther


; =============== S U B	R O U T	I N E =======================================


p78sub_6171:





		push	af
		ld		a, (OP1)
		call	ErrOnCertainTypes
		call	OP1ToOP4
		call	CpyTo1FPST
		call	CkOP1Real
		cp		0Eh
		jp		z, ErrInvalid
		pop		af
		cp		0AAh ; '�'
		jr		z, p78loc_619F
		cp		62h ; 'b'
		jp		c, p78loc_6311
		jr		nz, p78loc_619D
		ld		a, (OP4M)
		cp		21h ; '!'
		jp		nz, Page0Call_24E1
		jp		p78loc_6311
; ---------------------------------------------------------------------------

p78loc_619D:
		cp		72h ; 'r'

p78loc_619F:
		jp		z, p78loc_6311
; End of function p78sub_6171


; =============== S U B	R O U T	I N E =======================================


p78sub_61A2:








		ld		a, (OP4M)
		cp		2Ah ; '*'
		jr		nz, p78loc_61BB
		call	CkOP1Real
		call	p78sub_6557
		cp		8
		jp		nc, ErrDimension
		ld		hl, (chkDelPtr3)
		ld		a, (hl)
		jp		p78loc_6475
; ---------------------------------------------------------------------------

p78loc_61BB:
		call	p78sub_6545
		jp		z, p78loc_6568
		call	CkOP1Real
		jp		nz, ErrDataType

p78loc_61C7:
		ld		a, (OP4M)
		cp		0Ah
		jr		c, p78loc_6220
		cp		0Eh
		jr		nc, p78loc_61EE
		push	af
		call	p78sub_6227
		rst		18h
		pop		af
		ld		hl, p78loc_61EB
		call	pushErrorHandleR
		cp		0Ch
		push	af
		call	nc, j_CPTDELY
		pop		af
		call	c, j_CPTDELX
		call	popErrorHandleR
p78loc_61EB:
		jp		PopRealO1
; ---------------------------------------------------------------------------

p78loc_61EE:
		cp		1Ah
		jr		c, p78sub_6227
		jr		nz, p78loc_6203
		call	PopRealO1
		ld		hl, (chkDelPtr1)
		call	STOCMPREALS
		ret		z
		set		reTable, (iy+tblFlags)
		ret
; ---------------------------------------------------------------------------

p78loc_6203:
		cp		21h ; '!'
		jr		nc, p78loc_6219
		cp		1Dh
		jp		c, p78loc_62DB
		call	PopRealO1
		call	j_RndGuard
		call	CKPosInt
		jr		z, p78loc_622D
		jr		p78loc_6235
; ---------------------------------------------------------------------------

p78loc_6219:
		cp		26h ; '&'
		jr		nc, p78loc_6238
		call	ErrD_OP1_0

p78loc_6220:
		jp		p78sub_6297
; End of function p78sub_61A2

; ---------------------------------------------------------------------------

Page78_3381:
		ld		a, 0FFh

; =============== S U B	R O U T	I N E =======================================

; Attributes: thunk

p78sub_6225:
		jr		p78loc_622A
; End of function p78sub_6225


; =============== S U B	R O U T	I N E =======================================


p78sub_6227:
		call	PopRealO1

p78loc_622A:
		call	j_RndGuard

p78loc_622D:
		ld		a, (OP1+1)
		cp		0E4h ; '�'
		jp		c, p78loc_629A

p78loc_6235:
		jp		ErrDomain
; End of function p78sub_6227

; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p78sub_61A2

p78loc_6238:
		cp		28h ; '('
		jr		nc, p78loc_628B
		cp		26h ; '&'
		ld		hl, (pixWide_m_2)
		ld		h, 0
		ld		de, Xmin
		ld		b, 0Bh
		jr		z, p78loc_6257
		ld		a, (lcdTallP)
		sub		2
		ld		l, a
		ld		h, 0
		ld		de, Ymin
		ld		b, 0Dh

p78loc_6257:
		push	bc
		push	de
		call	j_SetXXXXOP2
		call	ErrD_OP1_0
		call	errd_op1notpos
		call	FPMult
		pop		hl
		call	Mov9ToOP2
		push	hl
		rst		30h
		ld		a, (OP1+1)
		cp		0E4h ; '�'
		jr		nc, p78loc_6235
		call	CkValidNum
		pop		hl
		pop		af
		ld		de, (chkDelPtr1)
		push	de
		ld		(chkDelPtr1), hl
		call	p78sub_6225
		pop		hl
		ld		(chkDelPtr1), hl
		jr		p78sub_6297
; END OF FUNCTION CHUNK	FOR p78sub_61A2
; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p78sub_6171

p78loc_6288:
		; p78sub_6171+1B9j ...
		jp		ErrDataType
; END OF FUNCTION CHUNK	FOR p78sub_6171
; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p78sub_61A2

p78loc_628B:
		cp		2Ah ; '*'
		jr		nc, p78loc_62B3
		call	OP2Set1
		call	cpop1op2
		jr		c, p78loc_6235
; END OF FUNCTION CHUNK	FOR p78sub_61A2

; =============== S U B	R O U T	I N E =======================================


p78sub_6297:
		; p78sub_61A2+E4j	...
		call	PopRealO1

p78loc_629A:
		ld		hl, (chkDelPtr1)
; End of function p78sub_6297


; =============== S U B	R O U T	I N E =======================================


p78sub_629D:
		push	hl
		call	STOCMPREALS
		pop		hl
		push	af
		res		6, (hl)
		bit		6, b
		jr		z, p78loc_62B1
		set		6, (hl)
		pop		af
		ret		z
		call	SetTblGraphDraw
		ret
; ---------------------------------------------------------------------------

p78loc_62B1:
		pop		af
		ret
; End of function p78sub_629D

; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p78sub_61A2

p78loc_62B3:
		cp		30h ; '0'
		jr		c, p78loc_62D3
		cp		32h ; '2'
		jr		nc, p78loc_62D3
		push	af
		call	ErrD_OP1_LE_0
		call	ErrD_OP1NotPosInt
		pop		af
		cp		30h ; '0'
		jr		nz, p78sub_6297
		rst		18h
		call	p78sub_6297
		call	PopRealO1
		ld		a, 31h ; '1'
		jp		StoSysTok
; ---------------------------------------------------------------------------

p78loc_62D3:
		; p78sub_61A2+117j
		cp		34h ; '4'
		jr		c, p78sub_6297
		cp		36h ; '6'
		jr		nc, p78loc_62E6

p78loc_62DB:
		call	j_RndGuard
		call	page0_14D1
		jp		nz, ErrDomain
		jr		p78sub_6297
; ---------------------------------------------------------------------------

p78loc_62E6:
		cp		38h ; '8'
		jr		nc, p78sub_6297
		call	j_RndGuard
		call	page0_14D1
		jp		nz, ErrDomain
		ld		a, (OP1+1)
		cp		81h ; '�'
		jp		nc, p78loc_6235
		ld		a, (OP1M)
		cp		90h ; '�'
		jp		nc, p78loc_6235
		ld		hl, (chkDelPtr1)
		res		6, (hl)
		call	IsFuncMode
		jr		z, p78sub_6297
		set		6, (hl)
		jr		p78sub_6297
; END OF FUNCTION CHUNK	FOR p78sub_61A2
; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p78sub_6171

p78loc_6311:
		ld		a, (OP4+1)
		ld		b, a
		call	CkOP1Real
		jr		nz, p78loc_632F

p78loc_631A:
		ld		a, b
		cp		72h ; 'r'
		jr		z, p78loc_6385
		cp		62h ; 'b'
		jr		z, p78loc_6385
		cp		0AAh ; '�'
		jp		z, p78loc_6288
		cp		5Ch ; '\'
		jp		nc, p78loc_6288
		jr		p78loc_6385
; ---------------------------------------------------------------------------

p78loc_632F:
		cp		0Ch
		jr		z, p78loc_631A
		cp		0Dh
		jr		z, p78loc_6362
		cp		0Bh
		jr		z, p78loc_6344
		cp		5
		jp		nc, ErrSyntax
		cp		4
		jr		nz, p78loc_635C

p78loc_6344:
		; p78sub_6171+1EDj
		ld		a, b
		cp		5Eh ; '^'
		jr		z, p78loc_6355
		cp		5Dh ; ']'
		jr		z, p78loc_6355
		cp		3Fh ; '?'
		jr		z, p78loc_637B
		cp		0AAh ; '�'
		jr		p78loc_636B
; ---------------------------------------------------------------------------

p78loc_6355:
		; p78sub_6171+1DAj
		call	FPSMINUS9
		ld		(hl), 3
		jr		p78loc_637B
; ---------------------------------------------------------------------------

p78loc_635C:
		cp		3
		jr		z, p78loc_6344
		cp		1

p78loc_6362:
		ld		a, b
		jr		nz, p78loc_6369
		cp		5Dh ; ']'
		jr		p78loc_636B
; ---------------------------------------------------------------------------

p78loc_6369:
		cp		5Ch ; '\'

p78loc_636B:
		; p78sub_6171+1F6j
		push	af
		cp		72h ; 'r'
		jr		nz, p78loc_6373

p78loc_6370:
		pop		af
		jr		p78loc_637B
; ---------------------------------------------------------------------------

p78loc_6373:
		cp		3Ah ; ':'
		jr		z, p78loc_6370
		pop		af
		jp		nz, p78loc_6288

p78loc_637B:
		; p78sub_6171+1E9j ...
		call	p78sub_7516
		ld		(chkDelPtr4), hl
		ld		(chkDelPtr2), de

p78loc_6385:
		; p78sub_6171+1B0j ...
		ld		a, (OP4)
		cp		0FFh
		jp		z, p78loc_643D
		call	CkOP1Real
		ld		hl, (chkDelPtr3)
		cp		4
		jr		nz, p78loc_63E4
		ld		a, (OP4+1)
		cp		5Dh ; ']'
		jr		nz, p78loc_63E4
		push	hl
		ld		hl, (chkDelPtr2)
		call	ldHLind
		ld		a, h
		or		l
		pop		hl
		jr		nz, p78loc_63B4
		res		3, (iy+1Ah)
		call	Page78_2EC5
		jp		p78loc_6510
; ---------------------------------------------------------------------------

p78loc_63B4:
		call	GET_FORM_NUM
		or		a
		jr		nz, p78loc_63C8
		call	p78sub_65DF
		push	af

p78loc_63BE:
		push	hl
		call	GET_FORM_NUM
		ld		(hl), 0
		pop		hl
		jp		p78loc_6506
; ---------------------------------------------------------------------------

p78loc_63C8:
		push	af
		rst		18h
		call	OP4ToOP6
		pop		hl
		push	hl
		ld		l, 3Fh ; '?'
		call	page0_1671
		call	StoOther
		ld		hl, (chkDelPtr3)
		ld		(hl), 3
		call	OP6ToOP1
		call	Page0Call_241E
		jr		p78loc_63BE
; ---------------------------------------------------------------------------

p78loc_63E4:
		; p78sub_6171+22Bj
		ld		a, (hl)
		push	af
		call	CHKDEL
		call	OP4ToOP1
		call	ISO1NONTEMPLST
		call	z, Page78_2EC5
		ld		a, (OP1+1)
		cp		0AAh ; '�'
		jr		nz, p78loc_6409
		ld		hl, (chkDelPtr3)
		ld		a, (hl)
		and		1Fh
		cp		4
		jr		z, p78loc_6419
		ld		a, (hl)
		and		0E0h ; '�'
		or		4
		ld		(hl), a

p78loc_6409:
		call	page0_18AE
		jr		nc, p78loc_6419
		ld		hl, (chkDelPtr3)
		ld		a, (hl)
		and		1Fh
		cp		3
		jr		z, p78loc_6419
		dec		(hl)

p78loc_6419:
		; p78sub_6171+29Bj ...
		call	page0_17E9
		jr		p78loc_6476
; ---------------------------------------------------------------------------

p78loc_641E:
		call	CreateCList
		jr		p78loc_646D
; ---------------------------------------------------------------------------

p78loc_6423:
		call	CreateCplx
		ld		(chkDelPtr1), de
		xor		a
		push	af
		call	POPMCPLXO1

p78loc_642F:
		ld		hl, (chkDelPtr1)
		or		1
		push	af
		ex		de, hl
		call	page0_1063
		pop		af
		jp		p78loc_64C4
; ---------------------------------------------------------------------------

p78loc_643D:
		call	CkOP1Real
		call	OP4ToOP1
		ld		hl, (chkDelPtr2)
		ld		e, (hl)
		inc		hl
		ld		d, (hl)
		ex		de, hl
		cp		1
		jr		c, p78loc_64AF
		jr		z, p78loc_646A
		cp		0Ch
		jr		z, p78loc_6423
		cp		0Dh
		jr		z, p78loc_641E
		cp		4
		jp		z, p78loc_64DF
		cp		0Bh
		jr		z, p78loc_64DF
		cp		3
		jr		c, p78loc_64DA
		jr		z, p78loc_64DF
		jp		ErrSyntax
; ---------------------------------------------------------------------------

p78loc_646A:
		call	CreateRList

p78loc_646D:
		; p78sub_6171+36Cj ...
		ld		(chkDelPtr1), de
		ld		(chkDelPtr3), hl
		xor		a
; END OF FUNCTION CHUNK	FOR p78sub_6171
; START	OF FUNCTION CHUNK FOR p78sub_61A2

p78loc_6475:
		push	af

p78loc_6476:
		call	popOP1
		ld		a, (OP1)
		ld		(OP4), a
		and		1Fh
		jr		z, p78loc_64BE
		cp		0Ch
		jr		z, p78loc_642F
		ld		hl, (chkDelPtr2)
		call	DataSize
		ld		b, d
		ld		c, e
		ld		de, (chkDelPtr1)
		ldir
		ld		a, (OP1+1)
		cp		24h ; '$'
		jr		nz, p78loc_64A1
		ld		hl, (chkDelPtr4)
		set		7, (hl)

p78loc_64A1:
		call	OP4ToOP1
		call	page0_18AE
		pop		hl
		push	hl
		call	c, Page0Call_380D
		pop		hl
		jr		p78loc_64C6
; END OF FUNCTION CHUNK	FOR p78sub_61A2
; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p78sub_6171

p78loc_64AF:
		call	CreateReal
		ld		(chkDelPtr3), hl
		ld		(chkDelPtr1), de
		xor		a
		push	af
		call	PopRealO1

p78loc_64BE:
		ld		hl, (chkDelPtr1)
		call	STOCMPREALS

p78loc_64C4:
		pop		hl
		ret		z

p78loc_64C6:
		bit		6, h
		ret		z
		bit		3, (iy+3)
		ret		nz
		call	page0_172A
		ret		nz
		bit		allowCursor, (iy+plotFlags)
		ret		nz
		jp		SetTblGraphDraw
; ---------------------------------------------------------------------------

p78loc_64DA:
		call	CreateRMat
		jr		p78loc_646D
; ---------------------------------------------------------------------------

p78loc_64DF:
		; p78sub_6171+2EEj ...
		ld		a, (OP1+1)
		cp		0AAh ; '�'
		jr		nz, p78loc_64EB
		call	CreateStrng
		jr		p78loc_646D
; ---------------------------------------------------------------------------

p78loc_64EB:
		cp		5Dh ; ']'
		jr		nz, p78loc_6521
		ld		hl, 0
		call	CreateRList
		ld		hl, (chkDelPtr2)
		call	ldHLind
		ld		a, h
		or		l
		jr		z, p78loc_6510
		call	CpyTo1FPST
		call	p78sub_65DF
		push	af

p78loc_6506:
		bit		6, (hl)
		call	nz, SetTblGraphDraw
		call	GET_FORM_NUM
		pop		af
		ld		(hl), a

p78loc_6510:
		; p78sub_6171+38Cj
		call	PopRealO1
		call	page0_1641
		jr		nz, p78loc_651B
		rst		10h
		res		7, (hl)

p78loc_651B:
		ld		a, 4
		ld		(OP1), a
		ret
; ---------------------------------------------------------------------------

p78loc_6521:
		push	hl
		ld		a, (OP1M)
		bit		5, a
		call	nz, CreatePair
		pop		hl
		call	CreateEqu
		jp		p78loc_646D
; END OF FUNCTION CHUNK	FOR p78sub_6171

; =============== S U B	R O U T	I N E =======================================


p78sub_6531:
		; p78sub_61A2+3E3p ...
		call	p78sub_654E
		ld		a, (hl)
		and		40h ; '@'
		ld		de, 1Bh
		add		hl, de
		add		a, 0Eh
		ld		(hl), a
		ret
; End of function p78sub_6531

p78loc_653F:
		.db		4
		.db		5
		.db		32h	; 2
		.db		8
		.db		9
		.db		33h	; 3

; =============== S U B	R O U T	I N E =======================================


p78sub_6545:
		; p78sub_664F+2Ep
		ld		hl, p78loc_653F
		ld		bc, 6
		cpir
		ret
; End of function p78sub_6545


; =============== S U B	R O U T	I N E =======================================


p78sub_654E:
		ld		hl, (chkDelPtr1)
		bit		6, (hl)
		call	nz, SetTblGraphDraw
		ret
; End of function p78sub_654E


; =============== S U B	R O U T	I N E =======================================


p78sub_6557:
		; p78sub_61A2:p78loc_6592p
		cp		1
		jp		nz, p78loc_661A
		call	p78sub_7516
		ld		(chkDelPtr4), hl
		ld		(chkDelPtr2), de
		ld		a, (de)
		ret
; End of function p78sub_6557

; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p78sub_61A2

p78loc_6568:
		ld		hl, (chkDelPtr1)
		call	j_CMP_NUM_INIT
		ld		(unk_91CF), a
		call	CkOP1Real
		jr		nz, p78loc_6581
		ld		a, (unk_91CF)
		cp		1
		call	nz, p78sub_6531
		jp		p78loc_61C7
; ---------------------------------------------------------------------------

p78loc_6581:
		cp		0Eh
		jr		nz, p78loc_6592
		call	p78sub_6531
		ld		hl, (chkDelPtr1)
		ld		a, (hl)
		and		40h ; '@'
		or		0Eh
		ld		(hl), a
		ret
; ---------------------------------------------------------------------------

p78loc_6592:
		call	p78sub_6557
		cp		3
		jp		nc, ErrDimension
		push	af
		rst		18h
		ld		hl, 91CFh
		cp		(hl)
		call	nz, p78sub_6531
		ld		b, 1
		ld		hl, (chkDelPtr1)
		push	hl
		ld		a, (hl)
		ld		de, 1Bh
		add		hl, de
		and		40h ; '@'
		or		(hl)
		ld		(hl), a
		pop		hl
		pop		af
		or		a
		jr		nz, p78loc_65BF
		ld		a, (hl)
		and		40h ; '@'
		or		0Eh
		ld		(hl), a
		jr		p78loc_65DC
; ---------------------------------------------------------------------------

p78loc_65BF:
		; p78sub_61A2+438j
		push	af
		push	bc
		push	hl
		ld		l, b
		ld		h, 0
		ld		de, (chkDelPtr2)
		call	j_GetLToOP1
		pop		hl
		push	hl
		call	p78sub_629D
		pop		hl
		ld		de, 1Bh
		add		hl, de
		pop		bc
		inc		b
		pop		af
		dec		a
		jr		nz, p78loc_65BF

p78loc_65DC:
		jp		PopRealO1
; END OF FUNCTION CHUNK	FOR p78sub_61A2

; =============== S U B	R O U T	I N E =======================================


p78sub_65DF:
		; p78sub_6171+391p
		rst		18h
		call	OP4ToOP6
		call	p78sub_74DA
		ld		h, a
		ld		l, 3Fh ; '?'
		call	page0_1671
		call	StoOther
		ld		hl, (chkDelPtr3)
		ld		(hl), 3
		ld		a, (OP1M)
		push	af
		call	Page0Call_25E7
		or		(hl)
		ld		(hl), a
		call	OP6ToOP1
		rst		10h
		pop		af
		push	hl
		push	af
		call	GET_FORM_NUM
		pop		af
		ld		(hl), a
		pop		hl
		ret
; End of function p78sub_65DF


; =============== S U B	R O U T	I N E =======================================


ErrOnCertainTypes:
		; ParseInpGraphReset+69Ep ...
		cp		0FFh
		ret		z
		and		0Fh
		cp		5
		ret		c
		cp		0Eh
		jr		nc, p78loc_661A
		cp		0Bh
		ret		nc

p78loc_661A:
		; ErrOnCertainTypes+Aj
		jp		ErrDataType
; End of function ErrOnCertainTypes


; =============== S U B	R O U T	I N E =======================================


CreatePair:
		push	hl
		ld		e, 10h
		ld		d, 0
		add		hl, de
		call	ErrNotEnoughMem
		rst		18h
		ld		a, (OP1M)
		xor		1
		ld		(OP1M), a
		ld		hl, 0
		call	CreateEqu
		call	PopRealO1
		pop		hl
		ret
; End of function CreatePair

; ---------------------------------------------------------------------------

RclAns:
		call	AnsName
		jr		RclVarSym
; ---------------------------------------------------------------------------

RclY:
		call	YName
		jr		RclVarSym
; ---------------------------------------------------------------------------

RclN:
		call	RECURNNAME
		jr		RclVarSym

; =============== S U B	R O U T	I N E =======================================


RclX:
		call	XName

RclVarSym:
		call	FIND_E_UNDEF
; End of function RclX


; =============== S U B	R O U T	I N E =======================================


p78sub_664F:




		ld		a, (OP1+1)
		cp		63h ; 'c'
		jr		nz, p78loc_66B2
		ld		a, (OP1M)
		cp		2Ah ; '*'
		jr		nz, p78loc_667C
		call	p78sub_6661
		ret
; End of function p78sub_664F


; =============== S U B	R O U T	I N E =======================================


p78sub_6661:
		; p78sub_664F+Ep
		ld		hl, 91E0h
		ld		a, 1
		call	DataSize
		push	de
		call	ldHLind
		call	page0_1847
		call	j_CREATETLIST
		pop		bc
		ld		hl, 91E0h
		ldir
		jp		OP4ToOP1
; End of function p78sub_6661

; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p78sub_664F

p78loc_667C:
		push	hl
		call	p78sub_6545
		pop		hl
		jr		nz, p78loc_66B2
		ex		de, hl
		push	hl
		call	j_CMP_NUM_INIT
		push	af
		ld		l, a
		ld		h, 0
		call	page0_1847
		call	j_CREATETLIST
		pop		af
		pop		hl
		inc		de
		inc		de
		push	hl
		inc		a

p78loc_6698:
		dec		a
		jr		z, p78loc_66A4
		call	mov9B2
		ld		bc, 12h
		add		hl, bc
		jr		p78loc_6698
; ---------------------------------------------------------------------------

p78loc_66A4:
		pop		hl
		call	page0_172A
		jr		z, p78loc_66AC
		set		6, (hl)

p78loc_66AC:
		call	OP4ToOP1
		jp		p78sub_66D7
; ---------------------------------------------------------------------------

p78loc_66B2:
		call	CkOP1Real
		jr		z, p78loc_66C1
		cp		0Ch
		ret		nz
		ex		de, hl
		rst		20h
		inc		de
		inc		de
		jp		mov9B2
; ---------------------------------------------------------------------------

p78loc_66C1:
		ex		de, hl
		jr		p78loc_66D0
; END OF FUNCTION CHUNK	FOR p78sub_664F
; ---------------------------------------------------------------------------

RclSysTok:
		call	VARSYSADR
		call	page0_172A
		jr		z, p78loc_66D0
		ex		de, hl
		set		6, (hl)
		ex		de, hl
; START	OF FUNCTION CHUNK FOR p78sub_664F

p78loc_66D0:
		rst		20h
		ld		hl, OP1
		res		6, (hl)
		ret
; END OF FUNCTION CHUNK	FOR p78sub_664F

; =============== S U B	R O U T	I N E =======================================


p78sub_66D7:
		ld		b, 1
; End of function p78sub_66D7


; =============== S U B	R O U T	I N E =======================================


p78sub_66D9:
		; p78sub_6984+146p
		bit		allowCursor, (iy+plotFlags)
		jr		nz, p78loc_66E3
		call	page0_172A
		ret		z

p78loc_66E3:
		call	IsRecursiveMode
		ret		nz
		ld		hl, (unk_9665)
		ld		a, h
		or		l
		ret		nz
		ld		a, (OP1)
		and		1Fh
		call	IS_A_LSTorCLST
		ret		nz
		rlc	b
		jr		z, p78loc_6704
		call	Page0Call_241E
		ld		(chkDelPtr1), de
		ld		(chkDelPtr3), hl

p78loc_6704:
		ld		a, (OP1+1)
		cp		24h ; '$'
		jr		nz, p78loc_6710
		ld		hl, (chkDelPtr3)
		set		7, (hl)

p78loc_6710:
		ld		hl, (chkDelPtr1)
		ld		e, (hl)
		inc		hl
		ld		d, (hl)
		ld		a, d
		or		e
		jp		z, ErrDimension
		ld		a, (mcxCurApp)
		cp		4Ah ; 'J'
		jr		nz, p78loc_672F
		call	Bit_VertSplit
		jr		z, p78loc_6784
		bit		splitOverride, (iy+graphFlags2)
		jr		z, p78loc_6784
		jr		p78loc_673B
; ---------------------------------------------------------------------------

p78loc_672F:
		bit		2, (iy+1Fh)
		jr		nz, p78loc_6784
		bit		6, (iy+15h)
		jr		nz, p78loc_6784

p78loc_673B:
		ld		hl, (unk_9810)
		ld		a, l
		or		h
		jr		nz, p78loc_6758
		ld		(unk_9810), de
		bit		allowCursor, (iy+plotFlags)
		jr		z, p78loc_675E
		bit		5, (iy+3)
		jr		z, p78loc_6784
		ld		(unk_980E), de
		jr		p78loc_6784
; ---------------------------------------------------------------------------

p78loc_6758:
		or		a
		sbc		hl, de
		jp		nz, ErrDimMismatch

p78loc_675E:
		call	page0_172A
		jr		z, p78loc_6784
		bit		allowCursor, (iy+plotFlags)
		jr		nz, p78loc_6784
		ld		hl, (unk_980E)
		or		a
		sbc		hl, de
		push	af
		ld		a, (curGX2)
		ld		hl, (EQS)
		ld		de, 12h
		add		hl, de
		call	isInSet
		ld		b, a
		pop		af
		ld		a, b
		jr		nc, p78loc_678F
		or		(hl)
		ld		(hl), a

p78loc_6784:
		ld		de, (chkDelPtr1)
		ld		hl, (unk_980E)
		call	j_GetLToOP1
		ret
; ---------------------------------------------------------------------------

p78loc_678F:
		push	af
		cpl
		and		(hl)
		ld		(hl), a
		pop		af
		jr		z, p78loc_6784
		jp		ErrOverflow
; End of function p78sub_66D9

; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR ParseInpGraphReset

p78loc_6799:
		call	p78sub_703E
		jp		nz, ErrSyntax

p78loc_679F:
		xor		a
		call	p78sub_689B
		ei
		call	POPOPER
		call	p78sub_703E
		jr		nz, p78loc_67B2
		call	IsOP1Num
		call	nz, StoAns

p78loc_67B2:
		call	BRKINC
		or		a
		jr		nz, p78loc_67CD

p78loc_67B8:
		; ParseInpGraphReset+EA8j
		call	POP2BOPER
		push	bc
		call	CKPARSEND
		ret		z
		call	POP2BOPER
		pop		hl
		xor		a
		call	p78sub_7001
		call	POPOPER
		jr		p78loc_67B8
; ---------------------------------------------------------------------------

p78loc_67CD:
		call	p78sub_5B18
		ld		de, (cleanTmp)
		call	j_FixTempCnt
		jp		p78loc_595E
; ---------------------------------------------------------------------------

p78loc_67DA:
		; ParseInpGraphReset+A1j ...
		call	IsOP1Num
		jp		z, ErrSyntax
		ld		hl, 1
		call	p78sub_6984
		set		numOP1, (iy+ParsFlag2)
		jr		p78loc_684A
; ---------------------------------------------------------------------------

p78loc_67EC:
		; ParseInpGraphReset+14C9j ...
		push	af
		call	p78sub_688A
		pop		af
		cp		22h ; '"'
		jr		c, p78loc_684A
		cp		29h ; ')'
		jr		nc, p78loc_684A
		call	STEQARG
		call	BRKINC
		ld		d, a
		call	PUSHNUM
		call	CKFETCHVAR
		push	af
		call	STOTYPEARG
		call	p78sub_7370
		ld		a, (OP1+1)
		cp		62h ; 'b'
		jr		z, p78loc_681C
		cp		41h ; 'A'
		jr		c, p78loc_6836
		cp		5Ch ; '\'
		jr		nc, p78loc_6836

p78loc_681C:
		pop		af
		jr		z, p78loc_6833
		cp		2Bh ; '+'
		jr		z, p78loc_6833
		cp		11h
		jr		z, p78loc_6833
		cp		0F4h ; '�'
		jr		nc, p78loc_682F
		cp		0F2h ; '�'
		jr		nc, p78loc_6833

p78loc_682F:
		cp		5
		jr		nc, p78loc_6836

p78loc_6833:
		; ParseInpGraphReset+EFEj ...
		jp		p78loc_5BAF
; ---------------------------------------------------------------------------

p78loc_6836:
		; ParseInpGraphReset+EF7j ...
		jp		ErrSyntax
; ---------------------------------------------------------------------------

p78loc_6839:
		call	p78sub_703E
		jr		nz, p78loc_6836
		call	NXTFETCH
		call	p78sub_70B8
		ld		a, 4

p78loc_6846:
		; ParseInpGraphReset:p78loc_5D72j
		call	p78sub_689B
		ei

p78loc_684A:
		; ParseInpGraphReset+290j ...
		call	BRKINC
		jp		p78loc_5974
; ---------------------------------------------------------------------------

p78loc_6850:
		ld		a, 10h

p78loc_6852:
		push	af
		call	p78sub_6895

p78loc_6856:
		pop		af
		call	PUSHOPER

p78loc_685A:
		res		numOP1, (iy+ParsFlag2)
		jr		p78loc_684A
; ---------------------------------------------------------------------------

p78loc_6860:
		cp		0B5h ; '�'
		call	z, p78sub_70D9
		call	p78sub_688A
		jr		p78loc_684A
; END OF FUNCTION CHUNK	FOR ParseInpGraphReset

; =============== S U B	R O U T	I N E =======================================


p78sub_686A:
		ld		hl, p78loc_687B
		ld		bc, 0Fh
		cpir
		ret		nz
; End of function p78sub_686A


; =============== S U B	R O U T	I N E =======================================
p78sub_6873:
		ld		hl, (unk_9665)
		inc		hl
		ld		(unk_9665), hl
		ret
; End of function p78sub_6873

p78loc_687B:
		.db		19h
		.db		1Ah
		.db		0B6h	; �
		.db		0B7h	; �
		.db		0E3h	; �
		.db		0E4h	; �
		.db		0B5h	; �
		.db		21h	; !
		.db		1Fh
		.db		0CEh	; �
		.db		0CFh	; �
		.db		0DBh	; �
		.db		0DCh	; �
		.db		8Dh	; 
		.db		90h	; �

; =============== S U B	R O U T	I N E =======================================


p78sub_688A:
		; ParseInpGraphReset+60Ap ...
		push	af
		call	p78sub_6895
		pop		af
		push	af
		call	p78sub_686A
		jr		p78loc_68D0
; End of function p78sub_688A


; =============== S U B	R O U T	I N E =======================================


p78sub_6895:
		; ParseInpGraphReset:p78loc_5B92p	...
		ld		a, 82h ; '�'
		call	IsOP1Num
		ret		z
; End of function p78sub_6895


; =============== S U B	R O U T	I N E =======================================


p78sub_689B:
		; ParseInpGraphReset:p78loc_6846p	...
		ei
		ld		d, a
		cp		0F4h ; '�'
		jr		nc, p78loc_68A6
		cp		0F2h ; '�'
		jr		c, p78loc_68A6
		xor		a

p78loc_68A6:
		and		0F0h ; '�'
		ld		e, a
		call	p78sub_7020
		or		a
		jr		nz, p78loc_68E2
		ld		a, d
		or		a
		ret		z
		call	IsOP1Num
		jp		z, ErrSyntax
		cp		0F4h ; '�'
		jr		nc, p78loc_68BF
		cp		0F2h ; '�'
		ret		nc

p78loc_68BF:
		cp		5
		jr		nc, p78loc_68D8
		ld		a, d
		cp		4
		ret		c
; End of function p78sub_689B


; =============== S U B	R O U T	I N E =======================================


PUSHNUM:
		; ParseInpGraphReset+496p ...



		ld		a, 11h
		cp		d
		jr		z, p78loc_690D
		push	de
		call	PushOP1

p78loc_68D0:
		res		numOP1, (iy+ParsFlag2)
		pop		af
		jp		PUSHOPER
; ---------------------------------------------------------------------------

p78loc_68D8:
		cp		12h
		jr		c, p78loc_690D
		cp		2Bh ; '+'
		jr		z, p78loc_690D
		jr		PUSHNUM
; ---------------------------------------------------------------------------

p78loc_68E2:
		ld		b, a
		cp		4
		jr		z, p78loc_690D
		call	IsOP1Num
		jr		nz, p78loc_68F5
		cp		6
		jr		nz, p78loc_690D
		ld		a, d
		cp		8
		jr		nc, p78loc_690D

p78loc_68F5:
		ld		a, d
		cp		2Bh ; '+'
		jr		nz, p78loc_691D
		ld		a, b
		cp		2Bh ; '+'
		jr		nz, p78loc_6910
		call	p78sub_7026
		cp		10h
		jp		nz, PUSHNUM
		inc		hl
		ld		a, (hl)
		cp		1
		jr		z, PUSHNUM

p78loc_690D:
		jp		ErrSyntax
; End of function PUSHNUM

; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR PUSHNUM

p78loc_6910:
		cp		2Ah ; '*'
		jp		c, PUSHNUM
		call	p78sub_74C9
		jr		nc, PUSHNUM
		jp		p78loc_694C
; ---------------------------------------------------------------------------

p78loc_691D:
		cp		7
		jr		z, p78loc_6925
		cp		9
		jr		nz, p78loc_692E

p78loc_6925:
		ld		a, b
		cp		10h
		jr		c, p78loc_692E
		cp		2Ah ; '*'
		jr		c, p78loc_690D

p78loc_692E:
		ld		a, b
		call	p78sub_74C9
		jr		c, p78loc_693B
		ld		c, a
		ld		a, 28h ; '('

p78loc_6937:
		cp		e
		ld		a, c
		jr		p78loc_6949
; ---------------------------------------------------------------------------

p78loc_693B:
		cp		89h ; '�'
		jr		c, p78loc_6948
		cp		93h ; '�'
		jr		nc, p78loc_6948
		ld		c, a
		ld		a, 0C2h	; '�'
		jr		p78loc_6937
; ---------------------------------------------------------------------------

p78loc_6948:
		cp		e

p78loc_6949:
		jp		c, PUSHNUM

p78loc_694C:
		ld		e, b
		push	de
		call	POPOPER
		ld		hl, (numArguments)
		call	p78sub_74C9
		jr		nc, p78loc_696E
		cp		89h ; '�'
		jr		c, p78loc_6961
		cp		93h ; '�'
		jr		c, p78loc_696E

p78loc_6961:
		cp		3Ch ; '<'
		jr		c, p78loc_696E
		cp		0A1h ; '�'
		jr		c, p78loc_696D
		cp		0E0h ; '�'
		jr		c, p78loc_696E

p78loc_696D:
		inc		hl

p78loc_696E:
		call	p78sub_6984
		pop		de
		ld		a, d
		cp		11h
		jp		nz, p78sub_689B
		ld		a, e
		cp		2Bh ; '+'
		ret		c
		call	p78sub_74C9
		ret		nc
		ld		a, d
		jp		p78sub_689B
; END OF FUNCTION CHUNK	FOR PUSHNUM

; =============== S U B	R O U T	I N E =======================================


p78sub_6984:
		; ParseInpGraphReset+EC0p ...





		cp		8
		jp		z, p78loc_6A90
		rlc	h
		jp		nz, ErrArgument
		cp		6
		jp		z, p78loc_6A34
		cp		1
		jp		z, p78loc_6FD7
		cp		10h
		jp		z, p78loc_6A27
		cp		29h ; ')'
		jp		z, p78loc_6AD1
		cp		2Bh ; '+'
		jp		z, p78loc_69F9
		cp		84h ; '�'
		jr		c, p78loc_69B4
		cp		89h ; '�'
		jr		nc, p78loc_69B4
		call	Page0Call_2D75
		jr		p78loc_69D4
; ---------------------------------------------------------------------------

p78loc_69B4:
		ld		b, a
		ld		a, 1
		bit		1, (iy+36h)
		call	nz, Page0Call_2D69
		jr		nz, p78loc_69D4
		ld		a, b
		dec		l
		jr		z, p78loc_69E5
		dec		l
		jr		z, p78loc_69EA
		dec		l
		jr		z, p78loc_69EF
		dec		l
		jr		z, p78loc_69F4
		dec		l
		jp		nz, ErrArgument
		call	j_FiveExec

p78loc_69D4:
		call	CkValidNum
		call	p78sub_66D7

p78loc_69DA:
		; p78sub_6984:p78loc_6C95j
		set		0, (iy+6)
		ld		hl, 1
		ld		(numArguments), hl
		ret
; ---------------------------------------------------------------------------

p78loc_69E5:
		call	j_UnOPExec
		jr		p78loc_69D4
; ---------------------------------------------------------------------------

p78loc_69EA:
		call	j_BinOPExec
		jr		p78loc_69D4
; ---------------------------------------------------------------------------

p78loc_69EF:
		call	j_ThreeExec
		jr		p78loc_69D4
; ---------------------------------------------------------------------------

p78loc_69F4:
		call	j_FourExec
		jr		p78loc_69D4
; ---------------------------------------------------------------------------

p78loc_69F9:
		ld		hl, (numArguments)
		inc		hl
		ld		(numArguments), hl
		call	p78sub_7020
		cp		2Bh ; '+'
		ret		nz
		call	POPOPER
		jr		p78loc_69F9
; End of function p78sub_6984


; =============== S U B	R O U T	I N E =======================================


p78sub_6A0B:
		ld		hl, (FPS)
		ld		de, 0FFF7h

p78loc_6A11:
		add		hl, de
		ld		a, (hl)
		and		1Fh
		jr		z, p78loc_6A21
		cp		0Ch
		jp		nz, ErrDataType
		set		1, (iy+6)
		add		hl, de

p78loc_6A21:
		dec		bc
		ld		a, c
		or		b
		jr		nz, p78loc_6A11
		ret
; End of function p78sub_6A0B

; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p78sub_6984

p78loc_6A27:
		push	hl
		call	p78sub_7020
		cp		1
		pop		hl
		jp		z, p78loc_6FD4
		dec		l
		jr		z, p78loc_69DA

p78loc_6A34:
		bit		6, (iy+6)
		jr		z, p78loc_6A64
		call	IsOP1Num
		jp		z, ErrSyntax
		res		6, (iy+6)
		push	hl
		rst		18h
		pop		bc
		ld		a, (unk_9663)
		or		a
		jr		nz, p78loc_6A51
		ld		a, c
		ld		(unk_9663), a

p78loc_6A51:
		cp		c
		jp		nz, ErrDimension
		bit		7, (iy+6)
		jp		z, ErrSyntax
		res		numOP1, (iy+ParsFlag2)
		ld		a, 7
		jr		p78loc_6A82
; ---------------------------------------------------------------------------

p78loc_6A64:
		call	IsOP1Num
		jp		nz, ErrSyntax
		res		7, (iy+6)
		ld		hl, (unk_9663)
		call	CreateTempRMat
		jr		p78loc_6A76

p78loc_6A76:
		call	p78sub_6CDA
		call	OP4ToOP1
		ld		a, 7

p78loc_6A7E:
		set		numOP1, (iy+ParsFlag2)

p78loc_6A82:
		ld		hl, 1
		ld		(numArguments), hl
		pop		de
		pop		de
		cp		d
		ret		z
		ld		a, d
		jp		p78sub_689B
; ---------------------------------------------------------------------------

p78loc_6A90:
		res		5, (iy+6)
		ld		(unk_9663), hl
		ld		de, 3E8h
		or		a
		sbc		hl, de
		jp		nc, ErrDimension
		call	PushOP1
		ld		bc, (unk_9663)
		call	p78sub_6A0B
		ld		hl, (unk_9663)
		bit		1, (iy+6)
		jr		z, p78loc_6AB8
		call	CREATETCLIST
		jr		p78loc_6ABB
; ---------------------------------------------------------------------------

p78loc_6AB8:
		call	CreateTempRList

p78loc_6ABB:
		ld		(chkDelPtr1), de
		ld		(chkDelPtr3), hl
		call	p78sub_6D35
		call	OP4ToOP1
		ld		b, 0
		call	p78sub_66D9
		ld		a, 9
		jr		p78loc_6A7E
; ---------------------------------------------------------------------------

p78loc_6AD1:
		ld		a, l
		cp		3
		jp		nc, ErrArgument
		ld		(OP2M), a
		ld		b, a
		push	bc
		call	p78sub_7020
		ld		(OP2+1), a
		jr		p78loc_6AE8
; ---------------------------------------------------------------------------

p78loc_6AE4:
		push	bc
		call	popOP1

p78loc_6AE8:
		ld		hl, 3E7h
		call	ConvDim00
		ld		b, d
		ld		c, e
		call	PUSH2BOPER
		pop		bc
		djnz	p78loc_6AE4
		call	PopRealO1
		ld		a, (OP2+1)
		cp		4
		jp		nz, p78loc_6C6F
		pop		bc
		pop		de
		push	de
		push	bc
		rlc	d
		call	nz, CKENDLINERR
		call	p78sub_6B2B
		set		numOP1, (iy+ParsFlag2)
		ld		hl, 1
		ld		(numArguments), hl
		jp		POPOPER
; END OF FUNCTION CHUNK	FOR p78sub_6984
; ---------------------------------------------------------------------------

StMatEl:
		push	de
		call	PUSH2BOPER
		pop		bc
		ld		a, 2
		jr		p78loc_6B25

; =============== S U B	R O U T	I N E =======================================


STLSTVECEL:
		ld		a, 1

p78loc_6B25:
		ld		(OP2M), a
		call	PUSH2BOPER
; End of function STLSTVECEL


; =============== S U B	R O U T	I N E =======================================


p78sub_6B2B:
		call	OP1ToOP4
		ld		a, 0FFh
		ld		(OP1), a
		ld		a, (OP1+1)
		cp		63h ; 'c'
		jr		z, p78loc_6B3F
		call	Page0Call_241E
		jr		p78loc_6B42
; ---------------------------------------------------------------------------

p78loc_6B3F:
		call	p78sub_7516

p78loc_6B42:
		ld		(OP4), a
		ld		a, (hl)
		push	af
		ld		(chkDelPtr3), hl
		ld		(chkDelPtr1), de
		ld		a, (OP1+1)
		cp		5Ch ; '\'
		jr		c, p78loc_6B60
		jp		z, p78loc_6C37
		cp		5Dh ; ']'
		jr		z, p78loc_6B92
		cp		63h ; 'c'
		jr		z, p78loc_6B92

p78loc_6B60:
		jp		ErrDataType
; ---------------------------------------------------------------------------

p78loc_6B63:
		call	p78sub_6CBB
		ld		hl, 1
		or		a
		sbc		hl, bc
		jr		nz, p78loc_6BB1
		cp		0
		jr		z, p78loc_6B76
		cp		0Ch
		jr		nz, p78loc_6B60

p78loc_6B76:
		push	af
		call	PUSH2BOPER
		ld		hl, 1
		pop		af
		or		a
		push	af
		call	z, CreateRList
		pop		af
		call	nz, CreateCList
		ld		(chkDelPtr1), de
		xor		a
		push	af
		call	p78sub_6CC3
		jr		p78loc_6B99
; ---------------------------------------------------------------------------

p78loc_6B92:
		pop		af
		jr		c, p78loc_6B63
		push	af
		call	p78sub_6CBB

p78loc_6B99:
		cp		0
		jr		z, p78loc_6BAB
		cp		0Ch
		jr		nz, p78loc_6B60
		push	af
		ld		a, (OP4+1)
		cp		63h ; 'c'
		jp		z, ErrDataType
		pop		af

p78loc_6BAB:
		inc		hl
		or		a
		sbc		hl, bc
		jr		nc, p78loc_6BB4

p78loc_6BB1:
		jp		ErrDimension
; ---------------------------------------------------------------------------

p78loc_6BB4:
		push	bc
		push	af
		and		8
		ld		b, a
		ld		a, (OP4)
		and		8
		cp		b
		jr		z, p78loc_6BDE
		bit		3, a
		jr		z, p78loc_6BCD
		call	CpyTo1FPST
		call	page0_104B
		jr		p78loc_6BE4
; ---------------------------------------------------------------------------

p78loc_6BCD:
		call	PushRealO4
		ld		de, (chkDelPtr1)
		call	j_ConvLrToLc
		ld		(chkDelPtr1), de
		call	PopRealO4

p78loc_6BDE:
		call	popOP1
		call	PushOP1

p78loc_6BE4:
		ld		de, (chkDelPtr1)
		pop		af
		jr		nz, p78loc_6C20
		ld		de, (chkDelPtr1)
		ld		a, (OP4+1)
		cp		63h ; 'c'
		jr		nz, p78loc_6C07
		ld		(insDelPtr), de
		pop		hl
		push	hl
		ld		a, l
		cp		8
		jr		nc, p78loc_6BB1
		ld		(de), a
		call	popOP1
		jr		p78loc_6C19
; ---------------------------------------------------------------------------

p78loc_6C07:
		call	PushOP1
		ld		de, (chkDelPtr1)
		ld		a, (OP4)
		call	j_IncLstSize
		call	popOP1
		jr		p78loc_6C1C
; ---------------------------------------------------------------------------

p78loc_6C19:
		call	PushOP1

p78loc_6C1C:
		ld		de, (insDelPtr)

p78loc_6C20:
		pop		hl
		call	j_PutToL
		call	OP4ToOP1
		call	page0_17E9
		call	Page78_2EC5

p78loc_6C2D:
		call	popOP1
		pop		af
		bit		6, a
		ret		z
		jp		SetTblGraphDraw
; ---------------------------------------------------------------------------

p78loc_6C37:
		pop		af
		jp		c, ErrUndefined
		push	af
		ld		a, (OP2M)
		cp		2
		jp		nz, ErrArgument
		call	p78sub_6CC3
		cp		0
		jp		nz, p78loc_6B60
		push	hl
		push	bc
		call	POP2BOPER
		pop		hl
		ld		b, l
		push	bc
		pop		hl
		ex		(sp), hl
		ld		a, l
		cp		c
		jr		c, p78loc_6C5C
		ld		a, h
		cp		b

p78loc_6C5C:
		jp		c, ErrDimension
		call	popOP1
		call	PushOP1
		pop		bc
		ld		de, (chkDelPtr1)
		call	p78sub_6D4B
		jr		p78loc_6C2D
; End of function p78sub_6B2B

; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p78sub_6984

p78loc_6C6F:
		call	p78sub_7516
		ld		(chkDelPtr1), de
		call	page0_172A
		jr		z, p78loc_6C7D
		set		6, (hl)

p78loc_6C7D:
		and		1Fh
		cp		1
		jr		z, p78loc_6C98
		cp		0Dh
		jr		z, p78loc_6C98
		ld		a, (OP2M)
		cp		2
		jp		nz, ErrArgument
		call	p78sub_6CA6
		call	j_GetMToOP1

p78loc_6C95:
		jp		p78loc_69DA
; ---------------------------------------------------------------------------

p78loc_6C98:
		; p78sub_6984+301j
		call	p78sub_6CBB
		sbc		hl, bc
		jr		c, p78loc_6CB8
		ld		h, b
		ld		l, c
		call	j_GetLToOP1
		jr		p78loc_6C95
; END OF FUNCTION CHUNK	FOR p78sub_6984

; =============== S U B	R O U T	I N E =======================================


p78sub_6CA6:
		call	p78sub_6CC3
		push	hl
		push	bc
		call	POP2BOPER
		pop		hl
		ld		b, l
		pop		hl
		ld		a, l
		cp		c
		jr		c, p78loc_6CB8
		sbc		hl, bc
		ret		nc

p78loc_6CB8:
		jp		ErrDimension
; End of function p78sub_6CA6


; =============== S U B	R O U T	I N E =======================================


p78sub_6CBB:
		; p78sub_6B2B+6Bp	...
		ld		a, (OP2M)
		cp		1
		jp		nz, ErrArgument
; End of function p78sub_6CBB


; =============== S U B	R O U T	I N E =======================================


p78sub_6CC3:
		; p78sub_6B2B+119p ...
		call	POP2BOPER
		ld		h, b
		ld		l, c
		call	CHK_HL_999
		call	FPSMINUS9
		ld		a, (hl)
		and		0Fh
		ld		hl, (chkDelPtr1)
		ld		e, (hl)
		inc		hl
		ld		d, (hl)
		ex		de, hl
		dec		de
		ret
; End of function p78sub_6CC3


; =============== S U B	R O U T	I N E =======================================


p78sub_6CDA:
		res		1, (iy+6)
		ld		hl, (unk_9663)
		push	de
		call	HTimesL
		pop		de
		push	hl
		ld		bc, (unk_9663)
		call	j_AdrMEle
		pop		bc

p78loc_6CEF:
		push	bc
		push	hl
		call	FPOPREAL
		ld		a, (hl)
		and		1Fh
		jr		nz, p78loc_6D13
		bit		1, (iy+6)
		jr		z, p78loc_6D26
		rst		20h
		pop		de
		ld		hl, 0FFF7h
		add		hl, de
		ex		de, hl
		push	de
		call	page0_104B
		pop		de
		call	page0_1063
		ld		hl, 0FFE5h
		jr		p78loc_6D2D
; ---------------------------------------------------------------------------

p78loc_6D13:
		bit		1, (iy+6)
		jp		z, ErrDataType
		pop		de
		call	mov9B2
		ld		hl, 0FFEEh
		add		hl, de
		push	hl
		call	FPOPREAL

p78loc_6D26:
		pop		de
		call	mov9B2
		ld		hl, 0FFEEh

p78loc_6D2D:
		add		hl, de
		pop		bc
		dec		bc
		ld		a, b
		or		c
		jr		nz, p78loc_6CEF
		ret
; End of function p78sub_6CDA


; =============== S U B	R O U T	I N E =======================================


p78sub_6D35:
		ld		hl, (unk_9663)
		call	j_AdrLEle
		ld		bc, (unk_9663)
		bit		1, (iy+6)
		jr		z, p78loc_6CEF
		ld		de, 9
		add		hl, de
		jr		p78loc_6CEF
; End of function p78sub_6D35


; =============== S U B	R O U T	I N E =======================================


p78sub_6D4B:
		ld		a, (de)
		push	af
		push	de
		call	j_AdrMEle
		ex		(sp), hl
		inc		hl
		inc		hl
		call	CkOP1Real
		jr		z, p78loc_6D93
		ld		a, (hl)
		and		1
		push	af
		rst		10h
		ex		de, hl
		ld		c, (hl)
		inc		hl
		ld		b, (hl)
		inc		hl
		ld		a, (hl)
		and		1
		pop		de
		pop		de

p78loc_6D68:
		push	bc
		push	hl
		bit		0, (hl)
		ld		l, c
		ld		h, 0
		jr		z, p78loc_6D72
		add		hl, hl

p78loc_6D72:
		call	HLTimes9
		ld		b, h
		ld		c, l
		pop		hl
		ldir
		pop		bc
		pop		af
		dec		b
		ret		z
		push	af
		push	bc
		push	hl
		sub		c
		bit		0, (hl)
		ld		l, a
		ld		h, 0
		jr		z, p78loc_6D8A
		add		hl, hl

p78loc_6D8A:
		call	HLTimes9
		add		hl, de
		ex		de, hl
		pop		hl
		pop		bc
		jr		p78loc_6D68
; ---------------------------------------------------------------------------

p78loc_6D93:
		pop		de
		pop		af
		jp		MovFrOP1
; End of function p78sub_6D4B


; =============== S U B	R O U T	I N E =======================================


p78sub_6D98:
		; ParseInpGraphReset+27Dp ...
		bit		allowProgTokens, (iy+newDispF)
		jp		z, ErrInvalid
		ret
; End of function p78sub_6D98

; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR ParseInpGraphReset

p78loc_6DA0:
		call	p78sub_6D98
		call	p78sub_702C
		call	p78sub_52FE
		jp		p78loc_6E9E

p78loc_6DAC:
		.db		0
		.db		80h	; �
		.db		27h	; '
		.db		18h
		.db		28h	; (
		.db		18h
		.db		28h	; (
		.db		45h	; E
		.db		90h	; �
; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR ParseInpGraphReset

p78loc_6DB5:
		call	p78sub_6895
		ld		hl, p78loc_6DAC
		rst		20h

p78loc_6DBC:
		jp		p78loc_5BAF
; ---------------------------------------------------------------------------

p78loc_6DBF:
		call	INCFETCH
		cp		6Dh ; 'm'

p78loc_6DC4:
		jp		z, ErrSyntax
		cp		6Ch ; 'l'
		jr		z, p78loc_6DC4
		cp		6Eh ; 'n'
		jr		c, p78loc_6DE6
		cp		0CEh ; '�'
		jr		nz, p78loc_6DD7
		ld		a, 5Fh ; '_'
		jr		p78loc_6E4A
; ---------------------------------------------------------------------------

p78loc_6DD7:
		cp		0DAh ; '�'
		jr		nz, p78loc_6DDE
		jp		p78loc_67DA
; ---------------------------------------------------------------------------

p78loc_6DDE:
		cp		0F6h ; '�'
		jp		c, ErrSyntax
		jp		Page0Call_2555
; ---------------------------------------------------------------------------

p78loc_6DE6:
		cp		20h ; ' '
		jr		nc, p78loc_6DEF
		add		a, 0CEh	; '�'
		jp		p78loc_67EC
; ---------------------------------------------------------------------------

p78loc_6DEF:
		cp		32h ; '2'
		jr		nc, p78loc_6E22
		cp		31h ; '1'
		jr		z, p78loc_6DB5
		cp		2Fh ; '/'
		jr		c, p78loc_6E00
		add		a, 0C3h	; '�'
		jp		p78loc_6ECE
; ---------------------------------------------------------------------------

p78loc_6E00:
		cp		25h ; '%'
		jr		nc, p78loc_6E1D
		push	af
		call	NXTFETCH
		cp		10h
		jr		z, p78loc_6E18
		call	p78sub_6895
		pop		af
		call	Page0Call_395D
		call	CkValidNum
		jr		p78loc_6DBC
; ---------------------------------------------------------------------------

p78loc_6E18:
		ld		(nextParseByte), bc
		pop		af

p78loc_6E1D:
		add		a, 64h ; 'd'
		jp		p78loc_67EC
; ---------------------------------------------------------------------------

p78loc_6E22:
		cp		5Ch ; '\'
		jr		c, p78loc_6E32
		cp		64h ; 'd'
		jp		c, ErrInvalid
		cp		0F6h ; '�'
		jp		nc, Page0Call_2555
		sub		8

p78loc_6E32:
		add		a, 0BEh	; '�'
		jr		p78loc_6E3D
; ---------------------------------------------------------------------------

p78loc_6E36:
		ld		a, 0EFh	; '�'
		jr		p78loc_6E3D
; ---------------------------------------------------------------------------

p78loc_6E3A:
		call	p78sub_6D98

p78loc_6E3D:
		; ParseInpGraphReset+1515j
		sub		0BCh ; '�'

p78loc_6E3F:
		add		a, 0CEh	; '�'

p78loc_6E41:
		sub		7

p78loc_6E43:
		sub		0CEh ; '�'
		cp		14h
		call	c, p78sub_6D98

p78loc_6E4A:
		push	af
		call	p78sub_702C
		pop		af
		ld		c, 1
		jr		ExecClassCToken
; ---------------------------------------------------------------------------

p78loc_6E53:
		sub		2

p78loc_6E55:
		cp		85h ; '�'
		jr		z, p78loc_6E5E
		cp		93h ; '�'
		call	c, p78sub_6D98

p78loc_6E5E:
		push	af
		call	p78sub_702C
		pop		af
		cp		93h ; '�'
		jr		nc, p78loc_6E6C
		push	af
		call	CKENDLINERR
		pop		af

p78loc_6E6C:
		ld		c, 2

ExecClassCToken:
		; ParseInpGraphReset+15BFj
		ld		b, a
		ld		a, c
		cp		2
		jr		z, p78loc_6E7F
		cp		3
		jr		z, p78loc_6E84
		ld		hl, p78loc_4000
		ld		c, 1
		jr		p78loc_6E87
; ---------------------------------------------------------------------------

p78loc_6E7F:
		ld		hl, p78loc_47C2-(84h*2)
		jr		p78loc_6E87
; ---------------------------------------------------------------------------

p78loc_6E84:
		ld		hl, p78loc_6EE4-2

p78loc_6E87:
		; ParseInpGraphReset+155Fj
		ld		a, 2
		bit		1, (iy+36h)
		call	nz, Page0Call_2D69
		jr		nz, p78loc_6E9E
		ld		a, b
		ld		e, a
		ld		d, 0
		add		hl, de
		add		hl, de
		call	ldHLind
		call	p78sub_7001

p78loc_6E9E:
		; ParseInpGraphReset+156Dj ...
		jp		p78loc_684A
; ---------------------------------------------------------------------------

p78loc_6EA1:
		call	INCFETCH
		add		a, 7Eh ; '~'

p78loc_6EA6:
		sub		9

p78loc_6EA8:
		push	af
		call	p78sub_702C
		call	CKENDLINERR
		pop		af
		ld		c, 0
		ld		b, a
		ld		a, 2
		bit		1, (iy+36h)
		call	nz, Page0Call_2D69
		ld		a, b
		call	z, Page0Call_388B
		jr		p78loc_6E9E
; ---------------------------------------------------------------------------

p78loc_6EC2:
		call	p78sub_702C
		ld		b, 0
		ld		c, 1
		call	PUSH2BOPER
		jr		p78loc_6E9E
; ---------------------------------------------------------------------------

p78loc_6ECE:
		; ParseInpGraphReset+14DAj
		push	af
		call	CKENDLIN
		jp		nz, ErrSyntax
		pop		af
		call	p78sub_689B
		ei
		cp		0F2h ; '�'
		jr		c, p78loc_6EE0
		add		a, 12h

p78loc_6EE0:
		ld		c, 3
		jr		ExecClassCToken

p78loc_6EE4:
		.dw		p78loc_6F08
		.dw		p78loc_6F1A
		.dw		p78loc_6F0F
		.dw		p78loc_6EEE
		.dw		p78loc_6EF7
p78loc_6EEE:
		ld		a, (iy+0Bh)
		set		6, a
		res		7, a
		jr		p78loc_6EFE
p78loc_6EF7:
		ld		a, (iy+0Bh)
		set		7, a
		res		6, a

p78loc_6EFE:
		res		5, a
		ld		b, 0
		push	af
		call	CkOP1Real
		jr		p78loc_6F2B
p78loc_6F08:
		call	EOP1NotReal
		ld		b, 10h
		jr		p78loc_6F11
p78loc_6F0F:
		ld		b, 0

p78loc_6F11:
		ld		a, (iy+0Bh)
		set		2, a
		set		3, a
		jr		p78loc_6F23
p78loc_6F1A:
		ld		a, (iy+0Bh)
		res		2, a
		res		3, a
		ld		b, 0

p78loc_6F23:
		push	af
		call	CkOP1Real
		cp		3
		jr		c, p78loc_6F36

p78loc_6F2B:
		cp		0Ch
		jr		z, p78loc_6F36
		cp		0Dh
		jr		z, p78loc_6F36
		jp		ErrDataType
; ---------------------------------------------------------------------------

p78loc_6F36:
		pop		af
		res		4, a
		or		b
		ld		(iy+0Bh), a
		ret

; =============== S U B	R O U T	I N E =======================================


INCCURPCERREND:
		call	BRKINC
; End of function INCCURPCERREND


; =============== S U B	R O U T	I N E =======================================


ERREND:
		call	CKENDEXP
		ret		nz

p78loc_6F45:
		jp		ErrArgument
; End of function ERREND


; =============== S U B	R O U T	I N E =======================================


COMMAERRF:
		call	INCFETCH

COMMAERR:
		cp		2Bh ; '+'
		ret		z
		call	CKENDEXP

p78loc_6F51:
		jr		z, p78loc_6F45

p78loc_6F53:
		jp		ErrSyntax
; End of function COMMAERRF


; =============== S U B	R O U T	I N E =======================================


STEQARG2:
		; p78sub_46F7+5p ...
		call	PARSAHEAD
		or		a
		jr		INPARG
; End of function STEQARG2


; =============== S U B	R O U T	I N E =======================================


STEQARG:
		call	PARSAHEAD

INPARG:
		dec		bc
		ld		(nextParseByte), bc

STEQARG3:
		jr		nc, p78loc_6F69
		or		a
		jr		p78loc_6F51
; ---------------------------------------------------------------------------

p78loc_6F69:
		ex		de, hl
		ld		h, b
		ld		l, c
		or		a
		sbc		hl, de
		jr		z, p78loc_6F53
; End of function STEQARG


; =============== S U B	R O U T	I N E =======================================


STTMPEQ:
		push	hl
		ld		hl, basic_prog
		ld		a, (hl)
		and		1Fh
		call	equ_or_newequ
		jr		z, p78loc_6F83
		inc		hl
		call	CMPPRGNAMLEN1
		jr		p78loc_6F85
; ---------------------------------------------------------------------------

p78loc_6F83:
		ld		a, 3

p78loc_6F85:
		pop		hl
		push	hl
		push	af
		add		a, 4
		ld		e, a
		ld		d, 0
		add		hl, de
		call	CreateTempEqu
		inc		de
		inc		de
		ld		hl, basic_prog
		ld		a, (hl)
		ld		(de), a
		inc		de
		pop		af
		ld		(de), a
		inc		de
		ld		c, a
		ld		b, 0
		inc		hl
		ldir
		pop		bc
		ld		hl, (nextParseByte)
		inc		hl
		or		a
		sbc		hl, bc
		push	hl
		push	de
		ld		de, (basic_start)
		or		a
		sbc		hl, de
		ex		de, hl
		pop		hl
		ld		(hl), e
		inc		hl
		ld		(hl), d
		inc		hl
		ex		de, hl
		pop		hl
		ldir
		jp		OP4ToOP1
; End of function STTMPEQ


; =============== S U B	R O U T	I N E =======================================


FINDEOL:
		ld		hl, (nextParseByte)
		inc		hl
		push	hl
		call	p78sub_4137
		ld		h, b
		ld		l, c
		dec		bc
		ld		(nextParseByte), bc
		pop		bc
		or		a
		sbc		hl, bc
		ret
; End of function FINDEOL

; ---------------------------------------------------------------------------
; START	OF FUNCTION CHUNK FOR p78sub_6984

p78loc_6FD4:
		call	POPOPER

p78loc_6FD7:
		pop		de
		pop		af
		or		a
		jr		z, p78loc_6FE4
		cp		11h
		jp		nz, ErrSyntax
		call	CKENDLINERR

p78loc_6FE4:
		call	POPOPER

ExecClass3Token:
		ld		b, a
		ld		a, 3
		bit		1, (iy+36h)
		call	nz, Page0Call_2D69
		ld		a, b
		ret		nz
		ld		hl, p78loc_4E2A
		ld		e, a
		ld		d, 0
		add		hl, de
		add		hl, de
		call	ldHLind
		ld		a, (numArguments)
; END OF FUNCTION CHUNK	FOR p78sub_6984

; =============== S U B	R O U T	I N E =======================================


p78sub_7001:
		; ParseInpGraphReset+1578p
		jp		(hl)
; End of function p78sub_7001


; =============== S U B	R O U T	I N E =======================================


BRKINC:
		call	CHKERRBREAK
; End of function BRKINC


; =============== S U B	R O U T	I N E =======================================


INCFETCH:
		; p78sub_4137+1Ap	...
		ld		hl, (nextParseByte)
		inc		hl
		ld		(nextParseByte), hl

CURFETCH:
		; ParseInpGraphReset+202p ...
		ld		bc, (nextParseByte)

p78loc_7010:
		ld		hl, (basic_end)
		xor		a
		sbc		hl, bc
		ret		c
		ld		a, (bc)
		ret
; End of function INCFETCH


; =============== S U B	R O U T	I N E =======================================


NXTFETCH:
		; p78sub_40E7+45p	...
		ld		bc, (nextParseByte)
		inc		bc
		jr		p78loc_7010
; End of function NXTFETCH


; =============== S U B	R O U T	I N E =======================================


p78sub_7020:
		; ParseInpGraphReset+41Dp ...
		ld		hl, (OPS)

p78loc_7023:
		inc		hl
		ld		a, (hl)
		ret
; End of function p78sub_7020


; =============== S U B	R O U T	I N E =======================================


p78sub_7026:
		ld		hl, (OPS)
		inc		hl
		jr		p78loc_7023
; End of function p78sub_7026


; =============== S U B	R O U T	I N E =======================================


p78sub_702C:
		; ParseInpGraphReset+1528p ...
		call	p78sub_703E
		jr		nz, p78loc_703B
		call	IsOP1Num
		jr		nz, p78loc_703B
		call	p78sub_7020
		or		a
		ret		z

p78loc_703B:
		jp		ErrSyntax
; End of function p78sub_702C


; =============== S U B	R O U T	I N E =======================================


p78sub_703E:
		; ParseInpGraphReset:p78loc_6799p	...
		ld		a, (basic_prog)
		and		0Fh
		jp		page0_17BE
; End of function p78sub_703E


; =============== S U B	R O U T	I N E =======================================


CKFETCHVAR:
		; p78sub_4321:p78loc_434Cp ...
		call	INCFETCH
; End of function CKFETCHVAR


; =============== S U B	R O U T	I N E =======================================


FETCHVARA:
		call	ERREND
		cp		5Fh ; '_'
		jr		z, p78loc_703B
		cp		0EBh ; '�'
		jr		nz, p78loc_7059
		call	p78sub_5DF2
		jr		CKENDLIN
; ---------------------------------------------------------------------------

p78loc_7059:
		cp		0AAh ; '�'
		jr		z, FETCHVAR
		cp		62h ; 'b'
		jr		c, p78loc_706D
		jr		nz, p78loc_703B
		push	af
		call	CKENDLIN
		cp		21h ; '!'
		jr		z, p78loc_7072
		jr		p78loc_703B
; ---------------------------------------------------------------------------

p78loc_706D:
		cp		41h ; 'A'
		jr		c, p78loc_703B
; End of function FETCHVARA


; =============== S U B	R O U T	I N E =======================================


FETCHVAR:
		push	af

p78loc_7072:
		call	ZeroOP1
		pop		af
		ld		(OP1+1), a
		cp		72h ; 'r'
		jr		z, CKENDLIN
		cp		41h ; 'A'
		jr		c, p78loc_703B
		cp		5Ch ; '\'
		jr		c, CKENDLIN
		cp		0AAh ; '�'
		jr		z, p78loc_708D
		cp		64h ; 'd'
		jr		nc, p78loc_703B

p78loc_708D:
		call	INCFETCH
		ld		(OP1M), a
; End of function FETCHVAR


; =============== S U B	R O U T	I N E =======================================


CKENDLIN:
		call	NXTFETCH

CKENDEXP:
		cp		3Eh ; '>'
		ret		z

p78loc_7099:
		; PARSAHEAD:p78loc_7282p
		or		a
		ret		z
		cp		3Fh ; '?'
		ret
; End of function CKENDLIN


; =============== S U B	R O U T	I N E =======================================


CKPARSEND:
		; ParseInpGraphReset+E99p
		ld		hl, p78loc_5A67
		or		a
		sbc		hl, bc
		ret		z
		ld		hl, p78loc_5A5F
		or		a
		sbc		hl, bc
		ret
; End of function CKPARSEND


; =============== S U B	R O U T	I N E =======================================


STOTYPEARG:
		call	Page0Call_241E
		ret		c
		call	ErrOnCertainTypes
		xor		a
		ld		(OP1), a
		ret
; End of function STOTYPEARG


; =============== S U B	R O U T	I N E =======================================


p78sub_70B8:
		cp		0B5h ; '�'
		ret		z
		cp		0ABh ; '�'
		ret		z
		cp		0EBh ; '�'
		ret		z
		cp		41h ; 'A'
		jr		c, p78loc_70D6
		cp		62h ; 'b'
		jr		nz, p78loc_70D0
		inc		bc
		ld		a, (bc)
		cp		21h ; '!'
		ret		z
		jr		p78loc_70D6
; ---------------------------------------------------------------------------

p78loc_70D0:
		cp		0AAh ; '�'
		ret		z
		cp		64h ; 'd'
		ret		c

p78loc_70D6:
		jp		p78loc_5BE5
; End of function p78sub_70B8


; =============== S U B	R O U T	I N E =======================================


p78sub_70D9:
		call	p78sub_7020
		cp		4
		ld		a, 0B5h	; '�'
		ret		nz
		pop		hl
		call	POPOPER
		call	BRKINC
		call	FETCHVARA
		jr		z, p78loc_70FD
		ld		(nextParseByte), bc
		cp		11h
		jr		nz, p78loc_70FA
		call	CKENDLIN
		jr		z, p78loc_70FD

p78loc_70FA:
		jp		ErrSyntax
; ---------------------------------------------------------------------------

p78loc_70FD:
		call	Page0Call_241E
		push	af
		ld		(chkDelPtr1), de
		ld		(chkDelPtr3), hl
		call	OP1ToOP4
		call	CpyTo1FPST
		call	CkOP1Real
		jr		z, p78loc_7188
		cp		1

p78loc_7115:
		jp		nz, ErrDataType
		ld		a, (OP4+1)
		cp		5Ch ; '\'
		jr		nz, p78loc_7115
		call	FIND_E_UNDEF
		ex		de, hl
		ld		(chkDelPtr2), hl
		ld		a, (hl)
		cp		2
		jp		nz, ErrDimension
		inc		hl
		inc		hl
		rst		20h
		push	hl
		call	ConvDim
		pop		hl
		push	de
		rst		20h
		call	ConvDim
		pop		hl
		ld		d, l
		pop		af
		jr		nc, p78loc_715F
		push	de
		call	OP4ToOP1
		pop		hl
		push	hl
		call	HTimesL
		ex		(sp), hl
		call	CreateRMat

p78loc_714B:
		ld		(chkDelPtr1), de
		ld		(chkDelPtr3), hl
		inc		de
		inc		de
		call	OP1Set0
		pop		hl
		ld		a, l
		or		h
		call	nz, p78sub_748D
		jr		p78loc_7174
; ---------------------------------------------------------------------------

p78loc_715F:
		ld		hl, (chkDelPtr1)
		ld		a, (hl)
		inc		hl
		ld		h, (hl)
		ld		l, a
		call	CpHLDE
		jp		z, p78loc_7182
		push	de
		call	OP4ToOP1
		pop		hl
		call	j_RedimMat

p78loc_7174:
		ld		hl, (chkDelPtr3)
		bit		6, (hl)
		call	nz, SetTblGraphDraw
		call	OP4ToOP1
		call	page0_17E9

p78loc_7182:
		call	PopRealO1
		jp		p78loc_5BAF
; ---------------------------------------------------------------------------

p78loc_7188:
		ld		a, (OP4+1)
		cp		5Dh ; ']'
		jr		nz, p78loc_7115
		call	page0_FB5
		call	CKPosInt
		jp		nz, ErrDimension
		ld		hl, 3E7h
		call	p78sub_71E1
		pop		af
		push	de
		push	af
		call	OP4ToOP1
		pop		af
		jr		c, p78loc_71C6
		ld		hl, (chkDelPtr1)
		call	ldHLind
		pop		de
		call	CpHLDE
		jr		z, p78loc_7182
		jr		c, p78loc_71CE
		ld		b, d
		ld		c, e
		inc		bc
		sbc		hl, de
		ld		de, (chkDelPtr1)
		ld		a, (OP1)
		call	j_dellistel
		jr		p78loc_7174
; ---------------------------------------------------------------------------

p78loc_71C6:
		pop		hl
		push	hl
		call	CreateRList
		jp		p78loc_714B
; ---------------------------------------------------------------------------

p78loc_71CE:
		ex		de, hl
		or		a
		sbc		hl, de
		ld		c, e
		ld		b, d
		ld		de, (chkDelPtr1)
		ld		a, (OP1)
		or		a
		call	j_InsertList
		jr		p78loc_7174
; End of function p78sub_70D9


; =============== S U B	R O U T	I N E =======================================


p78sub_71E1:
		push	hl
		jr		p78loc_71ED
; End of function p78sub_71E1


; =============== S U B	R O U T	I N E =======================================


ConvDim:
		ld		hl, 63h	; 'c'
; End of function ConvDim


; =============== S U B	R O U T	I N E =======================================


ConvDim00:
		push	hl
		call	page0_14D1
		jr		nz, p78loc_71F5

p78loc_71ED:
		call	ConvOP1
		pop		hl
		or		a
		sbc		hl, de
		ret		nc

p78loc_71F5:
		jp		ErrDimension
; End of function ConvDim00


; =============== S U B	R O U T	I N E =======================================


ConvOP1:
		; ConvDim00:p78loc_71EDp
		ld		a, (OP1M)
		or		a
		call	z, OP1Set0
		ld		hl, 8479h
		ld		a, 83h ; '�'
		sub		(hl)
		jr		c, p78loc_71F5
		ld		b, a
		ld		hl, 847Bh
		jr		z, p78sub_7216

p78loc_720D:
		xor		a
		dec		hl
		rrd
		inc		hl
		rrd
		djnz	p78loc_720D
; End of function ConvOP1


; =============== S U B	R O U T	I N E =======================================


p78sub_7216:
		ex		de, hl
		ld		a, (de)
		and		0Fh
		ld		l, a
		ld		h, 0
		ld		c, 0Ah
		ld		b, h
		call	p78sub_7238
		dec		de
		ld		a, (de)
		ld		c, 64h ; 'd'
		and		0Fh
		call	p78sub_723C
		ld		bc, 3E8h
		call	p78sub_7238
		ex		de, hl
		ld		(hl), d
		inc		hl
		ld		(hl), e
		ld		a, e
		ret
; End of function p78sub_7216


; =============== S U B	R O U T	I N E =======================================


p78sub_7238:
		ld		a, (de)
		call	ShRAcc
; End of function p78sub_7238


; =============== S U B	R O U T	I N E =======================================


p78sub_723C:
		dec		a
		ret		m
		add		hl, bc
		jr		p78sub_723C
; End of function p78sub_723C

p78loc_7241:
		.db		10h
		.db		0DAh	; �
		.db		0DBh	; �
		.db		9Ch	; �
		.db		93h	; �
		.db		0A7h	; �
		.db		0D2h	; �
		.db		0D3h	; �
		.db		0E0h	; �
		.db		0E2h	; �
		.db		0E3h	; �
		.db		0E4h	; �
		.db		0E6h	; �
		.db		0E7h	; �
		.db		0E8h	; �
		.db		0ECh	; 
		.db		0EDh	; 
		.db		0EEh	; �
p78loc_7253:
		.db		3Dh	; =
		.db		3Eh	; >
		.db		3Fh	; ?
		.db		40h	; @
		.db		49h	; I
		.db		53h	; S
		.db		55h	; U
		.db		56h	; V
		.db		58h	; X
		.db		59h	; Y

; =============== S U B	R O U T	I N E =======================================


AHEADEQUAL:
		ld		b, 0FFh
		jr		p78loc_7267
; End of function AHEADEQUAL


; =============== S U B	R O U T	I N E =======================================


PARSAHEADS:
		ld		b, 1
		jr		p78loc_7267
; End of function PARSAHEADS


; =============== S U B	R O U T	I N E =======================================


PARSAHEAD:

		ld		b, 0

p78loc_7267:
		; PARSAHEADS+2j
		ld		hl, (nextParseByte)
		push	hl
		ld		de, 0
		push	bc

p78loc_726F:
		; PARSAHEAD+55j ...
		call	NXTFETCH
		cp		3Eh ; '>'
		jr		nz, p78loc_7282
		pop		hl
		push	hl
		rl	h
		jp		c, p78loc_735A
		jp		z, p78loc_735B
		jr		p78loc_72A9
; ---------------------------------------------------------------------------

p78loc_7282:
		call	p78loc_7099
		jp		z, p78loc_735A
		cp		4
		jp		z, p78loc_735C
		cp		2Ah ; '*'
		jr		nz, p78loc_72A9
		pop		hl
		push	hl
		rl	h
		jr		c, p78loc_729A
		jp		nz, p78loc_735B

p78loc_729A:
		ld		(nextParseByte), bc
		call	p78sub_5379
		call	CKENDEXP
		jr		nz, p78loc_726F
		jp		p78loc_735A
; ---------------------------------------------------------------------------

p78loc_72A9:
		; PARSAHEAD+2Aj
		ld		(nextParseByte), bc
		cp		0BBh ; '�'
		jr		nz, p78loc_72DE
		call	INCFETCH
		cp		20h ; ' '
		jr		c, p78loc_7302
		cp		25h ; '%'
		jr		c, p78loc_726F
		cp		2Fh ; '/'
		jr		c, p78loc_7302
		cp		35h ; '5'
		jr		c, p78loc_726F
		cp		3Ch ; '<'
		jr		c, p78loc_7302
		cp		42h ; 'B'
		jr		c, p78loc_72D0
		cp		48h ; 'H'
		jr		c, p78loc_7302

p78loc_72D0:
		ld		hl, p78loc_7253
		push	bc
		ld		bc, 0Ah
		cpir
		pop		bc
		jr		nz, p78loc_726F
		jr		p78loc_7302
; ---------------------------------------------------------------------------

p78loc_72DE:
		cp		0B1h ; '�'
		jr		c, p78loc_72E6
		cp		0CEh ; '�'
		jr		c, p78loc_7302

p78loc_72E6:
		cp		12h
		jr		c, p78loc_72F6
		cp		29h ; ')'
		jr		c, p78loc_7302
		cp		9Eh ; '�'
		jr		c, p78loc_72F6
		cp		0A6h ; '�'
		jr		c, p78loc_7302

p78loc_72F6:
		; PARSAHEAD+8Bj
		ld		hl, p78loc_7241
		push	bc
		ld		bc, 12h
		cpir
		pop		bc
		jr		nz, p78loc_730A

p78loc_7302:
		; PARSAHEAD+59j ...
		ld		a, e
		or		a
		jr		nz, p78loc_7307
		inc		d

p78loc_7307:
		; PARSAHEAD+AFj ...
		jp		p78loc_726F
; ---------------------------------------------------------------------------

p78loc_730A:
		call	isA2ByteTok
		jr		nz, p78loc_7316
		inc		bc
		ld		(nextParseByte), bc
		jr		p78loc_7307
; ---------------------------------------------------------------------------

p78loc_7316:
		pop		hl
		push	hl
		or		a
		rl	h
		jr		c, p78loc_731F
		jr		nz, p78loc_7307

p78loc_731F:
		cp		11h
		jr		nz, p78loc_732B
		ld		a, e
		or		a
		jr		nz, p78loc_7307
		dec		d
		jp		m, p78loc_735C

p78loc_732B:
		cp		6
		jr		z, p78loc_7333
		cp		8
		jr		nz, p78loc_7336

p78loc_7333:
		inc		e
		jr		p78loc_7343
; ---------------------------------------------------------------------------

p78loc_7336:
		cp		7
		jr		z, p78loc_733E
		cp		9
		jr		nz, p78loc_7346

p78loc_733E:
		ld		a, e
		or		a
		jr		z, p78loc_7343
		dec		e

p78loc_7343:
		; PARSAHEAD+DBj ...
		jp		p78loc_726F
; ---------------------------------------------------------------------------

p78loc_7346:
		pop		hl
		push	hl
		rl	h
		jr		c, p78loc_7343
		cp		2Bh ; '+'
		jr		nz, p78loc_7343
		ld		a, d
		or		e
		jr		nz, p78loc_7343

p78loc_7354:
		pop		hl
		pop		hl
		ld		(nextParseByte), hl
		ret
; ---------------------------------------------------------------------------

p78loc_735A:
		; PARSAHEAD+20j ...
		xor		a

p78loc_735B:
		; PARSAHEAD+32j
		or		a

p78loc_735C:
		; PARSAHEAD+C3j
		scf
		jr		p78loc_7354
; End of function PARSAHEAD


; =============== S U B	R O U T	I N E =======================================


p78sub_735F:
		ld		a, (OP1M)
		cp		0Ah
		jr		z, p78loc_736D
		cp		0Bh
		jr		z, p78loc_736D
		cp		1Ah
		ret		nz

p78loc_736D:
		jp		ErrInvalid
; End of function p78sub_735F


; =============== S U B	R O U T	I N E =======================================


p78sub_7370:
		; ParseInpGraphReset+EE7p
		call	page0_172A
		ret		z
		ld		a, (OP1+1)
		cp		63h ; 'c'
		jr		nz, p78loc_7383
		ld		a, (OP1M)
		cp		2Ah ; '*'
		jr		z, p78loc_736D
		ret
; ---------------------------------------------------------------------------

p78loc_7383:
		call	IsFuncMode
		jr		nz, p78sub_7395
		cp		58h ; 'X'
		jr		z, p78loc_736D
		call	IsFunctionMode
		jr		z, p78sub_7395
		cp		52h ; 'R'
		jr		z, p78loc_736D
; End of function p78sub_7370


; =============== S U B	R O U T	I N E =======================================


p78sub_7395:
		; p78sub_7370+16j	...
		cp		59h ; 'Y'
		ret		nz
		jr		p78loc_736D
; End of function p78sub_7395


; =============== S U B	R O U T	I N E =======================================


AnsName:
		call	ZeroOP1
		ld		a, 72h ; 'r'
		ld		(OP1+1), a
		ret
; End of function AnsName


; =============== S U B	R O U T	I N E =======================================


STOCMPREALS:
		ld		de, OP1
		ld		a, (hl)
		push	af
		push	hl
		ld		a, (OP1M)
		or		a
		jr		nz, p78loc_73B6
		inc		hl
		inc		hl
		cp		(hl)
		jr		z, p78loc_73CA
		pop		hl
		push	hl

p78loc_73B6:
		ld		a, (hl)
		and		9Fh ; '�'
		ld		b, a
		ld		a, (de)
		and		9Fh ; '�'
		cp		b
		jr		nz, p78loc_73CA
		ld		b, 8

p78loc_73C2:
		inc		de
		inc		hl
		ld		a, (de)
		cp		(hl)
		jr		nz, p78loc_73CA
		djnz	p78loc_73C2

p78loc_73CA:
		; STOCMPREALS+1Bj ...
		pop		hl
		push	af
		push	hl
		ex		de, hl
		call	MovFrOP1
		pop		hl
		pop		af
		pop		bc
		ret
; End of function STOCMPREALS


; =============== S U B	R O U T	I N E =======================================


p78cxPutAway_NoPartial5:
		; ParseInpGraphReset+22Fp
		call	INCFETCH
		cp		30h ; '0'
		ret		c
		cp		3Ch ; '<'
		ccf
		ret
; End of function p78cxPutAway_NoPartial5


; =============== S U B	R O U T	I N E =======================================


Page78_2D93:
		; p78sub_52FE+22p	...
		cp		41h ; 'A'
		ret		c
		cp		5Ch ; '\'
		ccf
		ret
; End of function Page78_2D93

; ---------------------------------------------------------------------------
		.db		9
		.db		15h
		.db		13h
		.db		14h
		.db		8
		.db		2
		.db		7
		.db		6
		.db		5
		.db		4
p78loc_73F0:
		.db		3
		.db		27h	; '
		.db		22h	; "
p78loc_73F3:
		.db		25h	; %
		.db		31h	; 1
		.db		3Ch	; <
		.db		3Bh	; ;
		.db		3Ah	; :
		.db		0FFh
		.db		39h	; 9
		.db		38h	; 8
		.db		37h	; 7
		.db		0FEh	; �
		.db		22h	; "
p78loc_73FE:
		.db		26h	; &
		.db		0Bh
		.db		0Ah
		.db		9
		.db		8
		.db		11h
		.db		10h
		.db		0Fh
		.db		0Eh
		.db		0Dh
		.db		0Ch
		.db		2
		.db		7
		.db		6
		.db		5
		.db		4
p78loc_740E:
		.db		3
		.db		12h
		.db		35h	; 5
		.db		17h
p78loc_7412:
		.db		16h
		.db		36h	; 6
		.db		1Ah
		.db		19h
		.db		18h
		.db		17h
p78loc_7418:
		.db		16h
		.db		36h	; 6
		.db		18h
		.db		17h
p78loc_741C:
		.db		16h
		.db		36h	; 6
		.db		19h
		.db		18h
		.db		17h
p78loc_7421:
		.db		16h
		.db		2
		.db		3
		.db		22h	; "
p78loc_7425:
		.db		23h	; #
		.db		2
		.db		6
		.db		3
		.db		22h	; "
p78loc_742A:
		.db		23h	; #
		.db		2
		.db		6
		.db		3
		.db		22h	; "
p78loc_742F:
		.db		24h	; $
		.db		30h	; 0
		.db		2Dh	; -
		.db		31h	; 1
		.db		2Fh	; /
		.db		2Ch	; ,
		.db		2Eh	; .
		.db		2Bh	; +
		.db		27h	; '
		.db		22h	; "
p78loc_7439:
		.db		24h	; $
		.db		30h	; 0
		.db		2Dh	; -
		.db		2Fh	; /
		.db		2Ch	; ,
		.db		2Eh	; .
		.db		2Bh	; +
p78loc_7440:
		.db		27h	; '
		.db		22h	; "
p78loc_7442:
		.db		24h	; $
		.db		30h	; 0
		.db		2Dh	; -
		.db		2Eh	; .
		.db		2Bh	; +
		.db		2Fh	; /
		.db		2Ch	; ,
		.db		22h	; "
p78loc_744A:
		.db		26h	; &
		.db		30h	; 0
		.db		2Dh	; -
		.db		2Fh	; /
		.db		2Ch	; ,
		.db		22h	; "
p78loc_7450:
		.db		26h	; &
		.db		30h	; 0
		.db		2Dh	; -
		.db		2Fh	; /
		.db		2Ch	; ,
		.db		2Eh	; .
		.db		2Bh	; +
		.db		22h	; "
p78loc_7458:
		.db		23h	; #
		.db		30h	; 0
		.db		2Dh	; -
		.db		2Eh	; .
p78loc_745C:
		.db		2Bh	; +
		.db		22h	; "
p78loc_745E:
		.db		23h	; #
		.db		2
		.db		28h	; (
		.db		22h	; "
p78loc_7462:
		.db		23h	; #
		.db		30h	; 0
		.db		2Dh	; -
		.db		28h	; (
		.db		2Ah	; *
		.db		29h	; )
		.db		22h	; "
p78loc_7469:
		.db		23h	; #
		.db		2
		.db		6
p78loc_746C:
		.db		3
		.db		2
p78loc_746E:
		.db		3
		.db		30h	; 0
		.db		2Dh	; -
		.db		31h	; 1
		.db		2Fh	; /
		.db		2Ch	; ,
		.db		2Eh	; .
		.db		2Bh	; +
p78loc_7476:
		.db		27h	; '
		.db		30h	; 0
		.db		2Dh	; -
		.db		2Fh	; /
		.db		2Ch	; ,
		.db		2Eh	; .
p78loc_747C:
		.db		2Bh	; +
		.db		2
p78loc_747E:
		.db		28h	; (
		.db		30h	; 0
		.db		2Dh	; -
		.db		2Ah	; *
p78loc_7482:
		.db		29h	; )
		.db		12h
		.db		35h	; 5
		.db		34h	; 4
		.db		17h
		.db		16h
		.db		27h	; '
		.db		22h	; "
p78loc_748A:
		.db		24h	; $
; ---------------------------------------------------------------------------

GETDEPTR:
		ld		a, (de)
		ret

; =============== S U B	R O U T	I N E =======================================


p78sub_748D:
		push	hl
		call	MovFrOP1
		pop		hl
		dec		hl
		ld		a, h
		or		l
		jr		nz, p78sub_748D
		ret
; End of function p78sub_748D


; =============== S U B	R O U T	I N E =======================================


PUSH2BOPER:
		push	bc
		ld		hl, 2
		call	ErrNotEnoughMem
		pop		bc
		ld		hl, (OPS)
		ld		(hl), b
		dec		hl
		ld		(hl), c
		jr		p78loc_74BD
; End of function PUSH2BOPER


; =============== S U B	R O U T	I N E =======================================


POP2BOPER:
		ld		hl, (OPS)
		inc		hl
		ld		c, (hl)
		inc		hl
		ld		b, (hl)
		jr		p78loc_74BE
; End of function POP2BOPER


; =============== S U B	R O U T	I N E =======================================


PUSHOPER:
		push	af
		ld		hl, 1
		call	ErrNotEnoughMem
		pop		af
		ld		hl, (OPS)
		ld		(hl), a

p78loc_74BD:
		dec		hl

p78loc_74BE:
		ld		(OPS), hl
		ret
; End of function PUSHOPER


; =============== S U B	R O U T	I N E =======================================


POPOPER:
		; ParseInpGraphReset+2B3p ...
		ld		hl, (OPS)
		inc		hl
		ld		a, (hl)
		jr		p78loc_74BE
; End of function POPOPER


; =============== S U B	R O U T	I N E =======================================


p78sub_74C9:
		cp		0ABh ; '�'
		ret		z
		cp		84h ; '�'
		ret		c
		cp		93h ; '�'
		ccf
		ret		nc
		cp		0B1h ; '�'
		ret		c
		cp		0F0h ; '�'
		ccf
		ret
; End of function p78sub_74C9


; =============== S U B	R O U T	I N E =======================================


p78sub_74DA:
		ld		hl, 9320h
		ld		c, 0

p78loc_74DF:
		ld		a, (hl)
		ld		b, 8

p78loc_74E2:
		rr	a
		jr		nc, p78loc_74EF
		inc		c
		jp		z, ErrMemory
		djnz	p78loc_74E2
		inc		hl
		jr		p78loc_74DF
; ---------------------------------------------------------------------------

p78loc_74EF:
		ld		a, c
		ret
; End of function p78sub_74DA


; =============== S U B	R O U T	I N E =======================================


Page78_2EC5:
		; p78sub_6171+27Ep ...
		ld		hl, (chkDelPtr3)
		call	GET_FORM_NUM
		or		a
		ret		z
		bit		3, (iy+1Ah)
		jr		nz, p78loc_7513
		ld		b, 0
		ld		(hl), b
		push	af
		ld		h, a
		ld		l, 3Fh ; '?'
		call	page0_1671
		rst		10h
		call	nc, DelVar
		pop		af
		call	Page0Call_25E7
		xor		(hl)
		ld		(hl), a

p78loc_7513:
		jp		OP4ToOP1
; End of function Page78_2EC5


; =============== S U B	R O U T	I N E =======================================


p78sub_7516:
		; p78sub_6557+5p ...
		ld		a, (OP1+1)
		cp		63h ; 'c'
		ld		hl, 91D9h
		ld		de, 91E0h
		ld		a, 1
		ret		z
		jp		FIND_E_UNDEF
; End of function p78sub_7516


; =============== S U B	R O U T	I N E =======================================


Find_Parse_Formula:
		call	FIND_E_UNDEF
; End of function Find_Parse_Formula


; =============== S U B	R O U T	I N E =======================================


PARSE_FORMULA:
		call	GET_FORM_NUM
		or		a
		ret		z
		ld		(OP2), a
		call	SAVEPARSE
		ld		a, (OP2)
		push	af
		rst		18h
		pop		hl
		ld		l, 3Fh ; '?'
		call	page0_1671
		pop		bc
		call	PUSH2BOPER
		ld		bc, (pTempCnt)
		call	PUSH2BOPER
		call	p78sub_6873
		call	ParseInpGraphReset
		ld		hl, (unk_9665)
		dec		hl
		ld		(unk_9665), hl
		call	page0_1717
		call	p78sub_5B18
		call	CkOP1Real
		call	IS_A_LSTorCLST
		jp		nz, ErrDataType
		set		3, (iy+1Ah)
		call	CpyTo2FPST
		rst		18h
		rst		18h
		call	OP2ToOP1
		call	StoOther
		rst		8
		res		3, (iy+1Ah)
		call	PopRealO1
		call	page0_1641
		jr		nz, p78loc_7586
		rst		10h
		set		7, (hl)

p78loc_7586:
		call	FPOPREAL
		call	POP2BOPER
		ld		(pTempCnt), bc
		call	POP2BOPER
		push	bc
		call	PopRealO1
		call	GETPARSE
		jp		OP2ToOP1
; End of function PARSE_FORMULA


; =============== S U B	R O U T	I N E =======================================


p78sub_759D:
		call	SetTblGraphDraw
		call	j_ClrGraphRef
		call	j_DeselectAllVars
		ld		hl, 0
		ld		(OP6+1), hl

p78loc_75AC:
		call	CURFETCH
		jr		nc, p78loc_75C3

p78loc_75B1:
		ld		hl, (OP6+1)
		ld		a, h
		or		l
		ret		z
		dec		hl
		ld		(OP6+1), hl
		call	p78sub_5A80

p78loc_75BE:
		call	INCFETCH
		jr		c, p78loc_75B1

p78loc_75C3:
		cp		0D6h ; '�'
		jr		z, p78loc_75D4
		cp		0D7h ; '�'
		jr		z, p78loc_75D4
		cp		2Ah ; '*'
		jr		nz, p78loc_75D9
		call	p78sub_5379
		jr		p78loc_75BE
; ---------------------------------------------------------------------------

p78loc_75D4:
		call	FINDEOL
		jr		p78loc_75BE
; ---------------------------------------------------------------------------

p78loc_75D9:
		call	Page78_2D93
		jr		c, p78loc_75F0

p78loc_75DE:
		call	FETCHVAR
		call	Page0Call_241E
		jr		nc, p78loc_763A
		call	CreateReal

p78loc_75E9:
		set		7, (hl)
		call	p78loc_5F41
		jr		p78loc_75BE
; ---------------------------------------------------------------------------

p78loc_75F0:
		cp		5Ch ; '\'
		jr		nz, p78loc_7606
		call	FETCHVAR
		call	Page0Call_241E
		jr		nc, p78loc_763A
		ld		hl, 101h
		call	CreateRMat
		inc		de
		inc		de
		jr		p78loc_75E9
; ---------------------------------------------------------------------------

p78loc_7606:
		cp		5Dh ; ']'
		jr		nz, p78loc_7620

p78loc_760A:
		call	FETCHVARA
		call	Page0Call_241E
		jr		c, p78loc_7616
		set		7, (hl)
		jr		p78loc_75BE
; ---------------------------------------------------------------------------

p78loc_7616:
		ld		hl, 0
		call	CreateRList
		set		7, (hl)
		jr		p78loc_75BE
; ---------------------------------------------------------------------------

p78loc_7620:
		cp		0EBh ; '�'
		jr		z, p78loc_760A
		cp		0AAh ; '�'
		jr		nz, p78loc_766C
		call	FETCHVAR
		call	Page0Call_241E
		jr		nc, p78loc_763A
		ld		hl, 0
		call	CreateStrng
		set		7, (hl)

p78loc_7638:
		jr		p78loc_75BE
; ---------------------------------------------------------------------------

p78loc_763A:
		bit		7, (hl)
		jr		nz, p78loc_75BE
		set		7, (hl)
		ld		(OP3), hl
		ld		bc, 9
		ld		de, 84A1h
		lddr
		inc		hl
		ld		de, (progPtr)
		inc		de
		push	de
		or		a
		sbc		hl, de
		jr		z, p78loc_7661
		ld		b, h
		ld		c, l
		add		hl, de
		dec		hl
		ld		de, (OP3)
		lddr

p78loc_7661:
		pop		de
		ld		hl, OP4
		ld		bc, 9
		ldir
		jr		p78loc_7638
; ---------------------------------------------------------------------------

p78loc_766C:
		cp		5Eh ; '^'
		jr		nz, p78loc_7694
		call	FETCHVAR
		call	FIND_E_UNDEF
		bit		6, (hl)
		jr		z, p78loc_7685

p78loc_767A:
		; p78sub_759D+102j ...
		call	CURFETCH
		call	isA2ByteTok
		call	z, INCFETCH
		jr		p78loc_7638
; ---------------------------------------------------------------------------

p78loc_7685:
		set		6, (hl)
		call	p78loc_5AD1
		ld		hl, (OP6+1)
		inc		hl
		ld		(OP6+1), hl
		jp		p78loc_75AC
; ---------------------------------------------------------------------------

p78loc_7694:
		cp		72h ; 'r'
		jp		z, ErrInvalid
		cp		63h ; 'c'
		jr		z, p78loc_767A
		cp		5Fh ; '_'
		jr		c, p78loc_767A
		cp		62h ; 'b'
		jp		c, ErrDataType
		jr		nz, p78loc_767A
		call	CKENDLIN
		cp		21h ; '!'
		jr		nz, p78loc_767A
		ld		a, 62h ; 'b'
		jp		p78loc_75DE
; End of function p78sub_759D

; ---------------------------------------------------------------------------

InitHomescreenContext:
		ld		a, 3
		bit		homescreenHookActive, (iy+hookflags2)
		call	nz, Page0Call_2D51
		ret		nz
		bit		2, (iy+29h)
		call	nz, j_AppSetup
		res		ignoreBPLink, (iy+hookflags1)
		ld		a, (iy+3Ch)
		and		0F4h ; '�'
		ld		(iy+3Ch), a
		call	ResetSplitOverride
		ld		a, (SEspeed)
		or		a
		call	nz, SetSpeed_NZForFast
		xor		a
		ld		(SEspeed), a
		ld		(winLeftEdge), a
		ld		(numLastEntries+1), a
		ld		hl, p78loc_7845
		call	AppInit
		bit		6, (iy+1Ch)
		jr		nz, p78loc_76FA
		res		6, (iy+1Ch)
		bit		7, (iy+9)
		ret		nz

p78loc_76FA:
		bit		7, (iy+0Ch)
		jp		nz, p78loc_77A6
		bit		cmdExec, (iy+cmdFlags)
		ret		nz
		res		prgmEdit, (iy+prgmFlags)
		call	j_resetStacks
		call	j_CleanAll
		call	j_DeleteTempPrograms
		call	p78sub_7D37
p78loc_7716:
		res		nocxPutAway, (iy+contextFlags)
		res		allowProgTokens, (iy+newDispF)
		res		6, (iy+15h)
		res		2, (iy+1Fh)
		res		7, (iy+9)
		call	RESETWINTOP
		res		monAbandon, (iy+monFlags)
		call	p78sub_7EF2
		ld		hl, 800h
		call	CheckSplitFlag
		jr		z, p78loc_773E
		ld		l, 4

p78loc_773E:
		ld		(textShadTop), hl
		ld		hl, (cmdShadAlph)
		ld		(textShadTop+1), hl
		ld		hl, cmdShadow
		ld		de, textShadow
		ld		bc, 80h	; '�'
		ldir
		ld		hl, (cmdShadCur)
		ld		(textShadCur), hl
		bit		2, (iy+15h)
		call	z, j_rstrShadow2
		ld		hl, p78loc_7789
		call	pushErrorHandleR
		call	page0_176F
		call	popErrorHandleR

p78loc_776B:
		ld		hl, lcdFlag
		res		powerLcdForGC, (hl)
		call	j_setupEditCmd
		bit		2, (iy+15h)
		ret		z
		res		2, (iy+15h)
		call	j_HomeUp
		ld		hl, (cmdCursor)
		ld		(errOffset), hl
		call	j_cursorToOffset
		ret
p78loc_7789:
		ld		hl, lcdFlag
		bit		powerLcdForGC, (hl)
		jp		z, JErrorNo
		ld		hl, p78loc_7A99
		ld		(mcxErrorEP), hl
		call	j_RSTGFLAGS
		res		cmdExec, (iy+cmdFlags)
		call	j_CleanAll
		call	j_DeleteTempPrograms
		jr		p78loc_776B
; ---------------------------------------------------------------------------

p78loc_77A6:
		res		monAbandon, (iy+monFlags)
		res		7, (iy+0Ch)
		call	RESETWINTOP
		call	j_ClrWindow
		call	SetupLastEntryEditResetFlags
		res		cmdVirgin, (iy+cmdFlags)
		ld		hl, basic_prog
		rst		20h
		call	CkOP1Real
		cp		6
		jp		z, ErrMemory_NoGoTo
		cp		5
		jr		nz, p78loc_77D5
		call	FINDPROGSYM
		jr		c, p78loc_77D8
		call	Page0Call_2415
		jr		p78loc_77D8
; ---------------------------------------------------------------------------

p78loc_77D5:
		call	j_rclVarToEdit

p78loc_77D8:
		jp		c, ErrMemory_NoGoTo
		ld		de, 2Ah	; '*'
		call	j_bufInsert
		jr		z, p78loc_7835
		ld		de, 4
		call	j_bufInsert
		jr		z, p78loc_7835
		ld		hl, 9653h
		ld		d, (hl)
		inc		hl
		ld		e, (hl)
		ld		a, d
		cp		3Fh ; '?'
		jr		nz, p78loc_7827
		push	de
		ld		a, 0FFh
		call	page0_1682
		pop		de

p78loc_77FD:
		push	de
		call	j_FindAlphaUp
		jp		c, ErrInvalid
		ld		a, (OP1+9)
		pop		de
		cp		e
		jr		nz, p78loc_77FD
		ld		hl, 8479h
		ld		d, (hl)
		inc		hl
		ld		e, (hl)
		ld		a, e
		cp		6
		jr		c, p78loc_7827

p78loc_7816:
		ld		d, 0
		push	hl
		call	j_bufInsert
		jr		z, p78loc_7835
		pop		hl
		inc		hl
		ld		a, (hl)
		or		a
		jr		z, p78loc_782C
		ld		e, a
		jr		p78loc_7816
; ---------------------------------------------------------------------------

p78loc_7827:
		call	j_bufInsert
		jr		z, p78loc_7835

p78loc_782C:
		call	j_BufToTop
		ld		de, 2Ah	; '*'
		call	j_bufInsert

p78loc_7835:
		jp		z, ErrMemory_NoGoTo
		ld		hl, (errOffset)
		inc		hl
		ld		(errOffset), hl
		call	j_cursorToOffset
		jp		zero_basic_prog
p78loc_7845:
		.dw		p78loc_7852
		.dw		p78loc_7A5E
		.dw		p78loc_7A7B
		.dw		p78loc_7716
		.dw		p78loc_7A99
		.dw		p78loc_7ABD
		.db		0Eh
p78loc_7852:
		ld		b, a
		ld		a, 1
		bit		homescreenHookActive, (iy+hookflags2)
		call	nz, Page0Call_2D51
		ret		nz
		ld		a, b
		cp		5
		jp		nz, p78loc_7964
		xor		a
		ld		(numLastEntries+1), a
		ld		hl, 0
		ld		(cmdCursor), hl
		call	CanAlphIns
		call	j_DispTail
		ei
		call	IsEditEmpty
		jp		z, p78loc_78FF
		call	j_newline
		ei
		call	j_CloseEditEqu
		call	j_disarmScroll
		call	command_buf_to_OP1
		call	FINDPROGSYM
		push	hl
		ex		de, hl
		ld		c, (hl)
		inc		hl
		ld		a, (hl)
		or		a
		jr		nz, p78loc_78E2
		ld		a, c
		or		a
		jr		z, p78loc_78E2
		cp		7Fh ; ''
		jr		nc, p78loc_78E2
		inc		c
		inc		c
		dec		hl
		push	hl
		ld		b, 0
		ld		de, (pixWide_m_2+1)

p78loc_78A4:
		ld		hl, numLastEntries
		or		a
		sbc		hl, de
		sbc		hl, bc
		jr		nc, p78loc_78BF
		ld		a, (numLastEntries)
		dec		a
		ld		(numLastEntries), a
		inc		a
		call	GETLASTENTRYPTR
		ld		(pixWide_m_2+1), hl
		ex		de, hl
		jr		p78loc_78A4
; ---------------------------------------------------------------------------

p78loc_78BF:
		push	bc
		add		hl, bc
		ld		a, 80h ; '�'
		sub		l
		push	af
		ld		l, a
		ex		de, hl
		add		hl, bc
		ld		(pixWide_m_2+1), hl
		pop		af
		jr		z, p78loc_78D7
		dec		hl
		push	de
		ld		e, l
		ld		d, h
		sbc		hl, bc
		pop		bc
		lddr

p78loc_78D7:
		ld		de, lastEntryStk
		pop		bc
		pop		hl
		ldir
		ld		hl, numLastEntries
		inc		(hl)

p78loc_78E2:
		pop		hl
		push	hl
		call	last_entry_to_OP1
		call	FINDPROGSYM
		ld		de, 0FFF9h
		add		hl, de
		ld		(hl), 23h ; '#'
		pop		hl
		add		hl, de
		ld		(hl), 21h ; '!'
		call	FINDPROGSYM
		call	j_SetEmptyEditPtr
		call	j_CloseEditEqu
		jr		p78loc_7905
; ---------------------------------------------------------------------------

p78loc_78FF:
		call	j_CloseEditEqu
		call	j_disarmScroll

p78loc_7905:
		sub		a
		ld		(kbdGetKy), a
		set		cmdExec, (iy+cmdFlags)
		set		donePrgm, (iy+doneFlags)
		call	p78loc_7B21
		ei
		ld		a, 2
		bit		homescreenHookActive, (iy+hookflags2)
		call	nz, Page0Call_2D51
		call	z, ParseInpLastEnt
		res		cmdExec, (iy+cmdFlags)
		call	j_CleanAll
		call	j_DeleteTempPrograms
		ld		a, 0
		bit		homescreenHookActive, (iy+hookflags2)
		call	nz, Page0Call_2D51
		jr		nz, p78loc_7961
		bit		plotDisp, (iy+plotFlags)
		jr		z, p78loc_7949
		call	SetupLastEntryEditResetFlags
		ld		a, 44h ; 'D'
		call	newContext
		ld		a, 44h ; 'D'
		jp		cxMain
; ---------------------------------------------------------------------------

p78loc_7949:
		call	IsOP1Num
		jr		z, p78loc_7953
		call	j_formDisp
		jr		p78loc_7961
; ---------------------------------------------------------------------------

p78loc_7953:
		bit		7, (iy+9)
		jp		nz, Page78_344D
		bit		donePrgm, (iy+doneFlags)
		call	nz, j_DispDone

p78loc_7961:
		jp		SetupLastEntryEditResetFlags
; ---------------------------------------------------------------------------

p78loc_7964:
		bit		7, (iy+9)
		jr		z, p78loc_797B
		cp		3
		jp		z, p78loc_7CA8
		cp		4
		jp		z, p78loc_7CC6
		res		7, (iy+9)
		call	RESETWINTOP

p78loc_797B:
		bit		AnsScroll, (iy+ansFlags)
		jr		z, p78loc_79A1
		cp		2
		jr		nz, p78loc_7989
		call	j_wscrollLeft
		ret
; ---------------------------------------------------------------------------

p78loc_7989:
		cp		1
		jr		nz, p78loc_7991
		call	j_wscrollRight
		ret
; ---------------------------------------------------------------------------

p78loc_7991:
		cp		3
		jr		nz, p78loc_7999
		call	j_wscrollUp
		ret
; ---------------------------------------------------------------------------

p78loc_7999:
		cp		4
		jr		nz, p78loc_79CF
		call	j_wscrollDown
		ret
; ---------------------------------------------------------------------------

p78loc_79A1:
		cp		2
		jp		z, j_jpromptcursor
		cp		1
		jp		z, j_jpromptcursor
		cp		3
		jp		z, j_jpromptcursor
		cp		4
		jp		z, j_jpromptcursor
		cp		0Eh
		jr		nz, p78loc_79C0
		call	j_JcursorFirst
		ret
; ---------------------------------------------------------------------------
		jp		j_jpromptcursor
; ---------------------------------------------------------------------------

p78loc_79C0:
		cp		0Fh
		jp		z, j_JcursorLast
		cp		21h ; '!'
		jr		nz, p78loc_79CF
		call	j_CursorLeft
		ret		z
		jr		p78loc_79D8
; ---------------------------------------------------------------------------

p78loc_79CF:
		cp		0Bh
		jp		z, j_jpromptcursor
		cp		0Ah
		jr		nz, p78loc_79E3

p78loc_79D8:
		res		textInsMode, (iy+textFlags)
		call	j_BufDelete
		call	j_DispEOW
		ret
; ---------------------------------------------------------------------------

p78loc_79E3:
		cp		9
		jr		nz, p78loc_7A05
		call	IsEditEmpty
		jr		nz, p78loc_79F5
		call	j_ClrWindow
		res		AnsScroll, (iy+ansFlags)
		jr		p78loc_79FB
; ---------------------------------------------------------------------------

p78loc_79F5:
		call	j_DispHead
		call	j_EraseEOW2

p78loc_79FB:
		call	j_BufClear
		set		cmdVirgin, (iy+cmdFlags)
		jp		CanAlphIns
; ---------------------------------------------------------------------------

p78loc_7A05:
		cp		0Ch
		jp		z, j_RCLREGEQ_CALL
		cp		0Dh
		jp		nz, p78loc_7A3B
		call	j_DispHead
		res		AnsScroll, (iy+ansFlags)
		set		cmdVirgin, (iy+cmdFlags)
		call	CanAlphIns
		call	GETLASTENTRY
		call	j_RCLENTRYTOEDIT
		jr		c, p78loc_7A32
		res		cmdVirgin, (iy+cmdFlags)
		call	j_BufToTop
		call	j_DispTail
		jp		j_EraseEOW
; ---------------------------------------------------------------------------

p78loc_7A32:
		call	j_BufClear
		call	j_EraseEOW2
		jp		ErrMemory_NoGoTo
; ---------------------------------------------------------------------------

p78loc_7A3B:
		cp		5Ah ; 'Z'
		ret		c
		res		AnsScroll, (iy+ansFlags)
		bit		cmdVirgin, (iy+cmdFlags)
		jr		z, p78loc_7A55
		bit		enableQueue, (iy+rclFlag)
		jr		nz, p78loc_7A51
		call	Page0Call_30B7

p78loc_7A51:
		res		cmdVirgin, (iy+cmdFlags)

p78loc_7A55:
		call	page0_1808
		jp		z, j_initNamePrompt2
		jp		j_InsDisp
p78loc_7A5E:
		call	j_saveCmdShadow
		bit		editOpen, (iy+editFlags)
		jr		z, p78loc_7A77
		ld		hl, (editCursor)
		ld		de, (editTop)
		or		a
		sbc		hl, de
		ld		(cmdCursor), hl
		call	j_CloseEditEqu

p78loc_7A77:
		call	j_disarmScroll
		ret
p78loc_7A7B:
		bit		cmdExec, (iy+cmdFlags)
		call	z, j_CleanAll
		bit		cmdExec, (iy+cmdFlags)
		call	z, j_DeleteTempPrograms
		ld		a, (unk_89FA)
		and		0E3h ; '�'
		ld		(iy+0Ah), a
		ld		(unk_89FB), a
		xor		a
		ld		(numLastEntries+1), a
		ret
p78loc_7A99:
		res		appCurGraphic, (iy+appFlags)
		call	RESETWINTOP
		call	p78sub_7EF2
		call	j_ClrWindow
		call	SetupLastEntryEditResetFlags
		res		cmdVirgin, (iy+cmdFlags)
		call	command_buf_to_OP1
		call	FINDPROGSYM
		call	j_rclVarToEditPtR
		jp		c, ErrMemory_NoGoTo
		call	j_cursorToOffset
		ret
p78loc_7ABD:
		jr		c, p78loc_7ADA
		ld		a, (curRow)
		add		a, b
		sub		7
		cp		1
		ret		m
		ld		b, a
		ld		hl, curRow

p78loc_7ACC:
		call	j_scrollUp
		bit		AnsScroll, (iy+ansFlags)
		call	nz, j_formScrollUp
		dec		(hl)
		djnz	p78loc_7ACC
		ret
; ---------------------------------------------------------------------------

p78loc_7ADA:
		call	j_formMatrix
		call	j_rstrUnderMenu
		call	j_DispEOW
		ret
; ---------------------------------------------------------------------------

Page78_2D63:
		call	command_buf_to_OP1
		call	FINDPROGSYM
		call	nc, DelVar
		ld		hl, 0
		call	CreateProg
		call	last_entry_to_OP1
		call	FINDPROGSYM
		call	nc, DelVar
		ld		hl, 0
		ld		(cmdCursor), hl
		call	CreateProg
		ld		hl, p78loc_7845
		call	AppInit
		ld		a, appStart
		ld		(mcxCurApp), a
SetupLastEntryEditResetFlags:
		call	last_entry_to_OP1
		call	FINDPROGSYM
		call	j_SetEmptyEditPtr
		res		cmdExec, (iy+cmdFlags)
		res		prgmEdit, (iy+prgmFlags)
p78loc_7B21:
		set		cmdVirgin, (iy+cmdFlags)
		res		textInsMode, (iy+textFlags)
		ret

Page78_344D:
		call	SetupLastEntryEditResetFlags
		set		numOP1, (iy+ParsFlag2)
		call	j_ClrScrn
		call	p78sub_7D57
		ld		a, (unk_8A36)
		bit		7, (iy+11h)
		jr		z, p78loc_7B64
		ld		b, 1Dh
		cp		0Eh
		jr		z, p78loc_7B6B
		inc		b
		cp		0Dh
		jr		z, p78loc_7B6B
		inc		b
		cp		12h
		jr		z, p78loc_7B6B
		inc		b
		cp		13h
		jr		z, p78loc_7B6B
		inc		b
		cp		15h
		jr		z, p78loc_7B6B
		inc		b
		cp		16h
		jr		z, p78loc_7B6B
		inc		b
		cp		0Bh
		jr		z, p78loc_7B6B

p78loc_7B64:
		call	page0_1725
		jr		z, p78loc_7B6C
		ld		b, 0Ah

p78loc_7B6B:
		ld		a, b

p78loc_7B6C:
		ld		e, a
		add		a, a
		add		a, a
		add		a, e
		ld		e, a
		ld		d, 0
		ld		hl, p78loc_7BF4
		add		hl, de
		ld		a, (hl)
		bit		statDiagnosticsOn, (iy+statFlags2)
		jr		nz, p78loc_7B98
		call	page0_1725
		jr		nz, p78loc_7B98
		ld		b, a
		ld		a, (unk_8A36)
		cp		9
		jr		nc, p78loc_7B97
		cp		5
		jr		c, p78loc_7B95
		cp		8
		jr		z, p78loc_7B97
		jr		p78loc_7B96
; ---------------------------------------------------------------------------

p78loc_7B95:
		dec		b

p78loc_7B96:
		dec		b

p78loc_7B97:
		ld		a, b

p78loc_7B98:
		ld		(varCurrent), a
		ld		a, 1
		ld		(unk_85D2), a
		inc		hl
		ld		e, (hl)
		inc		hl
		ld		d, (hl)
		ld		(unk_85D4), de
		inc		hl
		ld		a, (hl)
		inc		hl
		ld		b, a
		ld		a, (hl)
		call	j_INITSTATANS2
		call	j_HomeUp
		xor		a

p78loc_7BB4:
		inc		a
		push	af
		call	p78sub_7CE0
		res		appAutoScroll, (iy+appFlags)
		call	j_newline
		set		appAutoScroll, (iy+appFlags)
		call	Page0Call_3CCF
		jr		nc, p78loc_7BD1
		pop		af
		ld		hl, varCurrent
		cp		(hl)
		jr		nz, p78loc_7BB4
		push	af

p78loc_7BD1:
		pop		af
		ld		(unk_85D3), a

p78loc_7BD5:
		call	p78sub_7D40
		jr		z, p78loc_7BDF
		ld		a, 1Eh
		call	j_PutC

p78loc_7BDF:
		call	p78sub_7D49
		jr		z, p78loc_7BE9
		ld		a, 1Fh
		call	j_PutC

p78loc_7BE9:
		ld		hl, 7
		ld		(curRow), hl
		ld		hl, winBtm
		inc		(hl)
		ret
p78loc_7BF4:
		.db		4
		.dw		p78loc_7412
		.db		1
		.db		2
		.db		4
		.dw		p78loc_7412
		.db		3
		.db		4
		.db		4
		.dw		p78loc_7412
		.db		5
		.db		6
		.db		4
		.dw		p78loc_7412
		.db		7
		.db		8
		.db		4
		.dw		p78loc_7412
		.db		9
		.db		2
		.db		4
		.dw		p78loc_741C
		.db		0Ah
		.db		0Bh
		.db		5
		.dw		p78loc_7421
		.db		0Ch
		.db		0Dh
		.db		6
		.dw		p78loc_7418
		.db		0Eh
		.db		0Fh
		.db		2
		.dw		p78loc_7418
		.db		9
		.db		10h
		.db		10h
		.dw		p78loc_740E
		.db		0
		.db		11h
		.db		0Bh
		.dw		p78loc_73F0
		.db		0
		.db		12h
		.db		5
		.dw		p78loc_742A
		.db		0
		.db		13h
		.db		5
		.dw		p78loc_742F
		.db		0
		.db		14h
		.db		8
		.dw		p78loc_7458
		.db		0
		.db		15h
		.db		0Ah
		.dw		p78loc_7439
		.db		0
		.db		16h
		.db		4
		.dw		p78loc_7462
		.db		0
		.db		17h
		.db		7
		.dw		p78loc_7469
		.db		0
		.db		18h
		.db		3
		.dw		p78loc_73F3
		.db		0
		.db		19h
		.db		8
		.dw		p78loc_744A
		.db		0
		.db		1Ah
		.db		3
		.dw		p78loc_746C
		.db		0
		.db		1Bh
		.db		3
		.dw		p78loc_746C
		.db		0
		.db		1Ch
		.db		8
		.dw		p78loc_7476
		.db		0
		.db		1Dh
		.db		6
		.dw		p78loc_747C
		.db		0
		.db		1Eh
		.db		2
		.dw		p78loc_747E
		.db		0
		.db		1Fh
		.db		4
		.dw		p78loc_7482
		.db		0
		.db		20h
		.db		8
		.dw		p78loc_748A
		.db		1
		.db		21h ; !
		.db		3
		.dw		p78loc_7418
		.db		22h ; "
		.db		23h ; #
		.db		0Bh
		.dw		p78loc_73FE
		.db		0
		.db		24h ; $
		.db		4
		.dw		p78loc_7421
		.db		25h ; %
		.db		26h ; &
		.db		9
		.dw		p78loc_7442
		.db		0
		.db		16h
		.db		6
		.dw		p78loc_745E
		.db		0
		.db		15h
		.db		6
		.dw		p78loc_7450
		.db		0
		.db		1Ah
		.db		2
		.dw		p78loc_746E
		.db		0
		.db		1Bh
		.db		7
		.dw		p78loc_7440
		.db		0
		.db		1Dh
		.db		4
		.dw		p78loc_745C
		.db		0
		.db		1Eh
		.db		4
		.dw		p78loc_7425
		.db		0
		.db		13h

p78loc_7CA8:
		call	p78sub_7D57
		call	p78sub_7D40
		jp		z, p78loc_7BE9
		ld		a, 20h ; ' '
		call	j_PutMap
		call	j_moveUp
		ld		hl, 85D3h
		dec		(hl)
		dec		hl
		dec		(hl)
		ld		a, (hl)
		call	p78sub_7CE0
		jp		p78loc_7BD5
; ---------------------------------------------------------------------------

p78loc_7CC6:
		call	p78sub_7D57
		call	p78sub_7D49
		jp		z, p78loc_7BE9
		ld		a, 20h ; ' '
		call	j_PutMap
		call	j_moveDown
		ld		hl, 85D2h
		inc		(hl)
		inc		hl
		ld		a, (hl)
		jp		p78loc_7BB4

; =============== S U B	R O U T	I N E =======================================


p78sub_7CE0:
		dec		a
		ld		hl, (unk_85D4)
		ld		e, a
		ld		d, 0
		or		a
		sbc		hl, de
		ld		a, (hl)
		cp		0FEh ; '�'
		jr		c, p78loc_7CF3
		call	j_ANOVA_SPEC
		ret
; ---------------------------------------------------------------------------

p78loc_7CF3:
		push	af
		ld		d, 62h ; 'b'
		ld		e, a
		pop		af
		push	af
		cp		37h ; '7'
		ld		a, 1
		jr		c, p78loc_7D00
		inc		a

p78loc_7D00:
		ld		(curRow+1), a
		call	j_GETTOKSTRING
		call	j_PutPS
		ld		a, 3Dh ; '='
		call	j_PutC
		call	Page0Call_3279
		call	p78sub_7D37
		res		textScrolled, (iy+textFlags)
		pop		af
		call	Rcl_StatVar
		xor		a
		ld		(OP3), a
		call	CkOP1Real
		cp		0Eh
		jr		z, p78loc_7D30
		ld		a, 0Fh
		ld		hl, winLeftEdge
		sub		(hl)
		call	j_FormReal

p78loc_7D30:
		ld		hl, OP3
		call	Page0Call_327F
		ret
; End of function p78sub_7CE0


; =============== S U B	R O U T	I N E =======================================


p78sub_7D37:
		ld		a, (unk_89FE)
		and		0C0h ; '�'
		ld		(unk_89FE), a
		ret
; End of function p78sub_7D37


; =============== S U B	R O U T	I N E =======================================


p78sub_7D40:

		call	j_HomeUp
		ld		a, (unk_85D2)
		cp		1
		ret
; End of function p78sub_7D40


; =============== S U B	R O U T	I N E =======================================


p78sub_7D49:

		ld		hl, 6
		ld		(curRow), hl
		ld		a, (unk_85D3)
		ld		hl, varCurrent
		cp		(hl)
		ret
; End of function p78sub_7D49


; =============== S U B	R O U T	I N E =======================================


p78sub_7D57:

		ld		a, 7
		ld		(winBtm), a
		ret
; End of function p78sub_7D57

; ---------------------------------------------------------------------------

InitProgramInputContext:
		ld		hl, p78loc_7D81
		call	AppInit
		call	j_rstrShadow2
		call	p78sub_7EEC
		rst		10h
		jr		nc, p78loc_7D72
		ld		hl, 0
		call	CreateEqu

p78loc_7D72:
		ld		(editSym), hl
		ld		(hl), 3
		call	j_SetEmptyEditPtr
		ld		hl, ioPrompt
		call	j_PutS
		ret
p78loc_7D81:
		.dw		p78loc_7D8E
		.dw		p78loc_7E7C
		.dw		p78loc_7E6F
		.dw		p78loc_7E80
		.dw		p78loc_7E83
		.dw		p78loc_7E9C
		.db		0Fh
p78loc_7D8E:
		cp		5
		jr		nz, p78loc_7DDD
		sub		a
		ld		(kbdGetKy), a
		call	j_DispTail
		call	IsOnInterruptSet
		jr		nz, p78loc_7DC3
		call	IsEditEmpty
		ret		z
		call	CanAlphIns
		call	j_newline
		bit		parseInput, (iy+onFlags)
		jr		z, p78loc_7DC3
		call	j_CloseEditEqu
		call	p78sub_7EEC
		ld		hl, p78loc_7DD7
		call	pushErrorHandleR
		ei
		call	ParseInpGraph
		call	popErrorHandleR
		jr		p78loc_7DD2
; ---------------------------------------------------------------------------

p78loc_7DC3:
		call	j_CloseEditEqu
		ld		a, 4
		ld		hl, (editSym)
		ld		(hl), a
		call	p78sub_7EEC
		ld		(OP1), a

p78loc_7DD2:
		pop		hl
		pop		hl
		pop		hl
		pop		hl
		ret
p78loc_7DD7:
		ld		a, 52h ; 'R'
		call	newContext
		ret
; ---------------------------------------------------------------------------

p78loc_7DDD:
		cp		2
		jr		nz, p78loc_7DE5
		call	j_CursorLeft
		ret
; ---------------------------------------------------------------------------

p78loc_7DE5:
		cp		1
		jr		nz, p78loc_7DED
		call	j_cursorRight
		ret
; ---------------------------------------------------------------------------

p78loc_7DED:
		cp		3
		jr		nz, p78loc_7DF5
		call	j_cursorUp
		ret
; ---------------------------------------------------------------------------

p78loc_7DF5:
		cp		4
		jr		nz, p78loc_7DFD
		call	j_CursorDown
		ret
; ---------------------------------------------------------------------------

p78loc_7DFD:
		cp		0Eh
		jr		nz, p78loc_7E05
		call	j_JcursorFirst
		ret
; ---------------------------------------------------------------------------

p78loc_7E05:
		cp		0Fh
		jp		z, j_JcursorLast
		cp		0Bh
		jr		nz, p78loc_7E12
		call	Page0Call_369F
		ret
; ---------------------------------------------------------------------------

p78loc_7E12:
		cp		21h ; '!'
		jr		nz, p78loc_7E1C
		call	j_CursorLeft
		ret		z
		jr		p78loc_7E20
; ---------------------------------------------------------------------------

p78loc_7E1C:
		cp		0Ah
		jr		nz, p78loc_7E2B

p78loc_7E20:
		res		textInsMode, (iy+textFlags)
		call	j_BufDelete
		call	j_DispEOW
		ret
; ---------------------------------------------------------------------------

p78loc_7E2B:
		cp		9
		jr		nz, p78loc_7E55
		call	IsEditEmpty
		jr		nz, p78loc_7E3F

p78loc_7E34:
		call	j_ClrWindow
		ld		hl, ioPrompt
		call	j_PutS
		jr		p78loc_7E4F
; ---------------------------------------------------------------------------

p78loc_7E3F:
		res		textScrolled, (iy+textFlags)
		call	j_DispHead
		bit		textScrolled, (iy+textFlags)
		jr		nz, p78loc_7E34
		call	j_EraseEOW2

p78loc_7E4F:
		call	j_BufClear
		jp		CanAlphIns
; ---------------------------------------------------------------------------

p78loc_7E55:
		cp		0Ch
		jp		z, j_RCLREGEQ_CALL
		bit		enableQueue, (iy+rclFlag)
		jr		nz, p78loc_7E63
		cp		8Ah ; '�'
		ret		z

p78loc_7E63:
		cp		5Ah ; 'Z'
		ret		c
		call	page0_1808
		jp		z, j_initNamePrompt2
		jp		j_InsDisp
p78loc_7E6F:
		call	j_DispTail
		call	j_CloseEditEqu
		ld		a, (curRow+1)
		or		a
		call	nz, j_newline
p78loc_7E7C:
		call	j_saveCmdShadow
		ret
p78loc_7E80:
		jp		j_rstrShadow
p78loc_7E83:
		call	j_ClrWindow
		call	p78sub_7EEC
		call	j_setupEditEqu
		ld		hl, ioPrompt
		call	j_PutS
		call	j_cursorToOffset
		ret
; ---------------------------------------------------------------------------
		call	j_CloseEditEqu
		jp		ErrMemory_NoGoTo
p78loc_7E9C:
		jp		nc, j_shrinkWindow
		call	j_rstrUnderMenu
		call	j_DispEOW
		ret

; =============== S U B	R O U T	I N E =======================================


p78sub_7EA6:
		ld		hl, 3Fh	; '?'
		ld		(ioPrompt), hl
		ret
; End of function p78sub_7EA6


; =============== S U B	R O U T	I N E =======================================


Page78_2D81:
		ex		de, hl
		ld		c, (hl)
		inc		hl
		ld		b, (hl)
		xor		a
		ld		(unk_865E), a
		jr		p78loc_7ECF
; ---------------------------------------------------------------------------

p78loc_7EB7:
		dec		bc
		push	de
		inc		hl
		call	j_BUFPEEK3
		jr		nc, p78loc_7EC0
		dec		bc

p78loc_7EC0:
		ex		(sp), hl
		push	bc
		push	hl
		call	j_GetTokLen
		pop		de
		inc		hl
		call	j_TOTOSTRP
		pop		bc
		pop		hl
		jr		z, p78loc_7ED3

p78loc_7ECF:
		ld		a, b
		or		c
		jr		nz, p78loc_7EB7

p78loc_7ED3:
		ex		de, hl
		ld		(hl), 0
		ret
; End of function Page78_2D81

; ---------------------------------------------------------------------------
		ld		hl, 8479h
		ld		b, 0
		ld		c, (hl)
		inc		hl
		ld		de, ioPrompt
		ldir
		ld		hl, p78loc_7EE9
		jp		strcopy
p78loc_7EE9:
a?_78:		.asc '=?',0

; =============== S U B	R O U T	I N E =======================================


p78sub_7EEC:
		ld		hl, 2Dh	; '-'
		jp		page0_1671
; End of function p78sub_7EEC


; =============== S U B	R O U T	I N E =======================================


p78sub_7EF2:
		call	p78sub_7EEC
		rst		10h
		call	nc, DelVar
		ret
; End of function p78sub_7EF2


; =============== S U B	R O U T	I N E =======================================


GetStringInput:
		res		parseInput, (iy+onFlags)
		jr		p78loc_7F04
; End of function GetStringInput


; =============== S U B	R O U T	I N E =======================================


GetStringInput2:
		set		parseInput, (iy+onFlags)

p78loc_7F04:
		ld		a, (basic_prog+1)
		push	af
		set		0, (iy+29h)
		ld		a, 50h ; 'P'
		call	newContext
		call	Mon
		set		donePrgm, (iy+doneFlags)
		call	PushOP1
		call	j_EraseEOW2
		set		1, (iy+29h)
		ld		a, 3Fh ; '?'
		call	newContext
		pop		af
		ld		(basic_prog+1), a
		jp		popOP1
; End of function GetStringInput2


; =============== S U B	R O U T	I N E =======================================


Page78_3837:
		call	j_ClrWindow
		res		plotDisp, (iy+plotFlags)
		set		donePrgm, (iy+doneFlags)
		ret
; End of function Page78_3837


; =============== S U B	R O U T	I N E =======================================


Disp:
		set		appAutoScroll, (iy+appFlags)
		bit		plotDisp, (iy+plotFlags)
		ret		z
		sub		a
		ld		(curGStyle), a
		res		allowCursor, (iy+plotFlags)
		res		appCurGraphic, (iy+appFlags)
		call	j_saveShadow2
		call	j_rstrShadow2
		set		NEED_BUFCPY, (iy+VERTFLAG2)
		set		NEED_RETABLE, (iy+VERTFLAG2)
		ret
; End of function Disp


; =============== S U B	R O U T	I N E =======================================


p78sub_7F5E:
		set		donePrgm, (iy+doneFlags)
		call	Disp
		call	j_formDisp
		call	j_disarmScroll
		ret
; End of function p78sub_7F5E


; =============== S U B	R O U T	I N E =======================================


Page78_32F1:
		ld		a, 0AAh	; '�'
		ld		(indicBusy), a

p78loc_7F71:
		call	j_getkey
		call	IsOnInterruptSet
		jr		nz, p78loc_7F7D
		cp		5
		jr		nz, p78loc_7F71

p78loc_7F7D:
		; WaitEnterKeyValue+42j
		sub		a
		ld		(kbdGetKy), a
		bit		saIndic, (iy+newIndicFlags)
		jr		z, p78loc_7F8E
		call	j_restoreTR
		res		saIndic, (iy+newIndicFlags)

p78loc_7F8E:
		ld		a, 0F0h	; '�'
		ld		(indicBusy), a
		ret
; End of function Page78_32F1


; =============== S U B	R O U T	I N E =======================================


WaitEnterKeyValue:
		set		donePrgm, (iy+doneFlags)
		call	Disp
		call	j_formDisp
		ld		a, 0AAh	; '�'
		ld		(indicBusy), a

p78loc_7FA3:
		; WaitEnterKeyValue+27j ...
		call	j_getkey
		call	IsOnInterruptSet
		jr		nz, p78loc_7FD3
		cp		1
		jr		nz, p78loc_7FB4
		call	j_wscrollRight
		jr		p78loc_7FA3
; ---------------------------------------------------------------------------

p78loc_7FB4:
		cp		2
		jr		nz, p78loc_7FBD
		call	j_wscrollLeft
		jr		p78loc_7FA3
; ---------------------------------------------------------------------------

p78loc_7FBD:
		cp		3
		jr		nz, p78loc_7FC6
		call	j_wscrollUp
		jr		p78loc_7FA3
; ---------------------------------------------------------------------------

p78loc_7FC6:
		cp		4
		jr		nz, p78loc_7FCF
		call	j_wscrollDown
		jr		p78loc_7FA3
; ---------------------------------------------------------------------------

p78loc_7FCF:
		cp		5
		jr		nz, p78loc_7FA3

p78loc_7FD3:
		call	j_disarmScroll
		jr		p78loc_7F7D