Subject: Re: HP From: avenar_j@epita.fr (Jean-Yves Avenard) Newsgroups: hpcalc.general Organization: unavailable Date: Jan 04 2001 15:09:28 User-Agent: Microsoft Outlook Express 5.50.4133.2400 Ok.. On y va donc... "5.4.5 RSI Instruction The RSI (ReSet Interrupts) instruction resets the KDN interrupt state machine. After an RSI is executed the CPU will interrupt immediately if KDN is high and interrupt processing is enabled (INTON and RTI). If KDN is high and interrupt processing is disabled, the CPU will interrupt as soon as interrupt processing is enabled (INTON and/or RTI). This bypasses the need for KDN to go low before a new interrupt can be generated. The RSI intruction should be used prior to RTI when keyboard scanning shows no keys are down. This will detect keys that are depressed between the time of last scan and the RTI by causing an immediate reinterrupt" A propos de KDN... "5.4.4 KDN Interrupts KDN line - rising edge sensitive with qualifications - see text. KDN is the "logic OR" of IR15X (ON) and the IR[0:8] lines. IR[0:8] lines held high will generate only one initial interrupt and will not repetitively reinterrupt the CPU as do the NINTX, NINTX2 and IR15X lines (note du copiste JYA:IR15X = ligne ON, NINTX et NINTX2 entrees du processeur). IR[0:6] interrupts are maskable using the INTON and INTOFF instructions A rising edge of KDN will generate an interrupt if the CPU is outside of the interrupt routine (RTI) and interrupts are ON (INTON). Once this interrupt has occured, no further KDN interrupts can occur until another rising edge of KDN occurs of the interrupt routine with interrupts ON or until both RTI instruction and an RSI instruction (see below) have been executed. A rising edge of KDN will occur if IR[0:6] and IR15X were all momentarily low and if: 1)a rising edge occurs on IR15X; or 2)one or more of the IR[0:6] goes high. The interrupt state machine ignores edges on KDN (and does not latch a request for a new interrupt) while the CPU is in the interrupt routine. This allows software to scan the keyboard by setting each OR line high in succession and executing an A=IN or C=IN without latching the need for another interrupt. During this keyboard scanning, KDN may be toggling low and high based on the keys that are down and the OR line that is high. In order to avoid "spurious" interrupts, software must ensure that the KDN signal has been updated to match the current state of the keyboard-OR lines before exiting an interrupt routine where keyboard scanning has occured. This is normally done by restoring all keyboard-OR lines to their normal state using OUT=C or OUT=CS prior to the RTI. This ensures that if any key is down the KDN signal will be HIGH when the RTI is executing" Bon voila, y'a tout la dedans sur comment marche les interruptions claviers. A+ Jean-Yves