TOS_adapt:
	move.l	(_sysbase).w,a3	;a3->OS base
	move.l	32(a3),a5	;a5->start of OS pool (but only for late TOS)
	cmpi	#$E4A,30(a3)	;Check OS date (gemdos format)
	bge.b	LE4		;Use pool ptr if beyond a certain date (TOS 1.4 ?)
	lea	OS_table(pc),a0
LD6:
	move.l	(a0)+,d1	;d1= TOS date (bcd format)
	beq	sub_not_to_TOS	;refuse to modify unknown TOS at end of list
	move.l	(a0)+,a5	;a5->start of OS pool for early TOS
	cmp.l	24(a3),d1	;but is it the right TOS ?
	bne.b	LD6		;if not, loop to check whole table
LE4:	;here a5->start of OS pool
	moveq	#0,d0
	rts
;
;
OS_table:
	dc.l	$11201985,$56FA	;TOS 1.0
	dc.l	$02061986,$56FA
	dc.l	$04241986,$56FA
	dc.l	$06011986,$7E0A
;
