iS-DOS + interrupts

ZXNet echo conference «code.zx»

From Kirill Frolov To All 26 September 1998

├┤i All! This question torments me - he wants to move everything completely residents and reconfigure them and will start. But here's the problem - he first moves them, and then only reconfigures them... What if the resident address is used to handle interrupts? Isdos probably still prohibits them. What if...? Well, and one more thing: ld a,1 ld (lock),a ... ; here the isdos called the resident to reconfigure ... ; and here he comes after a call from the command room ... ; lines. call install_renew _cycle call clock_interrupt_input_1 jr nc,_cycle xor a ld (lock),a ret clock_interrupt_input_0 ld a,0 lock equ $-1 or a ret nz; it's impossible inc a ld (lock),a ; it won't be possible clock_interrupt_input_1 ...... ; ...... ; started working call register_needed ...... ; return_0 scf jr $+3 return_1 xor a ld a,0 ld (lock),a ret ; from interrupt register_need ld a,i ex af,af' di ....... ; climbed into tr-dos ex af,af' jp po,$+4 ei ret That's how it works. Seeing a glitch - ld a,0 : ld (lock),awhen calling _NOT_FROM_INTERRUPT_ there is no need to worry - I know about him and he has nothing to do with it. And the thing is this - after the program spins on the _cycle label, INTERRUPTIONS ARE PROHIBITED! :-o Why it’s not clear. And where they are prohibited - too. Or rather, the point is this: after launch from the command line from the board sometimes hangs on HALT. So somewhere interruptions were prohibited... BUT WHERE? And why doesn't this happen? if you call nothing on the _cycle nb label - IT’S UNCLEAR! After all, the status is always restored in the register_need program. The only thing that comes to mind is that the lock is removed after the very first call clock_interrupt_input_1 and possible interruption and restarting the program from the address clock_interrupt_input_0. Nothing there will be nothing terrible here, except reading or writing to another register hours than expected and the program variables will be corrupted. But this should not affect interrupts - during a frame interrupt isdosk clearly saves all registers except iy. A VERY UNCOMPLETE SITUATION! I WANT AN ANSWER NOT AN UNSOLVABLE QUESTION! By the way, if you look carefully, the register_mark should be clearly marked It is clear that ALL INTERRUPTIONS are needed. NON-MASKABLE from the modem according to the Kondratiev scheme - ALSO. That's why it will be very difficult make a watch with a momet. P.S. And if the file is assembled in perfect ASMA and linkedthere, as a resident, when installed by the set.com program, it flies to 48 BASIC, just insert a couple of keys into the program and everything will work! W!7h Be$7 W!$he$, FK0.