StackOn	MACRO
	movem.l	d2-d7/a2-a6,-(sp)
	ENDM

StackOff MACRO
	movem.l	(sp)+,d2-d7/a2-a6
	ENDM

Call	MACRO
	jsr	_LVO\1(a6)
	ENDM

DUMPSTRING	MACRO	;DUMPSTRING "String",LabelID  NB: labID must be UNIC!

	IFD	DODUMP	;in source: DODUMP SET 1 to enable debug dump

	movem.l	d0-d7/a0-a6,-(sp)

	move.l	$4.w,a6
	moveq	#0,d0
	lea	.debLibName\2(pc),a1
	jsr	-552(a6)		;open dos.library version 0
	tst.l	d0
	beq.b	.debEnd\2

	move.l	d0,a6
	jsr	-60(a6)			;default output handler
	move.l	d0,d1
	beq.b	.close\2

	move.l	#.string\2,d2
	move.l	#.stringSize\2,d3
	jsr	-48(a6)			;write string to handler

.close\2	lea	(a6),a1
	move.l	$4.w,a6
	jsr	-414(a6)		;close dos.library again

	bra.b	.debEnd\2

.debLibName\2	dc.b	"dos.library",0
.string\2		dc.b	"DEBUG DUMP: ",27,"[1m",\1,27,"[0m",10
.stringSize\2	= *-.string\2
	even

.debEnd\2	movem.l	(sp)+,d0-d7/a0-a6

	ENDC

	ENDM
