Nascom Newsletter |
Volume 3 · Number 1 · April 1983 |
Page 3 of 37 |
---|
There seems to be a surplus of real-tine Nas-clocks based on the MM58174. The one I used was designed-in on a GM816 but this one dropped bit 4 at random. Having tried the obvious bus pull-ups and finger capacitance I still failed to modify its erractic behaviour. So, I wrote a fault tolerant algorithm. Basically, instead of reading and checking for an F nibble which signifies a ‘change since last read’ situation, I tried reading twice and comparing. Thus, intended F’s and erratic bits both caused a re-read of all pertinent data.
With Gemini, the sign of twins, there was no suprise in a second problem – a broken IEI track. The symptom to that was a totally upredictable interrupt vector, not easily distinguished. By filling an INT RAM block with 10, 10, 11, 11, 12, 12, 13, 13, etc, then filling all lower RAM with E7 (Break point – BRKPT) and the I register with the INT block address, it soon became obvious that the INT vector was coming from anywhere in the black including odd addresses. With pull-ups on the data bus, the vector at (I reg) + FFH and (I reg) + 10H was repeatable and clearly illegal. A voltmeter along the IEI line confirmed whether the interrupt was being serviced because it does not reset until a RETI is executed and because of the breakpoint this awaited re-execution under Nas-sys. Of course there are many software hurdles to confuse INT inaction but if you suspect hardware, the above tricks do not need a scope.
The problem also showed how to break a program without ‘Resetting’ and re-entering any start up data like registers. In Basic you can escape but in assembler what can you do? Add fancy routines which take as long to debug as the program itself. Or, you could hit the NMI. The result is the same as a Breakpoint – the registers are displayed but to continue, only ‘E’ need to be typed. To invoke NMI there is a debounced input an pin 6 of the Nasbus or pin 4 of the ribbon connector to the keyboard. A ‘push-to-make’ switch has to earth one of these pins. My Break switch is physically on the keyboard. Don’t hit it twice because on resuming execution it will lock out. There are cards which make use of the NMI but if you have got that far you will have already have figured out this trick. Happy breaking.
In the Nas-sembler the PHASE pseudo-op appears to be two-phased! or am I anti-phase? Guess who read DEPH as depth? (revealing the depth of my mis-understanding). Even after using DEPH (dephase) properly, it still produced a correct listing but an object file displaced by the length of the code. The solution is logical: using PHASE is like using several ORG’s which requires MODE 0, MODE 1 is default and the manual omits explanation so pencil this one in the margin (under phase saving). This phase-ability study cannot omit reminding the reader that MODE 0 object code loads from the assembler only, using the ‘/ ’ command. (Don’t forget the space).
Page 3 of 37 |
---|