home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1992-04-26 | 3.4 KB | 139 lines |
- '
- 'Examine the procedures for more information on how to use Ldev *
- '
- Erase 10 : Reserve As Work 10,30*4
- ST=Start(10)
- Screen Open 1,640,256,4,Hires
- Proc _SYSINFO
- A$= Extension_10_04F0(ST)
- Print "NAME: ";A$
- Proc MORE_INFO[ST]
- Centre "<<<Press A Key>>>" : Wait Key
- Clw
- Do
- A$= Extension_10_0502(ST)
- Exit If A$=""
- Print "NAME: ";A$
- Proc MORE_INFO[ST]
- Centre "<<<Press A Key>>>" : Wait Key
- Clw
- Loop
- Procedure MORE_INFO[ST]
- 'TS contains the following info:
- ' ST+0 = TYPE (0 "hard"-device, 1 assign, 2 volume
- ' ST+4 = UNIT number
- ' ST+8 = BSTR to devicename
- ' ST+12 = ENV tablesize
- ' ST+16 = Blocksize (in longwords)
- ' ST+20 = *not used*
- ' ST+24 = number of heads
- ' ST+28 = *not used* (always 1)
- ' ST+32 = number of blocks per track
- ' ST+36 = number of DOS-reserved blocks (bootblocks)
- ' ST+40 = Not used (always 0)
- ' ST+44 = Interleave
- ' ST+48 = low startcylinder
- ' ST+52 = high endcylinder
- ' ST+56 = Number of DOS cachebuffers
- ' ST+60 = Buffmemtype
- ' ST+64 = Maxtransfer
- ' ST+68 = MASK (for DMA-devices)
- ' ST+72 = Bootpriority
- ' ST+76 = DOS-type (DOS0/DOS1 etc.)
- '
- TYPE=Leek(ST)
- UNIT=Leek(ST+4)
- ADR=Leek(ST+8)
- L=Peek(ADR) : Rem BSTR-len
- Inc ADR : Dec L
- If L>0
- For I=0 To L
- DNAME$=DNAME$+Chr$(Peek(ADR+I))
- Next I
- End If
- BLKSIZE=Leek(ST+16)*4
- HEADS=Leek(ST+24)
- BLKPTRACK=Leek(ST+32)
- RESBLK=Leek(ST+36)
- _INTERLEAVE=Leek(ST+44)
- CYLLOW=Leek(ST+48)
- CYLHI=Leek(ST+52)
- BUFFERS=Leek(ST+56)
- BUFFTYPE=Leek(ST+60)
- _MAXT=Leek(ST+64)
- MASK=Leek(ST+68)
- BPRI=Leek(ST+72)
- DTYPE=Leek(ST+76)
- Print "DeviceType : ";
- If TYPE=0
- Print "'Hard' device"
- Else If TYPE=1
- Print "Assignment"
- Else If TYPE=2
- Print "Volume"
- End If
- End If
- End If
- Print "Devicename : ";
- If DNAME$=""
- Print "N/A"
- Else
- Print DNAME$-Chr$(0) : Rem Some name are and some not NULL-terminated
- End If
- Print "Disktype : ";
- If DTYPE=$444F5300
- Print "Old filesystem"
- Else If DTYPE=$444F5301
- Print "New filesystem"
- Else
- Print "N/A"
- End If
- End If
- Print "Unit : ";UNIT
- Print "Number of heads : ";HEADS
- Print "Blk per track : ";BLKPTRACK
- Print "Low cylinder : ";CYLLOW
- Print "High cylinder : ";CYLHI
- Print "Reserved blocks : ";RESBLK
- Print "Interleave : ";_INTERLEAVE
- Print "DOS buffers : ";BUFFERS
- Print "Buffmemtype : ";BUFFTYPE
- Print "MASK : ";Hex$(MASK,8)
- Print "Bootpri : ";BPRI
- End Proc
- Procedure _SYSINFO
- Print "List of system-assignments:"
- ST=Start(10)
- A$= Extension_10_04F0(ST)
- Do
- Exit If A$=""
- L=Leek(ST)
- If L=1
- Print A$
- End If
- A$= Extension_10_0502(ST)
- Loop
- Centre "<<<Press A Key>>>" : Wait Key : Clw
- Print "List of Volumes in system:"
- A$= Extension_10_04F0(ST)
- Do
- Exit If A$=""
- L=Leek(ST)
- If L=2
- Print A$
- End If
- A$= Extension_10_0502(ST)
- Loop
- Centre "<<<Press A Key>>>" : Wait Key : Clw
- Print "List of connected devices:"
- A$= Extension_10_04F0(ST)
- Do
- Exit If A$=""
- L=Leek(ST)
- If L=0
- Print A$
- End If
- A$= Extension_10_0502(ST)
- Loop
- Centre "<<<Press A Key>>>" : Wait Key : Clw
- End Proc