Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!elroy.jpl.nasa.gov!ames!vsi1!zorch!amiga0!mykes From: mykes@amiga0.SF-Bay.ORG (Mike Schwartz) Newsgroups: comp.sys.amiga.programmer Subject: Re: Copper mystery Message-ID: Date: 29 Mar 91 00:18:32 GMT References: <1991Mar27.211732.2436@kth.se> Organization: Amiga makes it possible Lines: 57 In article <1991Mar27.211732.2436@kth.se> d85-jmh@nada.kth.se (Jan-Olof Hendig) writes: > >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 This rather 'dirty' program is what hard disk installable game advocates suggest be done. To answer your questions, the example does not work for all the reasons you state. I doubt the programmer tested it, but it does illustrate the concept of putting the OS to sleep. -- ******************************************************** * Appendix A of the Amiga Hardware Manual tells you * * everything you need to know to take full advantage * * of the power of the Amiga. And it is only 10 pages! * ********************************************************