summaryrefslogtreecommitdiff
path: root/VBR.S
blob: b6979a372bc1979ce5da2413f6d6e3e22ffd6c1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
		IDNT	VBR
		SECTION	text,CODE

		INCLUDE	"exec/execbase.i"

		MACHINE	MC68010


		XREF	_RawPrintfFunc

		XDEF	@GetVBR,@SetVBR

@GetVBR:	movem.l	d1/a0-a1/a5/a6,-(SP)
		moveq.l	#0,d0				; Default-Resultat
		lea	GetSupie(PC),a5
		bra.s	CommCont


@SetVBR:	movem.l	d1/a0-a1/a5/a6,-(SP)
		lea	SetSupie(PC),a5

CommCont:	movea.l	4.W,a6
		btst.b	#AFB_68010,AttnFlags+1(a6)	; 68010 oder neuer
		beq.s	1$				; nein --->
		jsr	-30(a6)				; Supervisor ; Get/Set VBR
1$:
		movem.l	(SP)+,d1/a0-a1/a5/a6
		rts

GetSupie:	movec.l	vbr,d0
		move.l	d0,-(SP)
		pea	GetText(PC)
		bsr	_RawPrintfFunc
		addq.w	#8,SP
		rte

SetSupie:	movec.l	a0,vbr
		move.l	d0,-(SP)
		pea	SetText(PC)
		bsr	_RawPrintfFunc
		addq.w	#8,SP
		rte


GetText:	dc.b	"GetVBR -> $%08lx",10,0
SetText:	dc.b	"SetVBR($%08lx)",10,0


		END