QB / QB64 Discussion Forum      Other Subforums, Links and Downloads
 Return to Index  

Interrupt procedures are the only things I could think of too.

January 14 2010 at 2:15 PM
  (Login burger2227)
R


Response to FILEATTR app

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


 
 Respond to this message   
Responses