home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 4: Demo 1
/
almathera_demo1.bin
/
sourcecode
/
dexion
/
wboot.s
< prev
next >
Wrap
Text File
|
1995-03-17
|
1KB
|
73 lines
execbase=4
findtask=-294
addport=-354
remport=-360
openlib=-408
opendev=-444
closedev=-450
doio=-456
WBOOT: LEA BOOTSECTOR,A0
MOVE.L #$FFFFFFFF,D0
MOVE.L #$FF,D1
CLR.L D2
WBOOT1: SUB.L (A0)+,D0
SUBX.L D2,D0
DBRA D1,WBOOT1
MOVE.L D0,BOOTSECTOR+$4
MOVE.L EXECBASE,A6
MOVE.L #0,A1
JSR FINDTASK(A6)
MOVE.L D0,WPORT+$10
LEA WPORT,A1
JSR ADDPORT(A6)
LEA WIO,A1
MOVE.L #0,D0
CLR.L D1
LEA WTRDDEVICE,A0
JSR OPENDEV(A6)
TST.L D0
BNE WERROR
LEA WIO,A1
MOVE.L #WPORT,14(A1)
MOVE.W #3,28(A1)
MOVE.L #BOOTSECTOR,40(A1)
MOVE.L #2*512,36(A1)
MOVE.L #0*512,44(A1)
JSR DOIO(A6)
MOVE.W #4,28(A1)
JSR DOIO(A6)
MOVE.W #9,28(A1)
MOVE.L #0,36(A1)
JSR DOIO(A6)
LEA WPORT,A1
JSR REMPORT(A6)
LEA WIO,A1
JSR CLOSEDEV(A6)
WERROR: RTS
WTRDDEVICE:DC.B 'trackdisk.device',0
EVEN
WIO: BLK.L 20,0
WPORT: BLK.L 8,0
bootsector:
dc.b 'DOS',0
dc.l 0
dc.l 880
bootprog:
move.l execbase,a6
lea dosname(pc),a1
jsr -96(a6)
move.l d0,a0
move.l 22(a0),a0
moveq #0,d0
rts
dosname: dc.b 'dos.library',0
rts