Microsoft fortran, 8f. microsoft fortran, Sample program – Measurement Computing Personal488 rev.3.0 For DOS & Windows 3.Xi User Manual
Page 79

8E. Microsoft C
II. SOFTWARE GUIDES - 8. Driver488/DRV
II-64
Personal488 User’s Manual, Rev. 3.0
ieeewt(“output 16;M2X”);
}
void isr()
{ int _false_();
int st195;
printf(“Interrupt detected...”);
ieee_cki = _false_;
int sp;
ieeewt(“spoll\n”);
ieeescnf(“%d”,&sp);
if (sp==0) {
printf(“Non-SRQ Interrupt!\n”);
exit(1);
}
ieeewt(“spoll 16\n”);
ieeescnf(“%d”,&st195);
if ((st195 & 0x40) == 0 ) {
printf(“Non-195 SRQ!\n”);
exit();
}
if ((st195 & 0x20) == 0) {
if (st195 & 0x01)
printf(“Overflow\n”);
if (st195 & 0x02)
printf(“Buffer Full\n”);
if (st195 & 0x04)
printf(“Buffer 1/2 Full\n”);
if (st195 & 0x08)
printf(“Reading Done\n”);
if (st195 & 0x10)
printf(“Busy\n”);
} else {
if (st195 & 0x01)
printf(“Illegal Command Option\n”);
if (st195 & 0x02)
printf(“Illegal Command\n”);
if (st195 & 0x04)
printf(“No Remote\n”);
if (st195 & 0x08)
printf(“Trigger Overrun\n”);
if (st195 & 0x10)
printf(“Failed Selftest\n”);
}
ieee_cki = cklpint;
8F. Microsoft Fortran
Note:
The following short program illustrates the use of Driver488/DRV with Microsoft Fortran.
Most of the program length is composed of utilities that simplify character I/O in Fortran.
Sample Program
Character Result*127
Integer StrLen
Call OpenIeee
Write(1,*)’RESET’
Write(1,*)’REMOTE 16’
Write(1,*)’OUTPUT 16;Z1X’
Write(1,*)’ENTER 16’
Call FlushIeee
Read(2) Result
Write(*,*)Result(1:StrLen(Result,127))
END