;--- push 256 bytes
PUSH256
	LD	B,1
PUSH256_N
	LD	(SOHRSP_PUSH256),SP
	LD	SP,HL
PUSH256LP
	DUP	128
	PUSH	DE
	EDUP
	DEC	B
	JP	NZ,PUSH256LP
	LD	SP,#3131
SOHRSP_PUSH256 EQU $-2
	RET



	LD	HL,#4000
	CALL	FILLSCR_SLOW	
	LD	HL,#C400
	CALL	FILLSCR_SLOW
;------- fillscr
FILLSCR_SLOW
	LD	LX,3
	LD	D,H
	LD	E,L
	INC	E
FILLSCRS1
	LD	(HL),#F0
	LD	BC,256*4-1
	LDIR
	INC	HL
	INC	DE
	LD	A,H
	ADD	A,4
	LD	H,A
	LD	A,D
	ADD	A,4
	LD	D,A
	DEC	LX
	JP	NZ,FILLSCRS1
	RET



	
	
;------- fillscr
FILLSCR_FAST
	LD	LX,3
	LD	D,H
	LD	E,L
	INC	E
FILLSCRF1
	LD	(HL),#F0
	LD	A,7
	CALL	LDI128_N
	CALL	LDI127
	INC	HL
	INC	DE
	LD	A,H
	ADD	A,4
	LD	H,A
	LD	A,D
	ADD	A,4
	LD	D,A
	DEC	LX
	JP	NZ,FILLSCRF1
	RET
;--- ldi 128 bytes
LDI127	LD	A,1
	JP	LDI128_N + 2
LDI128	LD	A,1
LDI128_N
	DUP	128
	LDI
	EDUP
	DEC	A
	JP	NZ,LDI128_N
	RET