Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!jb10320 From: jb10320@uxa.cso.uiuc.edu (Desdinova) Newsgroups: comp.sys.apple2 Subject: Re: Multitasking on a II Message-ID: <1990Dec28.005429.10763@ux1.cso.uiuc.edu> Date: 28 Dec 90 00:54:29 GMT References: Sender: news@ux1.cso.uiuc.edu (News) Organization: University of Illinois at Urbana Lines: 32 In article flee@gnh-applesauce.cts.com (FRANK LEE) writes: >All 65x02 instructions are uninterruptible. Say it takes 3 cycles to execute a >BEQ. If during the first cycle I pull an INT (IRQ,NMI,RESET), the cpu IGNORES >the interrrupt until AFTER the BEQ has finished executing. The philosophy >behind this design feature was to prevent accidentally "flashing" random memory >locations if a mem-modifying instruction was executed. This also leads to some >of the poorest interrupt latencies in the known market. An interrupt can be >ignored, at worst, up to 7 cycles. According to many people I know who BUILD (yes, design and construct) computers the 6502/65816 has one of THE FASTEST interrupt response times of any processor. It is known by anyone who studies microprocessor design that normal IRQ type interrupts are always put off until the end of an instruction. DMA interruption can occur at any cycle- but restarting an instruction in the middle after another series of instructions has executed is not the job of an interrupt request. MY request is that you look around before you spout unfounded information. >Why not just use the SEI instruction to block interrupts before executing your >critical code? Because this prevents anything else in the system from executing. You can't turn off interrupts just because you want a critical section. The Disk ][ drivers do this and just watch what happens when you use the drive. The user response of the system drops to almost zero. No, semaphores are the correct and accepted method of protecting critical sections. -- Jawaid Bazyar | Being is Mathematics Senior/Computer Engineering | Love is Chemistry jb10320@uxa.cso.uiuc.edu | Sex is Physics Apple II Forever! | Babies are engineering