@Cymric, thanx for clarifiying, unfortunately I didnt have time to move the code to a pc-disk, however I'l give the vary base of the code.
I made an include file with the name "SaveLoadSys.i" (hey, dont laugh, I just used "Sys" because I didnt come up with anything better)
This is (I think) the source of "SaveLoadSys.i":
*CODE*
savesys:
move.l 4,a6
lea dosname,a1
moveq #0,d0
jsr -552(a6)
move.l d0,dosbase
move.l dosbase,a0
move.l -30(a0),oldcop ;I think it was -30
move $dff002,d0
bset #9,d0
bset #15,d0
move d0,olddma
move.l 4,a6
move.l dosbase,a1
jsr -414(a6)
rts
loadsys:
move olddma,$dff096
move.l oldcop,$dff080
move.l #1,$dff088
rts
oldcop:
dc.l 0
olddma:
dc.w 0
dosbase:
dc.l 0
dosname:
dc.b 'dos.library',0
I'm almost certain it misses some lines from the original code, anyway lets look at the main code (about 1/10 or so of the original):
bra start
include "df0:asm/SaveLoadSys.i"
start:
bsr savesys
move #%0xxxxxxxxxxxxxxx,$dff096 ;I KNOW I set the RIGHT bits, but since I dont remember say, if blitter-dma was bit number 9 or 7 I just wrote "x" here !
move #%1xxxxxxxxxxxxxxx,$dff096 ;same goes here !
move.l #cop,$dff080
moveq #1,$dff088
;also some code for noise, but I dont have energy to write'm down here now
waitmb:
btst #10,$dff016
bne.s waitmb
bsr loadsys
rts
cop:
dc.w .....,.....
dc.w .....,.....
etc ...
*/CODE*
The point is that it full version works when assembled and ran run immediately but not as a separate object file, since everything works EXCEPT the copper (and sound) definition is executed (I can click the mouse button to exit the code and get back to cli) also when ran as a separate object file, I assume it's becouse the whole thing (including the copper) is loaded into fast-ram.