Date : Fri, 17 Aug 2007 12:59:54 +0100 (WET-DST)
From : pcoghlan@... (Peter Coghlan)
Subject: Acquired Beeb with symptoms...
>
>The fact that pulling random chips seems to make a
>difference just makes me wonder if it's not actually an interrupt problem
>(although I'd agree with Sprow; that would have been my first assumption after
>ruling out the PSU)
>
Maybe it would be good to take a step back and try to confirm or deny if it is
an interrupt problem.
With the disk and network systems inactive or disabled, there should be no NMIs.
A quick ?&D00 = 0 would clobber the NMI service routine should result in the
machine freezing or doing something else obviously wrong if you are gettin NMIs
when you shouldn't. If it doesn't freeze, press break after doing this to put
things right before trying to use the disk or network systems.
Regarding IRQs, how about the following piece of code which should measure how
many IRQs per second are getting generated. This could then be compared with
a working machine. Please bear in mind that this is completely untested and
unverified. Maybe someone who has access to a machine could try it out and
see if it works and make sure that I've got the correct vector addresses etc.
The FOR J% loop may need to be increased and tweaked to get a meaningful
result.
Press break after running this to restore the IRQ vector. Running it twice in
a row without restoring the vector will hang the machine.
Regards,
Peter.
10 DIM code% 256
20 oldirqvec = &70
30 counter = &72
40 FOR I% = 0 TO 2 STEP 2
50 P% = code%
60 [ OPT I%
70 .start PHP
80 SEI
90 LDA &204
100 STA oldirqvec
110 LDA &205
120 STA oldirqvec + 1
130 LDA #count MOD 256
140 STA &204
150 LDA #count DIV 256
160 STA &205
170 PLP
180 RTS
190
200.count PHP
215 INC counter
210 BNE finish
220 INC counter + 1
230 BNE finish
240 INC counter + 2
250 BNE finish
260 INC counter + 3
270.finish PLP
275 JMP (oldirqvec)
280 ]
290 NEXT
300
310 !counter = 0
320
330 CALL start
340 TIME1 = TIME : COUNT1 = !counter
350 FOR J% = 0 TO 10000 : NEXT
360 TIME2 = TIME : COUNT2 = !counter
370
380 PRINT "IRQs per second :" (COUNT2 - COUNT1) / ((TIME2 - TIME1) / 100 )
390 END