forked from Galleondragon/qb64
-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
I am using QB64 v2.1
The following function and its usage works perfectly in PDS7.1. The DIR$ is implemented already in code same as stated in your help for FILES. However when I load this in QB64, I get following error:
Compiler error (check for syntax errors) (Internal error:11029) (click here ...)
Caused by (or after): CALL GETINFO ( FILENAME$ , FT& )
MY code snippet is as follows:
Function compileinfo% (FileName$, wide%)
compileinfo% = false
'Check if compiled form of current file with current width is available.
chlpinfo$ = Left$(FileName$, Len(FileName$) - 4) + ".hlc"
If Len(DIR$(chlpinfo$)) Then
Call GetFinfo(FileName$, ft&)
chlpf% = FreeFile
Open chlpinfo$ For Binary As #chlpf%
'Read the control information first.
pos0& = 1
Get chlpf%, pos0&, cwide% 'Read display width.
Get chlpf%, pos0& + 2, ftime& 'Read .HLT file time.
If cwide% = wide% And ft& = ftime& Then 'Compare display width and .HLT
compileinfo% = true ' file time at the time of
End If ' compile and now.
Close #chlpf%
End If
End Function
Sub GetFinfo (fispec$, ft&)
inregs.dx = VarPtr(DTAData) 'set a new DOS DTA
inregs.ds = VarSeg(DTAData)
inregs.ax = &H1A00
Call INTERRUPTX(&H21, inregs, outregs)
fispec$ = fispec$ + Chr$(0) 'DOS needs ASCIIZ string
inregs.ax = &H4E00 'find file name service
inregs.cx = 39 'attribute for any file
inregs.dx = SAdd(fispec$) 'show where the spec is
inregs.ds = VarSeg(fispec$) 'use this with PDS
Call INTERRUPTX(&H21, inregs, outregs)
ft& = DTAData.FileTime 'Copy into long int
If ft& < 0 Then ft& = ft& + 65535 'Hi bit is set (Neg)
fispec$ = Left$(fispec$, Len(fispec$) - 1)
End Sub
Metadata
Metadata
Assignees
Labels
No labels