I need to know how to do an interrupt routine of a parallel port on Pascal for my university's scientifc research!
I appreciate the attention!
Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!
Edited by lucas89_chuck, 19 January 2009 - 12:50 PM.
Dos;
LptPort = $378;
LptVector = $38;
IRQ = $7;
Count : word;
OldISR : pointer;
mov dx, Port
in al, dx
mov cl, Bit
and cl, 7
mov ah, 1
shl ah, cl
or al, ah
out dx, al
mov dx, Port
in al, dx
mov cl, Bit
and cl, 7
mov ah, 1
shl ah, cl
not ah
and al, ah
out dx, al
Inline($FA);
{whatever you want to do here. I am just incrementing a counter}
Count := Count + 1;
SetPortBit(LPTPort + 1, 6);
Inline($FB);
getIntVec(LPTVector, @OldISR); {save old vector}
setIntVec(LPTVector, @NewISR); {install new vector}
SetPortBit(LPTPort + 1, 6);
SetPortBit(LPTPort + 2, 4);
ClearPortBit($21, 7) {enable inerrupt 7 in PIC}
Count := 0; {counter to count interrupts. Incremented in ISR}
repeat
Write('Interrupt count =');
Writeln(Count);
0 members, 0 guests, 0 anonymous users
Community Forum Software by IP.Board
Licensed to: Geeks to Go, Inc.