-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathassembler.s
61 lines (51 loc) · 1.03 KB
/
assembler.s
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
50
51
52
53
54
55
56
57
58
59
60
61
XDEF _DoJSR
XDEF _RemHRTmon
XDEF _BootSum
;int BootSum(int *BootBlockAddress);
_BootSum movem.l d1-a6,-(a7)
move.l 15*4(a7),a0 ;get BootBlockAddress
moveq #0,d0
move.w #512*2/4-1,d1
.add add.l (a0)+,d0
bcc.b .noc
addq.l #1,d0
.noc dbf d1,.add
not.l d0
movem.l (a7)+,d1-a6
rts
;void DoJSR(unsigned long address);
_DoJSR movem.l d0-a6,-(a7)
move.l 16*4(a7),a0 ;get parameter
jsr (a0)
movem.l (a7)+,d0-a6
rts
;int RemHRTmon();
;Check if HRTmon already installed if YES remove it and FreeMem.
;return TRUE if HRTmon deinstalled
;return FALSE if HRTmon not located
_RemHRTmon movem.l d1-a6,-(a7)
move.l $4.w,a6
lea.l super(pc),a5
jsr -30(a6)
tst.l d7
beq.b .noHRT
jsr 16(a4) ;remove
.noHRT move.l d7,d0
movem.l (a7)+,d1-a6
rts
super moveq #0,d7
move.l $10.w,a3
move.l #.illegal,$10.w
MC68010
movec VBR,a0
MC68000
.return move.l $7c(a0),a0
cmp.l #'HRT!',-4(a0)
bne.b .noHRT
moveq #-1,d7
move.l -8(a0),a4
.noHRT move.l a3,$10.w
rte
.illegal: sub.l a0,a0
move.l #.return,2(a7)
rte