1;
2;	ZX IF1 & Microdrive functions
3;
4;	int i1_from_mdv()
5;
6;	returns TRUE if the current program
7;	has been loaded from the microdrive
8;
9;	$Id: if1_from_mdv.asm,v 1.4 2017-01-03 01:40:06 aralbrec Exp $
10;
11
12	SECTION code_clib
13	PUBLIC	if1_from_mdv
14   PUBLIC   _if1_from_mdv
15
16if1_from_mdv:
17_if1_from_mdv:
18		ld	de,($5c53) 	; PROG :location of BASIC program
19		ld	hl,($5c4b)	; VARS :location of variables
20		sbc	hl,de		; program length
21
22		ld	de,(23787)
23		sbc	hl,de
24		ld	hl,1
25		ret	z
26		dec	hl
27		ret
28