I am using D4 to make a little utility application that reads from and
writes to a parallel ****t address base 0x378 or 0x3bc. I am using ****ttalk
in a batch file so this will work under NT (Win XP):
copy USB2LPT.exe c:\****ttalk22\
cd c:\****ttalk22
C:\****ttalk22\AllowIO USB2LPT.exe 0x378 0x379 0x37a 0x3bc ox3bd 0x3be
This works well, but I cannot debug my code, and the exception causes an
immediate termination. I tried to trap the error, but it still hangs up.
The routines that cause the exception are:
FUNCTION ****tIn(IO****t: WORD): BYTE; ASSEMBLER; REGISTER;
asm
MOV DX,AX
IN AL,DX
end;
PROCEDURE ****tOut(IO****t: WORD; Value: BYTE); ASSEMBLER; REGISTER;
ASM
XCHG DX,AX
OUT DX,AL
END;
Is there a way to ignore this attempted I/O, or somehow predict that it
will cause an exception by determining the processor's permission map? I
might be able to do it by running the entire Delphi IDE from the AllowIO
command line, but I'd rather not.
If I set the debug options to Run Unhandled by User Program or Debugger, I
will get the debugger error message, and I can continue. If I set it to
Run
Handled by User Program or Debugger, it hangs up, and I must use Program
Reset.
Thanks,
Paul


|