
GetCurrentMB:
	di
	ld ix,0
	add ix,sp
	ld a,(ix+2)
	ld mb,a			;Get current block
	ld.sis sp,StackZ80 & $FFFF	;Safe Stack
	ret
;Stack for Classic Z80
	.dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
	.dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
StackZ80: 
  
  
FinishProgram:
	pop iy
	pop af
	ld mb,a
	call $020D8C ;_GetKey
	call $020810 ;_ClrScrnFull
	res 5,(iy+0) ;donePrgm , doneFlags
	 
	ret