You need the DOS handle to use the Interrupt file functions, but you can get that using Interrupt too:
INPUT "Enter Bitmap file name: ", file$
file$ = file$ + CHR$(0) 'DOS requires us to append a CHR$(0).
InRegs.AX = &H3D00 'AX function Opens the File
InRegs.DS = VARSEG(file$) 'Segment address of the file name string
InRegs.DX = SADD(file$) 'Offset address of the string (use SADD when variable length strings)
CALL INTERRUPTX(&H21, InRegs, OutRegs)
IF OutRegs.flags AND 1 THEN PRINT "Error opening"; file$: BEEP: SYSTEM 'Check for open error!
FileHandle = OutRegs.AX ' Save the file handle number
NOTE: THIS IS NOT THE ENTIRE PROGRAM! DO NOT TRY TO RUN IT!
Ted
This message has been edited by burger2227 on Jan 15, 2010 2:33 PM