summaryrefslogtreecommitdiff
path: root/VBR.S
diff options
context:
space:
mode:
authorChristian A. Weber <chris@gna.ch>2020-06-30 04:07:24 +0200
committerChristian A. Weber <chris@gna.ch>2020-06-30 04:07:24 +0200
commit434921a55c97c84f899b81b88b5618b857be5ce7 (patch)
tree7181ec0e392fcb8112b48a438dfcb4085e7ad3a6 /VBR.S
parent2463fb307217ec70078ee7a4c4755f879d18823a (diff)
downloadgameexec-434921a55c97c84f899b81b88b5618b857be5ce7.tar.gz
gameexec-434921a55c97c84f899b81b88b5618b857be5ce7.tar.bz2
gameexec-434921a55c97c84f899b81b88b5618b857be5ce7.zip
Aufgeräumt, VBR-Code implementiert, Chip-Save repariert, Debug-Output hinzugefügt
Diffstat (limited to 'VBR.S')
-rw-r--r--VBR.S49
1 files changed, 49 insertions, 0 deletions
diff --git a/VBR.S b/VBR.S
new file mode 100644
index 0000000..b6979a3
--- /dev/null
+++ b/VBR.S
@@ -0,0 +1,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