Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!usc!apple!snorkelwacker.mit.edu!bloom-beacon!eru!kth.se!news From: d85-jmh@nada.kth.se (Jan-Olof Hendig) Newsgroups: comp.sys.amiga.programmer Subject: Copper mystery Message-ID: <1991Mar27.211732.2436@kth.se> Date: 27 Mar 91 21:17:32 GMT Reply-To: d85-jmh@nada.kth.se (Jan-Olof Hendig) Organization: Royal Institute of Technology, Stockholm, Sweden Lines: 42 Here is a non amiga friendly assembler program taken from the the german publication 'Amiga Magazin 6/90'. org $40000 x: move #4000,$dff09a ; Kill multitasking move.l #cop,$dff084 ; Put address of copperlist in COPADR2!!! waitm: btst #6,$bfe001 ; wait for user to press left mb bne.s waitm rts ; the end cop: ; copperlist starts here dc.w $180,$f00 ; set background to red dc.w $700f,-2 ; wait for line $70 dc.w $180,$fff ; set background to white dc.w $e00f,-2 ; wait for line $e0 dc.w $180,f00 ; background to red dc.w $ffff,-2 ; WAIT for impossible event This rather 'dirty' program raises some questions that the article I took the listing from and the old Hardware manual fail to explain. Mind you, my german is not as good as it should be. Question number one: Why does the program work at all ? The address to the copperlist is put into COPADR2, but the program doesn't access COPJMP2 and neither does the system copperlist, so how come that the list is activated at all. My version of the hardware manual doesn't say anything about this, but maybe I didn't read it well enough. Question number two: The program exits without restoring multitasking, still multitasking starts again when the program ends. Why? No flames please, just constructive answers. Jan-Olof Hendig