home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of A1200
/
World_Of_A1200.iso
/
programs
/
develop
/
beermon
/
init.s
< prev
next >
Wrap
Text File
|
1995-02-27
|
1KB
|
76 lines
; this proggi loads the monifile "moni_abs" into the 256kb module
; it should be there, if not you may be a la...
run: move.l 4.w,a6
lea dosname(pc),a1
jsr -408(a6)
move.l d0,a6
lea file0(pc),a5
bsr.w openfile
bne.s getit
lea file1(pc),a5
bsr.w openfile
bne.s getit
lea file2(pc),a5
bsr.s openfile
bne.s getit
lea file3(pc),a5
bsr.s openfile
beq.s nofile
getit: lea $f00002,a5
lea $f30002,a4
move.l #"beer",d1
clr.l (a5)
move.l d1,(a4)
tst.l (a5)
bne.s nofile
cmp.l (a4),d1
bne.s nofile ;ugh, we have no 256kb ram...
lea 2(a5),a0
moveq #-1-1,d0
moveq #0,d1
clrit: move.l d1,(a0)+ ;$3fffc bytes
dbf d0,clrit
move.w #$4ef9,(a5)+ ;JMP instruction, which is expected
move.l #$f00008,(a5)+ ;by A1000 boot rom
move.l d7,d1
move.l a5,d2
move.l #65536*4-6-2,d3
jsr -42(a6)
move.l d7,d1
jsr -36(a6)
move.w #$1111,$f00000 ;yo, all is ok
quit: move.l a6,a1
move.l 4.w,a6
jsr -414(a6)
clr.l d0
rts
nofile: moveq #-1,d0 ;blink means you've been nasty
err: move.w $dff006,$dff180
dbf d0,err
bra.s quit
openfile:
move.l a5,d1
move.l #1005,d2
jsr -30(a6)
move.l d0,d7
rts
dosname:dc.b "dos.library",0
even
file0: dc.b ":moni_abs",0
file1: dc.b "dh0:d/moni_abs",0
file2: dc.b "df0:moni_abs",0
file3: dc.b "df1:moni_abs",0
oi: dc.b "beermacht"