Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

file access problem...

Status
Not open for further replies.

Lewwwwy

Programmer
Aug 14, 2005
1
PL
I got a problem with assembler in pascal. Im working on writing/reading files containing integers ( file of integer). To read from the file i use a loop including asm instructions ( h13 graphics)and read(file,var) function. The code compiles but after executing it returns an error : INVALID FILE HANDLING. When i put the read(file,var) outside of the loop the error no more occurs but i need it inside... what can be wrong?

 
Perhaps you should post the code? There are certain registers that should not be changed (or at least should be restored after use), maybe you've changed one of these, and as a result the compiler is reading its file variables from the wrong place. If in IBM PC and Turbo pascal, check you haven't changed bp, the stack, or ds.
Hope this helps.
Also do make sure you haven't got anything in your assembler that might confuse the compiler's loop.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top