Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ncar!gatech!purdue!haven!adm!news From: C0361@univscvm.csd.scarolina.edu ( Thomas Jenkins) Newsgroups: comp.lang.pascal Subject: INT 25h problem Message-ID: <25848@adm.brl.mil> Date: 5 Feb 91 19:58:41 GMT Sender: news@adm.brl.mil Lines: 40 Hi, Seems to me the problem is best handled with Inline, linked in assembly or the ASM block in TP 6.0 . Since the flags are left on the stack after the call, using Intr will never work. TP sets up code like: ( very simplified ) .... push registers (* before Intr call *) set registers to you register variable Int 25h pop registers (* after call *) and then you issue: ASM POPF END ; TP is in effect poping the flags into one of the registers and then you are poping what was a register into the flags. Why does this make it bomb? Because the code segment and data segment are now invalid - IE, you're running wild! If you have TP 6.0, use the ASM block for pushing the registers, the flags, setting up the registers for the call and returning the CPU to it's pre- interupt status. Then examin you data. If you have some other TP version, Use an assembler to write a Proc to do this and link it in. Otherwise ( and this isn't much harder than assembly ) use inline statements to do the job. tom THOMAS E. JENKINS, JR. +--------+ FROM SHOE +--------+ |"IS THE COMPUTER STILL GIVING | PROGRAMMER, | YOU TROUBLE?..." | UNIVERSITY OF SOUTH CAROLINA |"NO, NOT ANYMORE..." | C0361 AT UNIVSCVM.BITNET |"WHAT DID YOU DO?..." | C0361 AT UNIVSCVM.CSD.SCAROLINA.EDU |" I TURNED IT OFF." | +-------------------------------+