Article View: comp.sys.amiga.tech
Article #5522Re: Device driver from device name?
From: Larry Phillips
Date: Thu, 27 Sep 1990 11:46
Date: Thu, 27 Sep 1990 11:46
38 lines
2028 bytes
2028 bytes
In <14697@cbmvax.commodore.com>, jesup@cbmvax.commodore.com (Randell Jesup) writes:
>In article <1980@lpami.wimsey.bc.ca> lphillips@lpami.wimsey.bc.ca (Larry Phillips) writes:
>> lea namesave,A0 ; point at name buffer
>> sub.l loopreg,loopreg
>> move.b (a1)+,loopreg ; gets BSTR length
>> sub.l #1,loopreg ; adjust for loop
>>3$ move.b (a1)+,(a0)+ ; get the actual name
>> dbra loopreg,3$
>> move.b #':',(a0)+ ; tack a colon onto the end
>> move.b #0,(a0)+ ; and null terminate it
>
> Note that entries on the Dos Device list do NOT have ':'s following
>them (they are BSTR names followed by a null byte).
Right.. that's why I tack one on there when I save the name for printing to the
screen.
> Also, before examining the startup field, etc, you must check that
>the node is of type DLT_DEVICE.
Good idea. I'll do that next time I need to use the code.
> Also you must handle Startup values that
>are NOT pointers - for example, SER:, PAR:, PRT: take small integers there.
Hmm... never noticed that, but then I wasn't looking. I'm a little puzzled as
to what the 'small integers' do.
-larry
--
It is not possible to both understand and appreciate Intel CPUs.
-D.Wolfskill
+-----------------------------------------------------------------------+
| // Larry Phillips |
| \X/ lphillips@lpami.wimsey.bc.ca -or- uunet!van-bc!lpami!lphillips |
| COMPUSERVE: 76703,4322 -or- 76703.4322@compuserve.com |
+-----------------------------------------------------------------------+
Technical Details
Message-ID:
<2055@lpami.wimsey.bc.ca>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!van-bc!Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!van-bc! From: lphillips@lpami.wimsey.bc.ca (Larry Phillips) Newsgroups: comp.sys.amiga.tech Subject: Re: Device driver from device name? Message-ID: <2055@lpami.wimsey.bc.ca> Date: 27 Sep 90 11:46:40 GMT Lines: 38 Return-Path: <lpami!lphillips> To: van-bc!rnews