Devices from BASIC
11 messages in this thread
[ continuation ]
DOS 2.0 would like you to go through a list walk with LockDosList, walking
with NextDosEntry, and wrapping with UnlockDosList.
I;m sure you can get the same effect by using a lock of 0 to invoke the
Default File Handler (see page 281 of The AmigaDos manual). But I haven't
actually done this one.
If you have questions for Jim, I can relay them back to him – and more
promptly next time, now that I have the disk transfer working again. It's
been quite a while since I needed Disk-2-Disk and the system was
dismantled.
……Betty
Betty,
Thank you!!! I will take some time to digest this info offline.
If I get it to work, I'll let you know. Tell Jim I appreciate the help.
Steve
I'll tell him. Also, I am sending him the things you uploaded here so he
can see what you are doing with BASIC. He was interested to see that you
are doing some of the kind of things he likes to do. Nothing he likes
better, I suspect, than to do with BASIC what people said could NOT be done
with BASIC.
……Betty
Betty,
Thanks! I really appreciate the help. It's nice to know that
there are some people who actually 'like' Basic. (Although in my case I'm
more afraid of C!).
Steve
Steve, there are LOTS of people who like BASIC – but most of them have been
so put down that they are afraid to admit it. We have lots of real
snobbery about that!
……Betty
Yes, there's a definite language snobbery among programmers, and its
espeically bad on the Amiga (since C is the 'official' language of the
machine). This is compounded by the fact that the BASIC that comes with
the Amiga is really bad….
But BASIC has its place in the scheme of things, and for some people it
works out exceptionally well.
-Mike
Mike,
If I can step in here. You're quite right. Unfortunately, many
don't realize that there are some alternatives to AmigaBasic which are much
better. In particular I like HiSoft Basic, which is essentially compatible
with AmigaBasic yet offers many nice extensions, especially in control
statements. F-Basic is quite interesting, also. It is less a traditional
Basic than is HiSoft or Amigabasic, yet provides outstanding string
manipulation, a RECORD structure like Pascal, heavy typing, global and
local subroutines, etc. It is also the fastest compiled language around
for single precision math. F-Basic uses an extended single precision real
which provides greater accuracy than that of other Basics yet is extremely
quick, faster than C for a single precision real. It also offers double
precision reals which are also much faster than other Basics. Lastly,
there's GFA Basic, which apparently will disappear soon, according to
Betty. GFA is also an extended Basic with many features far beyond that of
mortal Basics! Unfortunately, it often suffers from reliability problems.
An add-on product for Basic, Extend by SunSmile Software, provides
access to gadgets, requestors, etc. It is a nice product, well thought out
with a simple interface and works as a shared library.
I think that Basic on the Amiga can do many things, one just needs
to find the right one, and AmigaBasic isn't the best available.
BTW are you getting lots of rain in Lauderdale? Tampa is finally
getting wet after 5 years of dry summers.
Steve
Ain't that the truth! Although I agree that Basic doesn't have the power
of C or Modula, it's advantage, I think, lies in its simplicity. The
difficult elements are made easy. However, in providing simplicity, often
one loses the extensive power of languages like C. Each has a place, but
Basic brings the power of the Amiga to the non-programmer, and that's what
I like about it.
Steve
Steve, I have another message for you from Jim Butterfield:
Mail From: Buttrfield Date: Thursday 26-Jul-90 19:28 EDT To scan the
device list (grunt!) ** indicates area where a chain could be changed as
you followed it (danger!) 1. ** Find DosBase by following the library chain
(start at address 4?) 2. Use structure DosLibrary; at +$22 (34) follow the
chain to RootNode. 3. +$18 (24) in RootNote gives you a BPTR to a DosInfo
structure. Remember you must multiply by 4 to get the addrs. 4. DosInfo+4
gives you a BPTR to the Device List. 5. Each DeviceList entry has a BPTR to
the next (at +0). If you have a zero there, the entry is not a valid one
and you're at the end. ** 6. At +$28 (40) in each legit DeviceList you
have a BSTR to the Device name. Hop e you know how to handle those. 7. For
devices only, DeviceList+4 must be zero. It's intersting to see the other
entries, though.
I played with a Lock of zero .. thought it might take me where I wanted
.. .. regrettably, it hooked me up to the SYS: device only.
..so the previous stuff is the best I can think of right now.
——————————————–
Steve, I believe that Jim's StructBrowser program is probably still in our
libraries, though I have not looked for it in a long time. It was written
(first) entirely in BASIC, and would go through all of the structures,
giving considerable information about each. If it isn't here, and if it is
of interest, I can probably find it again on one of my disks. It was one
of the first things he wrote for the Amiga, so it's getting pretty old now,
but it worked well. I'm pretty sure it still works.
As for BASIC – it is pretty much a universal language for computers. Almost
everyone has had some experience with it and can understand what is going
on in a BASIC program. For other languages, which certainly do have
advantages in various ways, we lack that universality. I do hate to lose a
common language, even if it is not the very finest. To be honest, Greek
[ MORE ]
[ continuation ]
is probably a better language than English, and certainly more precise,,
but I do hope we don't all have to change over to it!
……Betty
Betty,
Thanks for the relay of information. I will try Jim's advice and
see what it gets me. I, too, agree that Basic is the one language almost
everyone learns and can learn easily. The only time I ventured to C was
long ago when I was using my old Osborne computer. I even learned a little
assembly. But CP/M machines were a couple magnitudes less complex than the
Amiga. Basic seems so less daunting on the Amiga than C.
Steve