Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Porting GPIB codem from BASIC To C

Dear All,
The software what I have is written in BASIC in 1980's and it calls GPIB routines using CALL ABSOLUTE and calls GPIB rouitnes in DC00 with offset values 0, 0x1000 and so on

Now what I require is to port these codes to C Language.

How can I do this. I feel that the GPIB used corresponds to IEEE488 Version

If anyone knows how to solve this problem, Kindly email me with sufficient help

EmailID is srinivasan@hisl.co.in

Regards
DSrinivasan
0 Kudos
Message 1 of 3
(3,406 Views)
DSrinivasan,

Would it be possible for you to post a section of your code for us to take a look at?

Regards,
Greg Caesar
National Instruments
0 Kudos
Message 2 of 3
(3,406 Views)
Ya Sure.
I need the equivalent code to be written in Turbo C
The Target PC configuration is DOS 6.0, 386/486 processor,

I am also attaching the absolute.asm file for explanation on CALL ABSOLUTE

BASIC CODE SEGMENT

DIM SAR$, ER%
DIM GPINIT%, GPOUTPUT%
DEF SEG=&HDC00
GPINIT%=0
GPOUTPUT%=&H1000

A%=0: MAD%=0
CALL ABSOLUTE(A%, MAD%, GPINIT%) //Calling the routine in DC00:0000(SEG:GPINIT%)

ER%=0
SAR$ ="10;U1=75" //Command String
CALL ABSOLUTE(SAR$, ER%, GPOUTPUT%)//Calling the routine in DC00:1000(SEG:GPOUTPUT%)

IF ER% <> 0 THEN
PRINT "ERROR"
STOP
ENDIF
0 Kudos
Message 3 of 3
(3,406 Views)