source/page78/initial.asm
changeset 43 486c42a314bc
parent 42 adad2f097dcb
child 46 09e7d89fba35
equal deleted inserted replaced
42:adad2f097dcb 43:486c42a314bc
  1800 
  1800 
  1801 p78loc_4B2E:
  1801 p78loc_4B2E:
  1802 		call	popErrorHandleR
  1802 		call	popErrorHandleR
  1803 		ld		hl, OP1M
  1803 		ld		hl, OP1M
  1804 		push	hl
  1804 		push	hl
  1805 		call	page0_118B
  1805 		call	Mov5B
  1806 		push	de
  1806 		push	de
  1807 		call	CpyTo1FPS2
  1807 		call	CpyTo1FPS2
  1808 		pop		de
  1808 		pop		de
  1809 		pop		hl
  1809 		pop		hl
  1810 		call	page0_118B
  1810 		call	Mov5B
  1811 		call	SetTblGraphDraw
  1811 		call	SetTblGraphDraw
  1812 		ld		bc, 24h	; '$'
  1812 		ld		bc, 24h	; '$'
  1813 		call	FPOPFPS
  1813 		call	FPOPFPS
  1814 		jp		p78loc_47BC
  1814 		jp		p78loc_47BC
  1815 p78loc_4B4D:
  1815 p78loc_4B4D:
  1948 
  1948 
  1949 p78loc_4C44:
  1949 p78loc_4C44:
  1950 		call	p78sub_538F
  1950 		call	p78sub_538F
  1951 		call	p78sub_53C8
  1951 		call	p78sub_53C8
  1952 		ld		hl, OP1M
  1952 		ld		hl, OP1M
  1953 		call	page0_118B
  1953 		call	Mov5B
  1954 		call	p78sub_53C8
  1954 		call	p78sub_53C8
  1955 		ld		hl, OP1M
  1955 		ld		hl, OP1M
  1956 		call	page0_118B
  1956 		call	Mov5B
  1957 
  1957 
  1958 p78loc_4C59:
  1958 p78loc_4C59:
  1959 		call	p78sub_53B4
  1959 		call	p78sub_53B4
  1960 
  1960 
  1961 p78loc_4C5C:
  1961 p78loc_4C5C:
  2002 		cp		5Bh ; '['
  2002 		cp		5Bh ; '['
  2003 		jp		nz, ErrSyntax
  2003 		jp		nz, ErrSyntax
  2004 		call	p78sub_538F
  2004 		call	p78sub_538F
  2005 		call	p78sub_53C8
  2005 		call	p78sub_53C8
  2006 		ld		hl, OP1M
  2006 		ld		hl, OP1M
  2007 		call	page0_118B
  2007 		call	Mov5B
  2008 		call	p78sub_53B4
  2008 		call	p78sub_53B4
  2009 		call	INCFETCH
  2009 		call	INCFETCH
  2010 		cp		58h ; 'X'
  2010 		cp		58h ; 'X'
  2011 		jr		z, p78loc_4C59
  2011 		jr		z, p78loc_4C59
  2012 		cp		59h ; 'Y'
  2012 		cp		59h ; 'Y'
  2029 		ld		a, b
  2029 		ld		a, b
  2030 		ld		(OP2), a
  2030 		ld		(OP2), a
  2031 		call	p78sub_538F
  2031 		call	p78sub_538F
  2032 		call	p78sub_53C8
  2032 		call	p78sub_53C8
  2033 		ld		hl, OP1M
  2033 		ld		hl, OP1M
  2034 		call	page0_118B
  2034 		call	Mov5B
  2035 		call	p78sub_53B4
  2035 		call	p78sub_53B4
  2036 		call	CKENDLIN
  2036 		call	CKENDLIN
  2037 		cp		82h ; '�'
  2037 		cp		82h ; '�'
  2038 		jr		nc, p78loc_4CEE
  2038 		jr		nc, p78loc_4CEE
  2039 		cp		7Fh ; ''
  2039 		cp		7Fh ; ''
  2057 p78loc_4CFC:
  2057 p78loc_4CFC:
  2058 		push	hl
  2058 		push	hl
  2059 		call	p78loc_49F9
  2059 		call	p78loc_49F9
  2060 		pop		de
  2060 		pop		de
  2061 		ld		hl, OP1M
  2061 		ld		hl, OP1M
  2062 		call	page0_118B
  2062 		call	Mov5B
  2063 
  2063 
  2064 p78loc_4D07:
  2064 p78loc_4D07:
  2065 		ld		a, (OP2)
  2065 		ld		a, (OP2)
  2066 		cp		2
  2066 		cp		2
  2067 		jp		z, p78loc_4C59
  2067 		jp		z, p78loc_4C59
  2530 		call	CkOP1FP0
  2530 		call	CkOP1FP0
  2531 		ret		z
  2531 		ret		z
  2532 		ld		a, (OP1+1)
  2532 		ld		a, (OP1+1)
  2533 		cp		82h ; '�'
  2533 		cp		82h ; '�'
  2534 		jp		nc, ErrDomain
  2534 		jp		nc, ErrDomain
  2535 		call	ErrD_OP1NotPosInt
  2535 		call	ErrD_OP1NotPosDoInt
  2536 		call	ConvOP1
  2536 		call	ConvOP1
  2537 		ret
  2537 		ret
  2538 ; End of function p78sub_4FF4
  2538 ; End of function p78sub_4FF4
  2539 
  2539 
  2540 p78loc_5010:
  2540 p78loc_5010:
  3124 		inc		hl
  3124 		inc		hl
  3125 		push	hl
  3125 		push	hl
  3126 		ex		de, hl
  3126 		ex		de, hl
  3127 		call	ZeroOP1
  3127 		call	ZeroOP1
  3128 		ld		hl, OP1M
  3128 		ld		hl, OP1M
  3129 		call	page0_118B
  3129 		call	Mov5B
  3130 		ld		hl, OP1M
  3130 		ld		hl, OP1M
  3131 		ld		(hl), 1
  3131 		ld		(hl), 1
  3132 		call	page0_118B
  3132 		call	Mov5B
  3133 		ld		hl, OP1M
  3133 		ld		hl, OP1M
  3134 		ld		(hl), 31h ; '1'
  3134 		ld		(hl), 31h ; '1'
  3135 		call	page0_118B
  3135 		call	Mov5B
  3136 		ex		de, hl
  3136 		ex		de, hl
  3137 		ld		(hl), 1
  3137 		ld		(hl), 1
  3138 		pop		de
  3138 		pop		de
  3139 		jp		SetGraphDraw
  3139 		jp		SetGraphDraw
  3140 ; End of function p78sub_538F
  3140 ; End of function p78sub_538F
  3368 		ld		de, (ES)
  3368 		ld		de, (ES)
  3369 		add		hl, de
  3369 		add		hl, de
  3370 		pop		de
  3370 		pop		de
  3371 		inc		hl
  3371 		inc		hl
  3372 		inc		hl
  3372 		inc		hl
  3373 		call	page0_118B
  3373 		call	Mov5B
  3374 		inc		hl
  3374 		inc		hl
  3375 		inc		hl
  3375 		inc		hl
  3376 		pop		bc
  3376 		pop		bc
  3377 		djnz	p78loc_5507
  3377 		djnz	p78loc_5507
  3378 		ex		de, hl
  3378 		ex		de, hl
  4758 
  4758 
  4759 p78loc_5D91:
  4759 p78loc_5D91:
  4760 		pop		af
  4760 		pop		af
  4761 		ld		hl, (nextParseByte)
  4761 		ld		hl, (nextParseByte)
  4762 		ld		de, OP1
  4762 		ld		de, OP1
  4763 		call	page0_118B
  4763 		call	Mov5B
  4764 		dec		hl
  4764 		dec		hl
  4765 		ld		(nextParseByte), hl
  4765 		ld		(nextParseByte), hl
  4766 		ld		hl, (OP1+1)
  4766 		ld		hl, (OP1+1)
  4767 		ld		(unk_9810), hl
  4767 		ld		(unk_9810), hl
  4768 		ld		hl, (OP1+3)
  4768 		ld		hl, (OP1+3)
  5379 
  5379 
  5380 ; =============== S U B	R O U T	I N E =======================================
  5380 ; =============== S U B	R O U T	I N E =======================================
  5381 
  5381 
  5382 
  5382 
  5383 p78sub_6128:
  5383 p78sub_6128:
  5384 		call	ErrD_OP1NotPosInt
  5384 		call	ErrD_OP1NotPosDoInt
  5385 		call	EOP1NotReal
  5385 		call	EOP1NotReal
  5386 		call	RECURNNAME
  5386 		call	RECURNNAME
  5387 		call	StoOther
  5387 		call	StoOther
  5388 		bit		5, (iy+7)
  5388 		bit		5, (iy+7)
  5389 		ret		nz
  5389 		ret		nz
  5532 		jr		nc, p78loc_6219
  5532 		jr		nc, p78loc_6219
  5533 		cp		1Dh
  5533 		cp		1Dh
  5534 		jp		c, p78loc_62DB
  5534 		jp		c, p78loc_62DB
  5535 		call	PopRealO1
  5535 		call	PopRealO1
  5536 		call	j_RndGuard
  5536 		call	j_RndGuard
  5537 		call	CKPosInt
  5537 		call	CKPosDoInt
  5538 		jr		z, p78loc_622D
  5538 		jr		z, p78loc_622D
  5539 		jr		p78loc_6235
  5539 		jr		p78loc_6235
  5540 ; ---------------------------------------------------------------------------
  5540 ; ---------------------------------------------------------------------------
  5541 
  5541 
  5542 p78loc_6219:
  5542 p78loc_6219:
  5685 		jr		c, p78loc_62D3
  5685 		jr		c, p78loc_62D3
  5686 		cp		32h ; '2'
  5686 		cp		32h ; '2'
  5687 		jr		nc, p78loc_62D3
  5687 		jr		nc, p78loc_62D3
  5688 		push	af
  5688 		push	af
  5689 		call	ErrD_OP1_LE_0
  5689 		call	ErrD_OP1_LE_0
  5690 		call	ErrD_OP1NotPosInt
  5690 		call	ErrD_OP1NotPosDoInt
  5691 		pop		af
  5691 		pop		af
  5692 		cp		30h ; '0'
  5692 		cp		30h ; '0'
  5693 		jr		nz, p78sub_6297
  5693 		jr		nz, p78sub_6297
  5694 		rst		18h
  5694 		rst		18h
  5695 		call	p78sub_6297
  5695 		call	p78sub_6297
  5705 		cp		36h ; '6'
  5705 		cp		36h ; '6'
  5706 		jr		nc, p78loc_62E6
  5706 		jr		nc, p78loc_62E6
  5707 
  5707 
  5708 p78loc_62DB:
  5708 p78loc_62DB:
  5709 		call	j_RndGuard
  5709 		call	j_RndGuard
  5710 		call	page0_14D1
  5710 		call	RealPosNo0DoInt
  5711 		jp		nz, ErrDomain
  5711 		jp		nz, ErrDomain
  5712 		jr		p78sub_6297
  5712 		jr		p78sub_6297
  5713 ; ---------------------------------------------------------------------------
  5713 ; ---------------------------------------------------------------------------
  5714 
  5714 
  5715 p78loc_62E6:
  5715 p78loc_62E6:
  5716 		cp		38h ; '8'
  5716 		cp		38h ; '8'
  5717 		jr		nc, p78sub_6297
  5717 		jr		nc, p78sub_6297
  5718 		call	j_RndGuard
  5718 		call	j_RndGuard
  5719 		call	page0_14D1
  5719 		call	RealPosNo0DoInt
  5720 		jp		nz, ErrDomain
  5720 		jp		nz, ErrDomain
  5721 		ld		a, (OP1+1)
  5721 		ld		a, (OP1+1)
  5722 		cp		81h ; '�'
  5722 		cp		81h ; '�'
  5723 		jp		nc, p78loc_6235
  5723 		jp		nc, p78loc_6235
  5724 		ld		a, (OP1M)
  5724 		ld		a, (OP1M)
  8559 p78loc_7188:
  8559 p78loc_7188:
  8560 		ld		a, (OP4+1)
  8560 		ld		a, (OP4+1)
  8561 		cp		5Dh ; ']'
  8561 		cp		5Dh ; ']'
  8562 		jr		nz, p78loc_7115
  8562 		jr		nz, p78loc_7115
  8563 		call	page0_FB5
  8563 		call	page0_FB5
  8564 		call	CKPosInt
  8564 		call	CKPosDoInt
  8565 		jp		nz, ErrDimension
  8565 		jp		nz, ErrDimension
  8566 		ld		hl, 3E7h
  8566 		ld		hl, 3E7h
  8567 		call	p78sub_71E1
  8567 		call	p78sub_71E1
  8568 		pop		af
  8568 		pop		af
  8569 		push	de
  8569 		push	de
  8628 ; =============== S U B	R O U T	I N E =======================================
  8628 ; =============== S U B	R O U T	I N E =======================================
  8629 
  8629 
  8630 
  8630 
  8631 ConvDim00:
  8631 ConvDim00:
  8632 		push	hl
  8632 		push	hl
  8633 		call	page0_14D1
  8633 		call	RealPosNo0DoInt
  8634 		jr		nz, p78loc_71F5
  8634 		jr		nz, p78loc_71F5
  8635 
  8635 
  8636 p78loc_71ED:
  8636 p78loc_71ED:
  8637 		call	ConvOP1
  8637 		call	ConvOP1
  8638 		pop		hl
  8638 		pop		hl
  8651 ConvOP1:
  8651 ConvOP1:
  8652 		; ConvDim00:p78loc_71EDp
  8652 		; ConvDim00:p78loc_71EDp
  8653 		ld		a, (OP1M)
  8653 		ld		a, (OP1M)
  8654 		or		a
  8654 		or		a
  8655 		call	z, OP1Set0
  8655 		call	z, OP1Set0
  8656 		ld		hl, 8479h
  8656 		ld		hl, OP1+1
  8657 		ld		a, 83h ; '�'
  8657 		ld		a, 83h ; '�'
  8658 		sub		(hl)
  8658 		sub		(hl)
  8659 		jr		c, p78loc_71F5
  8659 		jr		c, p78loc_71F5
  8660 		ld		b, a
  8660 		ld		b, a
  8661 		ld		hl, 847Bh
  8661 		ld		hl, 847Bh
  9864 		jp		c, ErrInvalid
  9864 		jp		c, ErrInvalid
  9865 		ld		a, (OP1+9)
  9865 		ld		a, (OP1+9)
  9866 		pop		de
  9866 		pop		de
  9867 		cp		e
  9867 		cp		e
  9868 		jr		nz, p78loc_77FD
  9868 		jr		nz, p78loc_77FD
  9869 		ld		hl, 8479h
  9869 		ld		hl, OP1+1
  9870 		ld		d, (hl)
  9870 		ld		d, (hl)
  9871 		inc		hl
  9871 		inc		hl
  9872 		ld		e, (hl)
  9872 		ld		e, (hl)
  9873 		ld		a, e
  9873 		ld		a, e
  9874 		cp		6
  9874 		cp		6
 10956 		ld		(hl), 0
 10956 		ld		(hl), 0
 10957 		ret
 10957 		ret
 10958 ; End of function Page78_2D81
 10958 ; End of function Page78_2D81
 10959 
 10959 
 10960 ; ---------------------------------------------------------------------------
 10960 ; ---------------------------------------------------------------------------
 10961 		ld		hl, 8479h
 10961 		ld		hl, OP1+1
 10962 		ld		b, 0
 10962 		ld		b, 0
 10963 		ld		c, (hl)
 10963 		ld		c, (hl)
 10964 		inc		hl
 10964 		inc		hl
 10965 		ld		de, ioPrompt
 10965 		ld		de, ioPrompt
 10966 		ldir
 10966 		ldir