source/page78/initial.asm
changeset 41 9ef17625274f
parent 39 4651e87022c7
child 42 adad2f097dcb
equal deleted inserted replaced
40:ba7bd14b7d7b 41:9ef17625274f
  1871 		sub		a
  1871 		sub		a
  1872 		ld		(kbdGetKy), a
  1872 		ld		(kbdGetKy), a
  1873 		ld		a, 0F0h	; '�'
  1873 		ld		a, 0F0h	; '�'
  1874 		ld		(indicBusy), a
  1874 		ld		(indicBusy), a
  1875 		call	j_RETSCREEN
  1875 		call	j_RETSCREEN
  1876 		set		6, (iy+1Dh)
  1876 		set		NEED_BUFCPY, (iy+VERTFLAG2)
  1877 		set		7, (iy+1Dh)
  1877 		set		NEED_RETABLE, (iy+VERTFLAG2)
  1878 		jr		p78loc_4B62
  1878 		jr		p78loc_4B62
  1879 p78loc_4BD3:
  1879 p78loc_4BD3:
  1880 		call	p78sub_7D37
  1880 		call	p78sub_7D37
  1881 		pop		hl
  1881 		pop		hl
  1882 		ld		(curRow), hl
  1882 		ld		(curRow), hl
  3178 		res		grfSplit, (iy+sGrFlags)
  3178 		res		grfSplit, (iy+sGrFlags)
  3179 		set		vertSplit, (iy+sGrFlags)
  3179 		set		vertSplit, (iy+sGrFlags)
  3180 		set		2, (iy+15h)
  3180 		set		2, (iy+15h)
  3181 		set		grfSChanged, (iy+sGrFlags)
  3181 		set		grfSChanged, (iy+sGrFlags)
  3182 		call	j_SetYOffset
  3182 		call	j_SetYOffset
  3183 		set		6, (iy+1Dh)
  3183 		set		NEED_BUFCPY, (iy+VERTFLAG2)
  3184 		set		7, (iy+1Dh)
  3184 		set		NEED_RETABLE, (iy+VERTFLAG2)
  3185 		call	RESETWINTOP
  3185 		call	RESETWINTOP
  3186 		set		reTable, (iy+tblFlags)
  3186 		set		reTable, (iy+tblFlags)
  3187 		call	Page78_3837
  3187 		call	Page78_3837
  3188 		jp		SetTblGraphDraw
  3188 		jp		SetTblGraphDraw
  3189 p78loc_5403:
  3189 p78loc_5403:
  4012 		ld		bc, p78loc_5A67
  4012 		ld		bc, p78loc_5A67
  4013 		jr		p78loc_594F
  4013 		jr		p78loc_594F
  4014 ; ---------------------------------------------------------------------------
  4014 ; ---------------------------------------------------------------------------
  4015 
  4015 
  4016 ParseInpLastEnt:
  4016 ParseInpLastEnt:
  4017 		call	page0_1664
  4017 		call	command_buf_to_OP1
  4018 
  4018 
  4019 ParseInp:
  4019 ParseInp:
  4020 		xor		a
  4020 		xor		a
  4021 		ld		(EST), a
  4021 		ld		(EST), a
  4022 		call	InitPFlgs
  4022 		call	InitPFlgs
  4324 		call	p78sub_6895
  4324 		call	p78sub_6895
  4325 		call	p78sub_5BEC
  4325 		call	p78sub_5BEC
  4326 		call	CURFETCH
  4326 		call	CURFETCH
  4327 		cp		0Bh
  4327 		cp		0Bh
  4328 		jr		nz, p78loc_5B77
  4328 		jr		nz, p78loc_5B77
  4329 		call	p78sub_73D5
  4329 		call	p78cxPutAway_NoPartial5
  4330 		jr		nc, p78loc_5B3A
  4330 		jr		nc, p78loc_5B3A
  4331 		ld		hl, (nextParseByte)
  4331 		ld		hl, (nextParseByte)
  4332 		dec		hl
  4332 		dec		hl
  4333 		ld		(nextParseByte), hl
  4333 		ld		(nextParseByte), hl
  4334 		jr		p78loc_5B77
  4334 		jr		p78loc_5B77
  4342 		jp		nz, ErrSyntax
  4342 		jp		nz, ErrSyntax
  4343 		call	OP2Set60
  4343 		call	OP2Set60
  4344 		call	fpdiv
  4344 		call	fpdiv
  4345 		call	OP6ToOP2
  4345 		call	OP6ToOP2
  4346 		rst		30h
  4346 		rst		30h
  4347 		call	p78sub_73D5
  4347 		call	p78cxPutAway_NoPartial5
  4348 		jr		c, p78loc_5B77
  4348 		jr		c, p78loc_5B77
  4349 		call	OP1ToOP6
  4349 		call	OP1ToOP6
  4350 		call	p78sub_5BEC
  4350 		call	p78sub_5BEC
  4351 		call	OP2Set60
  4351 		call	OP2Set60
  4352 		inc		(hl)
  4352 		inc		(hl)
  9087 
  9087 
  9088 
  9088 
  9089 ; =============== S U B	R O U T	I N E =======================================
  9089 ; =============== S U B	R O U T	I N E =======================================
  9090 
  9090 
  9091 
  9091 
  9092 p78sub_73D5:
  9092 p78cxPutAway_NoPartial5:
  9093 		; ParseInpGraphReset+22Fp
  9093 		; ParseInpGraphReset+22Fp
  9094 		call	INCFETCH
  9094 		call	INCFETCH
  9095 		cp		30h ; '0'
  9095 		cp		30h ; '0'
  9096 		ret		c
  9096 		ret		c
  9097 		cp		3Ch ; '<'
  9097 		cp		3Ch ; '<'
  9098 		ccf
  9098 		ccf
  9099 		ret
  9099 		ret
  9100 ; End of function p78sub_73D5
  9100 ; End of function p78cxPutAway_NoPartial5
  9101 
  9101 
  9102 
  9102 
  9103 ; =============== S U B	R O U T	I N E =======================================
  9103 ; =============== S U B	R O U T	I N E =======================================
  9104 
  9104 
  9105 
  9105 
  9720 		jp		p78loc_75DE
  9720 		jp		p78loc_75DE
  9721 ; End of function p78sub_759D
  9721 ; End of function p78sub_759D
  9722 
  9722 
  9723 ; ---------------------------------------------------------------------------
  9723 ; ---------------------------------------------------------------------------
  9724 
  9724 
  9725 Page78_2E47:
  9725 InitHomescreenContext:
  9726 		ld		a, 3
  9726 		ld		a, 3
  9727 		bit		homescreenHookActive, (iy+hookflags2)
  9727 		bit		homescreenHookActive, (iy+hookflags2)
  9728 		call	nz, Page0Call_2D51
  9728 		call	nz, Page0Call_2D51
  9729 		ret		nz
  9729 		ret		nz
  9730 		bit		2, (iy+29h)
  9730 		bit		2, (iy+29h)
  9731 		call	nz, j_AppSetup
  9731 		call	nz, j_AppSetup
  9732 		res		ignoreBPLink, (iy+hookflags1)
  9732 		res		ignoreBPLink, (iy+hookflags1)
  9733 		ld		a, (iy+3Ch)
  9733 		ld		a, (iy+3Ch)
  9734 		and		0F4h ; '�'
  9734 		and		0F4h ; '�'
  9735 		ld		(iy+3Ch), a
  9735 		ld		(iy+3Ch), a
  9736 		call	page0_17DB
  9736 		call	ResetSplitOverride
  9737 		ld		a, (SEspeed)
  9737 		ld		a, (SEspeed)
  9738 		or		a
  9738 		or		a
  9739 		call	nz, SetSpeed_NZForFast
  9739 		call	nz, SetSpeed_NZForFast
  9740 		xor		a
  9740 		xor		a
  9741 		ld		(SEspeed), a
  9741 		ld		(SEspeed), a
  9818 p78loc_77A6:
  9818 p78loc_77A6:
  9819 		res		monAbandon, (iy+monFlags)
  9819 		res		monAbandon, (iy+monFlags)
  9820 		res		7, (iy+0Ch)
  9820 		res		7, (iy+0Ch)
  9821 		call	RESETWINTOP
  9821 		call	RESETWINTOP
  9822 		call	j_ClrWindow
  9822 		call	j_ClrWindow
  9823 		call	Page78_3E9D
  9823 		call	SetupLastEntryEditResetFlags
  9824 		res		cmdVirgin, (iy+cmdFlags)
  9824 		res		cmdVirgin, (iy+cmdFlags)
  9825 		ld		hl, basic_prog
  9825 		ld		hl, basic_prog
  9826 		rst		20h
  9826 		rst		20h
  9827 		call	CkOP1Real
  9827 		call	CkOP1Real
  9828 		cp		6
  9828 		cp		6
  9829 		jp		z, Page0Call_24F9
  9829 		jp		z, ErrMemory_NoGoTo
  9830 		cp		5
  9830 		cp		5
  9831 		jr		nz, p78loc_77D5
  9831 		jr		nz, p78loc_77D5
  9832 		call	FINDPROGSYM
  9832 		call	FINDPROGSYM
  9833 		jr		c, p78loc_77D8
  9833 		jr		c, p78loc_77D8
  9834 		call	Page0Call_2415
  9834 		call	Page0Call_2415
  9837 
  9837 
  9838 p78loc_77D5:
  9838 p78loc_77D5:
  9839 		call	j_rclVarToEdit
  9839 		call	j_rclVarToEdit
  9840 
  9840 
  9841 p78loc_77D8:
  9841 p78loc_77D8:
  9842 		jp		c, Page0Call_24F9
  9842 		jp		c, ErrMemory_NoGoTo
  9843 		ld		de, 2Ah	; '*'
  9843 		ld		de, 2Ah	; '*'
  9844 		call	j_bufInsert
  9844 		call	j_bufInsert
  9845 		jr		z, p78loc_7835
  9845 		jr		z, p78loc_7835
  9846 		ld		de, 4
  9846 		ld		de, 4
  9847 		call	j_bufInsert
  9847 		call	j_bufInsert
  9896 		call	j_BufToTop
  9896 		call	j_BufToTop
  9897 		ld		de, 2Ah	; '*'
  9897 		ld		de, 2Ah	; '*'
  9898 		call	j_bufInsert
  9898 		call	j_bufInsert
  9899 
  9899 
  9900 p78loc_7835:
  9900 p78loc_7835:
  9901 		jp		z, Page0Call_24F9
  9901 		jp		z, ErrMemory_NoGoTo
  9902 		ld		hl, (errOffset)
  9902 		ld		hl, (errOffset)
  9903 		inc		hl
  9903 		inc		hl
  9904 		ld		(errOffset), hl
  9904 		ld		(errOffset), hl
  9905 		call	j_cursorToOffset
  9905 		call	j_cursorToOffset
  9906 		jp		zero_basic_prog
  9906 		jp		zero_basic_prog
  9932 		jp		z, p78loc_78FF
  9932 		jp		z, p78loc_78FF
  9933 		call	j_newline
  9933 		call	j_newline
  9934 		ei
  9934 		ei
  9935 		call	j_CloseEditEqu
  9935 		call	j_CloseEditEqu
  9936 		call	j_disarmScroll
  9936 		call	j_disarmScroll
  9937 		call	page0_1664
  9937 		call	command_buf_to_OP1
  9938 		call	FINDPROGSYM
  9938 		call	FINDPROGSYM
  9939 		push	hl
  9939 		push	hl
  9940 		ex		de, hl
  9940 		ex		de, hl
  9941 		ld		c, (hl)
  9941 		ld		c, (hl)
  9942 		inc		hl
  9942 		inc		hl
 10000 		inc		(hl)
 10000 		inc		(hl)
 10001 
 10001 
 10002 p78loc_78E2:
 10002 p78loc_78E2:
 10003 		pop		hl
 10003 		pop		hl
 10004 		push	hl
 10004 		push	hl
 10005 		call	page0_165F
 10005 		call	last_entry_to_OP1
 10006 		call	FINDPROGSYM
 10006 		call	FINDPROGSYM
 10007 		ld		de, 0FFF9h
 10007 		ld		de, 0FFF9h
 10008 		add		hl, de
 10008 		add		hl, de
 10009 		ld		(hl), 23h ; '#'
 10009 		ld		(hl), 23h ; '#'
 10010 		pop		hl
 10010 		pop		hl
 10038 		bit		homescreenHookActive, (iy+hookflags2)
 10038 		bit		homescreenHookActive, (iy+hookflags2)
 10039 		call	nz, Page0Call_2D51
 10039 		call	nz, Page0Call_2D51
 10040 		jr		nz, p78loc_7961
 10040 		jr		nz, p78loc_7961
 10041 		bit		plotDisp, (iy+plotFlags)
 10041 		bit		plotDisp, (iy+plotFlags)
 10042 		jr		z, p78loc_7949
 10042 		jr		z, p78loc_7949
 10043 		call	Page78_3E9D
 10043 		call	SetupLastEntryEditResetFlags
 10044 		ld		a, 44h ; 'D'
 10044 		ld		a, 44h ; 'D'
 10045 		call	newContext
 10045 		call	newContext
 10046 		ld		a, 44h ; 'D'
 10046 		ld		a, 44h ; 'D'
 10047 		jp		cxMain
 10047 		jp		cxMain
 10048 ; ---------------------------------------------------------------------------
 10048 ; ---------------------------------------------------------------------------
 10059 		jp		nz, Page78_344D
 10059 		jp		nz, Page78_344D
 10060 		bit		donePrgm, (iy+doneFlags)
 10060 		bit		donePrgm, (iy+doneFlags)
 10061 		call	nz, j_DispDone
 10061 		call	nz, j_DispDone
 10062 
 10062 
 10063 p78loc_7961:
 10063 p78loc_7961:
 10064 		jp		Page78_3E9D
 10064 		jp		SetupLastEntryEditResetFlags
 10065 ; ---------------------------------------------------------------------------
 10065 ; ---------------------------------------------------------------------------
 10066 
 10066 
 10067 p78loc_7964:
 10067 p78loc_7964:
 10068 		bit		7, (iy+9)
 10068 		bit		7, (iy+9)
 10069 		jr		z, p78loc_797B
 10069 		jr		z, p78loc_797B
 10183 ; ---------------------------------------------------------------------------
 10183 ; ---------------------------------------------------------------------------
 10184 
 10184 
 10185 p78loc_7A32:
 10185 p78loc_7A32:
 10186 		call	j_BufClear
 10186 		call	j_BufClear
 10187 		call	j_EraseEOW2
 10187 		call	j_EraseEOW2
 10188 		jp		Page0Call_24F9
 10188 		jp		ErrMemory_NoGoTo
 10189 ; ---------------------------------------------------------------------------
 10189 ; ---------------------------------------------------------------------------
 10190 
 10190 
 10191 p78loc_7A3B:
 10191 p78loc_7A3B:
 10192 		cp		5Ah ; 'Z'
 10192 		cp		5Ah ; 'Z'
 10193 		ret		c
 10193 		ret		c
 10234 p78loc_7A99:
 10234 p78loc_7A99:
 10235 		res		appCurGraphic, (iy+appFlags)
 10235 		res		appCurGraphic, (iy+appFlags)
 10236 		call	RESETWINTOP
 10236 		call	RESETWINTOP
 10237 		call	p78sub_7EF2
 10237 		call	p78sub_7EF2
 10238 		call	j_ClrWindow
 10238 		call	j_ClrWindow
 10239 		call	Page78_3E9D
 10239 		call	SetupLastEntryEditResetFlags
 10240 		res		cmdVirgin, (iy+cmdFlags)
 10240 		res		cmdVirgin, (iy+cmdFlags)
 10241 		call	page0_1664
 10241 		call	command_buf_to_OP1
 10242 		call	FINDPROGSYM
 10242 		call	FINDPROGSYM
 10243 		call	j_rclVarToEditPtR
 10243 		call	j_rclVarToEditPtR
 10244 		jp		c, Page0Call_24F9
 10244 		jp		c, ErrMemory_NoGoTo
 10245 		call	j_cursorToOffset
 10245 		call	j_cursorToOffset
 10246 		ret
 10246 		ret
 10247 p78loc_7ABD:
 10247 p78loc_7ABD:
 10248 		jr		c, p78loc_7ADA
 10248 		jr		c, p78loc_7ADA
 10249 		ld		a, (curRow)
 10249 		ld		a, (curRow)
 10269 		call	j_DispEOW
 10269 		call	j_DispEOW
 10270 		ret
 10270 		ret
 10271 ; ---------------------------------------------------------------------------
 10271 ; ---------------------------------------------------------------------------
 10272 
 10272 
 10273 Page78_2D63:
 10273 Page78_2D63:
 10274 		call	page0_1664
 10274 		call	command_buf_to_OP1
 10275 		call	FINDPROGSYM
 10275 		call	FINDPROGSYM
 10276 		call	nc, DelVar
 10276 		call	nc, DelVar
 10277 		ld		hl, 0
 10277 		ld		hl, 0
 10278 		call	CreateProg
 10278 		call	CreateProg
 10279 		call	page0_165F
 10279 		call	last_entry_to_OP1
 10280 		call	FINDPROGSYM
 10280 		call	FINDPROGSYM
 10281 		call	nc, DelVar
 10281 		call	nc, DelVar
 10282 		ld		hl, 0
 10282 		ld		hl, 0
 10283 		ld		(cmdCursor), hl
 10283 		ld		(cmdCursor), hl
 10284 		call	CreateProg
 10284 		call	CreateProg
 10285 		ld		hl, p78loc_7845
 10285 		ld		hl, p78loc_7845
 10286 		call	AppInit
 10286 		call	AppInit
 10287 		ld		a, 40h ; '@'
 10287 		ld		a, appStart
 10288 		ld		(mcxCurApp), a
 10288 		ld		(mcxCurApp), a
 10289 
 10289 SetupLastEntryEditResetFlags:
 10290 ; =============== S U B	R O U T	I N E =======================================
 10290 		call	last_entry_to_OP1
 10291 
       
 10292 
       
 10293 Page78_3E9D:
       
 10294 		call	page0_165F
       
 10295 		call	FINDPROGSYM
 10291 		call	FINDPROGSYM
 10296 		call	j_SetEmptyEditPtr
 10292 		call	j_SetEmptyEditPtr
 10297 		res		cmdExec, (iy+cmdFlags)
 10293 		res		cmdExec, (iy+cmdFlags)
 10298 		res		prgmEdit, (iy+prgmFlags)
 10294 		res		prgmEdit, (iy+prgmFlags)
 10299 
       
 10300 p78loc_7B21:
 10295 p78loc_7B21:
 10301 		set		cmdVirgin, (iy+cmdFlags)
 10296 		set		cmdVirgin, (iy+cmdFlags)
 10302 		res		textInsMode, (iy+textFlags)
 10297 		res		textInsMode, (iy+textFlags)
 10303 		ret
 10298 		ret
 10304 ; End of function Page78_3E9D
       
 10305 
       
 10306 ; ---------------------------------------------------------------------------
       
 10307 
 10299 
 10308 Page78_344D:
 10300 Page78_344D:
 10309 		call	Page78_3E9D
 10301 		call	SetupLastEntryEditResetFlags
 10310 		set		numOP1, (iy+ParsFlag2)
 10302 		set		numOP1, (iy+ParsFlag2)
 10311 		call	j_ClrScrn
 10303 		call	j_ClrScrn
 10312 		call	p78sub_7D57
 10304 		call	p78sub_7D57
 10313 		ld		a, (unk_8A36)
 10305 		ld		a, (unk_8A36)
 10314 		bit		7, (iy+11h)
 10306 		bit		7, (iy+11h)
 10710 		ret
 10702 		ret
 10711 ; End of function p78sub_7D57
 10703 ; End of function p78sub_7D57
 10712 
 10704 
 10713 ; ---------------------------------------------------------------------------
 10705 ; ---------------------------------------------------------------------------
 10714 
 10706 
 10715 Page78_3A65:
 10707 InitProgramInputContext:
 10716 		ld		hl, p78loc_7D81
 10708 		ld		hl, p78loc_7D81
 10717 		call	AppInit
 10709 		call	AppInit
 10718 		call	j_rstrShadow2
 10710 		call	j_rstrShadow2
 10719 		call	p78sub_7EEC
 10711 		call	p78sub_7EEC
 10720 		rst		10h
 10712 		rst		10h
 10902 		call	j_PutS
 10894 		call	j_PutS
 10903 		call	j_cursorToOffset
 10895 		call	j_cursorToOffset
 10904 		ret
 10896 		ret
 10905 ; ---------------------------------------------------------------------------
 10897 ; ---------------------------------------------------------------------------
 10906 		call	j_CloseEditEqu
 10898 		call	j_CloseEditEqu
 10907 		jp		Page0Call_24F9
 10899 		jp		ErrMemory_NoGoTo
 10908 p78loc_7E9C:
 10900 p78loc_7E9C:
 10909 		jp		nc, j_shrinkWindow
 10901 		jp		nc, j_shrinkWindow
 10910 		call	j_rstrUnderMenu
 10902 		call	j_rstrUnderMenu
 10911 		call	j_DispEOW
 10903 		call	j_DispEOW
 10912 		ret
 10904 		ret
 11053 		ld		(curGStyle), a
 11045 		ld		(curGStyle), a
 11054 		res		allowCursor, (iy+plotFlags)
 11046 		res		allowCursor, (iy+plotFlags)
 11055 		res		appCurGraphic, (iy+appFlags)
 11047 		res		appCurGraphic, (iy+appFlags)
 11056 		call	j_saveShadow2
 11048 		call	j_saveShadow2
 11057 		call	j_rstrShadow2
 11049 		call	j_rstrShadow2
 11058 		set		6, (iy+1Dh)
 11050 		set		NEED_BUFCPY, (iy+VERTFLAG2)
 11059 		set		7, (iy+1Dh)
 11051 		set		NEED_RETABLE, (iy+VERTFLAG2)
 11060 		ret
 11052 		ret
 11061 ; End of function Disp
 11053 ; End of function Disp
 11062 
 11054 
 11063 
 11055 
 11064 ; =============== S U B	R O U T	I N E =======================================
 11056 ; =============== S U B	R O U T	I N E =======================================