Re: HPIB bus commands

From: Nicolas Welte (
Date: 2004-04-14 21:58:14


I think I made a mistake when I said that the secondary address send code can 
be used to send GPIB commands. It's clear that they are send instead of a 
primary address, otherwise they could not work with all devices.

Larry Mollica wrote:
>>That would be 0x3f, or UNLISTEN.  There's a special ROM entry for sending
> Ok, so that's not something exclusive to HP instruments as I assumed. Is that
> regularly sent by the PET, maybe when a IEEE488 file is CLOSEd in basic?

Yes, 0x3f is sent very often, it must also be sent after e.g. PRINT# or OPEN 
or LOAD with a filename. The CBM devices seem to use this UNLSN command as a 
sign that a command has been submitted.

I don't think 0x3f is used by your device as a "goto local" command. In my 
IEEE488 help file for the National Instruments adaptor card in my PC, it's 
also listed as UNLSN. This is a standard for all HPIB/GPIB/IEEE488 devices. 
Otherwise it wouldn't be possible at all to have a PET talk to a HPIB 
peripheral or a HPIB controller to a PET peripheral.

In my command reference, the commands 0x01 (GTL, probably means "goto 
local"), and 0x11 (LLO, probably "local lock out") seem to be related to your 

You can make use of the NTALK/NLISTN code in the PET ROM. In my series 8000 
ROM disassembly book it starts at $f0d2 (ntalk) or $f0d5 (nlistn), which 
preload $20 or $40 for the talk or listen commands, which is then pushed to 
the stack. If you enter the code later with $00 in the accumulator or even 
later with $00 already on the stack, you can send any byte to the bus. 
(question to others: anyone knows how to do either thing easily on the PET?). 
Later in the routine, the current primary address from $d4 is ORed with the 
value on the stack and then put onto the bus as a command. All the 
handshaking is also done here, so I think this is the best option you'll get. 
If everything fails, I can give you a very small asm program that does 
nothing else than call this ROM routine with the proper settings (It only 
does: LDA $00: JMP $F0D7), and you POKE your command byte to $d4 and SYS to 
this code.


-> My Commodore hardware projects and the X1541 Shop at <-

       Message was sent through the cbm-hackers mailing list

Archive generated by hypermail pre-2.1.8.