Re: HP-75 HP-IL question Message #6 Posted by Howard Owen on 28 Aug 2005, 12:50 a.m., in response to message #5 by Vassilis Prevelakis
Heh!
Yeah, I think playing with them is better than work. You get to stop when you get too disgusted!
I just back ported some code from the 71B to the 75C, and I ran into more incompatibilities. (That was made worse by my use of the JPC ROM on the 71, which gives you real structured programming.) Those were the days when HP was creating more standards than they could keep track of. Outside the languages I'm familiar with, BASIC for the 85, 75 and 71, plus RMB, there was HPL, which was a dialect of BASIC running on some of the 98XX machines. There was a BASIC on the 110 and Portable Plus. I'm sure there were many others I
've never heard of.
I would point out that the second example of I/O is a bit more complex than the first. On the 85 you are dealing with HP-IB, and the way you are using it (the normal way) ignores the low level message passing on the bus. It's taken care of for you with the "OUTPUT" statement. That's not the case with the HP-IL example. There you have specified the HP-IL messages to send as controller to achieve communication with your device:
25 SENDIO 'ra:','unl,ren,lad#';D$
So, you are addressing the device with the name 'ra:' and sending 'unl' which turns off all listeners on the loop. Then you send "ren" which is remote enable, which tells potential listeners that they should accept remote commands, once the become enabled as listeners. Then you send 'lad#' which is the listener address of the guy you are talking to, :ra in this case. This tells the device to start listening for data. Since you set remote mode, that data will consist of commands to execute, rather than data to display or otherwise process. Finally, you send the data itself, in D$.
This all takes some knowledge of the low-level protocol of HP-IL. And you don't need comparable knowledge of HP-IB to get the job done on the 85. The 75 I/O rom provides OUTPUT and ENTER statements that allow you to use the loop in a way that is very similar to how you use the 85, but not exactly:
100 REMOTE ':ra' ! Sends the unt,ren,lad# combination.
110 OUTPUT ':ra',D$ ! Sends the data
Thats more lines, but it's much simpler, too. And it doesn't demand low level knowledge of the protocol.
Sometimes you can't get around using the low level stuff, and then you need knowledge of what messages to send. But that's not such a common case. However, most of the 85 guys I knew, back in the day, were very familiar with the low level workings of HP-IB. I had to get to know that pretty well too, even though I was coding in RMB, which had a very abstract interface to the bus, along with the low level one, of course.
So maybe it's a pipe dream to think you could get away with HP-IL coding on the 75 without learning details of the protocol. But the I/O module gives you choice. In fact, it has an even lower level interface that SENDIO/ENTIO to choose if you wish. It's called SEND, and it lets you compose arbitrary messages and send them on the loop. So instead of using the mnemonics for messages, you use a set of mnemonics for the upper three bits (CMD, IDY, RDY, DATA, END etc.) and an arbitrary bit pattern for the corresponding 8 bits in the message. So two machines with this capability might extend HP-IL in interesting ways, as long as their HP-IL ICs didn't balk! 8)
I just ran across yet another, even lower level interface offered by the I/O ROM. I think this one may be part of the I/O Utilities Pac too. This is RIO/WIO. These words read and write directly to the HP-IL IC's registers. So if your IC doesn't like what you are doing with SEND, you can try some very low level bit banging to coerce it into seeing things your way. 8) This could also be used to implement analyzer mode, where the read and write bits in r0 are both on. That makes the chip stop doing its part in the protocol. It reads the wire, then interrupts the CPU when data shows up. The ISR then must decide how to respond to the data. This is how EMU41 implements its virtual hardware, and also how the DEVIL module does its SCOPE mode. Of course, there's no "ON INTR" in the 75's BASIC, so maybe that wouldn't be possible without a special LEX to implement interrupt handling and ISRs.
Edited: 28 Aug 2005, 2:01 a.m.
|