-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathHRTboot.s
98 lines (82 loc) · 1.85 KB
/
HRTboot.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
***************************
*** HRTmon Boot ***
***************************
XDEF _BootBlock
incdir includes:
include "exec/libraries.i"
;VBR must be 0 !
s
_BootBlock
start dc.b "DOS",0
dc.l 0
address dc.l 0 ;8 install address
bra.b next
dc.b "HRT!"
next movem.l d0-d7/a0-a5,-(a7)
lea.l start(pc),a5
move.l address(pc),a3 ;install address
lea.l data(pc),a0
lea.l $70000,a2
move.w #$100-1,d0
copy_boot move.l (a0)+,(a2)+
dbf d0,copy_boot
cmp.w #37,LIB_VERSION(a6)
blt.b .noccu
jsr -636(a6) ;CacheClearU
.noccu jmp $70000
data move.l a1,a4
move.w #2,28(a1)
move.l #512*300,36(a1)
move.l #512*2,44(a1)
move.l a3,40(a1)
jsr -456(a6)
cmp.w #37,LIB_VERSION(a6)
blt.b .noccu
jsr -636(a6) ;CacheClearU
.noccu
move.l 20(a3),d0 ;read Size to Alloc
beq.b .noABS
move.l a3,a1
jsr -204(a6) ;AllocABS
tst.l d0
bne.b .noABS
clr.l 20(a3) ;AllocAbs failed
.noABS
jsr 8(a3) ;init HRTmon
lea.l 12(a3),a0
move.l a0,$70004 ;save enter address
lea.l $dff006,a1
lea.l $dff180,a2
wait move.w (a1),(a2)
btst #6,$bfe001
bne.s wait
move.l a4,a1
move.w #2,28(a1)
move.l a5,40(a1)
move.l #$400,36(a1)
clr.l 44(a1)
jsr -456(a6) ;Read New Boot-Block
cmp.w #37,LIB_VERSION(a6)
blt.b .noccu
jsr -636(a6) ;CacheClearU
.noccu
lea.l 12(a5),a6
movem.l (a7)+,d0-d7/a0-a5
move.l a6,$70000
move.l $80.w,d0
lea.l super(pc),a6
move.l a6,$80.w
trap #0
super move.l d0,$80.w
move.l $70000,2(a7) ;return address from monitor
move.l $4.w,a6
move.l $70004,-(a7)
rts ;jmp HRTmon
dc.b " HRTmon2.0 Boot-Disk "
dc.b " When the screen flashes enter the disk you want"
dc.b " to debug and press your left-mouse button. "
dc.b " "
dc.b " THIS DISK WAS GENERATED BY HRTmonPrefs "
end2
dcb.b 2*512-(end2-start),0
end