#ParentDir from CLI
8 messages in this thread
Well, not really ParentDir. Is there away to get the name (ascii string)
of the current directory when a program is run from CLI? I am adding a
load file menu to EDLP, and the current directory is diplayed in the
"drawer" gadget. I can get the parent+current directory name from the
Workbench startup message, but not from CLI. Any ideas? Thanx! —Mike
Mike, it may sem a bit of a kludge, but Currentdir() will return the OLD
Currentdir lock, while making the new lock Current, and Examine() will fill
in the info in the FileInfoBlock. As I say, kludgey, but it may work.
Hmmmm, so I use CurrentDir to get the old lock, then use it again to make
it current again. The only problem is what I should set currentdir to the
first time. It has to be an existing directory cause I don't want a
requester to pop up. I suppose I could use c:. Who cares if it's
kludgy,as long as it works? I'll use until a better way is suggested.
Thanx! —Mike
Well, RAM: is always there, and of course any of the standard "necessary
ones".
Earlier tonight I was building a documentation file on Execbase. It's quite
a structure! I'm sure that I will run across the current directory entry
somewhere along the line, or at least find a pointer to another structure
that contains it.
Regards, Larry.
Larry, RAM: isn't there (in 1.1) until you ask for it. I'd rather not
create something that will show up as "lost memory" to the uninitiated. I
do think that SYS: is always assigned, at least, that is what Scribble!
uses as it's default. The current directory entry would be neater,
though. —Mike
Mike,
SYS: is always there, as is C: (probably L: DEVS: and LIBS: too).
I have finally documented the entire Execbase structure, complete with all
offsets, and it is quite large. Highest offset is $24B. Next comes some
branching out to other lists and such to see what can be found.
I can't remember who was asking about 50/60 Hz vs. PAL, but there are two
entries in Execbase that tell you the vertical rate and power supply
frequency. They can be found at:
Execbase + $212 ;VBlankFrequency
Execbase + $213 ;PowerSupplyFrequency
The address of Execbase itself may be found in the longword at address 4.
I'll keep you posted if I find any good ways to find the CD.
Regards, Larry.
You disasmed the execbase structure! What a task that must of been!
I didn't really disassemble it, just used Wack to go exploring. I used a
combination of that and a list of equates I got from assembling all the
include files to fill in the many gaps that aren't really called out in the
include files. The problem comes when you see structures within structures,
and in order to fill it all in, you just need perserverance to go look them
all up.