#include <vax/mtpr.h>

	.text
	.globl	_ksdump
_ksdump:
	nop;nop
	mfpr		$KSP,r10
	moval		ekernstack,r11
	.data
9:	.asciz		"KSP = %08x; top at %08x\n\0"
	.text
	pushl		r11
	pushl		r10
	pushab		9b
	calls		$3,_printf
1:	cmpl		r10,r11
	jgeq		1f
	.data
9:	.asciz		"%08x: %08x\n\0"
	.text
	pushl		(r10)
	pushl		r10
	pushab		9b
	calls		$3,_printf
	addl2		$4,r10
	jbr		1b
1:	halt
