CDREAD E.01.01 28 Jan 2004 Keven Miller ============================================================================ This program reads ISO-9660 formated CDs using the CD access library CDREADXL E.01.00. The user can view the directories and files, and even copy the files to your HP3000. FILENAME CODE SIZE TYP EOF LIMIT R/B SECTORS CDREAD NMPRG 128W FB 268 268 1 272 CDREADD 80B FA 298 298 16 96 CDREADMC 80B FA 98 98 3 32 CDREADMG MGCAT 128W FB 9 9 1 16 CDREADXD 80B FA 146 146 16 48 CDREADXL NMXL 128W FB 118 4096000 1 256 CDREADMG must be in the same group.account as CDREAD. CDREAD should come with CDREADXL as the default XL to link with when run. You can place CDREADXL in any group.account of your choice where priviledged mode (PM) is given. Then run CDREAD with the XL= parameter or use linkedit to alter the program's default XL list. :run cdread;xl="cdreadxl.pmgrp.pmacct" OR linkedit "altprog cdread;xl=cdreadxl.pmgrp.pmacct" Below is a listing of a sample run. Notes: N1. Three (3) environment variables are kept for you. CDREAD_DEV = 5 Contains the device number to "auto-mount" on the next run of CDREAD. CDREAD_DISMOUNT = 0 If set to 1, "auto-dismount" when exiting CDREAD. CDREAD_LANG = 1 Contains the language number from the last LANG # command used on the next run of CDREAD. N2. Multi-language support for display message is kept in the message catalog file CDREADMG. Currently, only language 1 AMERICAN is provided. If the file cannot be opened, CDREAD uses an internal set of message (American). CDREAD only uses the intrinsic NLGETLANG to obtain the default system language; no other NLS intrinsic is used. But you may use any language number to match a defined message $SET defined in CDREADMG. For those inclined, please provide translations to other languages. You may contact me at either of these email addresses: Kevenm@exegesys.com Kevenm@reeltapetransfer.com N3. You may see occational development messages still in the program. N4. HP3000 files created from a copy command are Fixed, 256 byte Ascii files. Future tasks/ideas: T2. Add other languages to the message catalog. T3. Support the directorys dot (.) and dot-dot (..) in path and filenames. T4. Support pathnames with filenames on the LIST and COPY commands. T5. Provide a FIND command to search for files matching a pattern. T6. Provide an auto-execute file feature such that if a file named AUTOMPE exists in the root directory, it will be executed when CDREAD begins. Allowing things like auto-installing files onto your HP3000. T7. Provide an auto-execute feature such that if an HP3000 file exists, like AUTOCD or AUTOCD.programgroup.programaccout, then execute it as CDREAD commands. T8. Add current pathname to the prompt. T9. Provide user control for the format of the date-time of files. T10. Provide user input for file attributes on files COPY. Things like record-size, binary, fixed/variable. Maybe recognizing reflection labels to re-create an MPE file. T11. Stack commands into runtime infostring: info="cmd;cmd;cmd" and/or variable. T12. View date of rootdir, on volume display? T13. Add support for longnames (seperate path/file directory). T99. User requests! Historic notes: I always see versions of A.xx.xx and B.xx.xx, but not much further. Due to the odd (or is it even) spelling of my name, I gained a nickname of "E", which I chose to start the version. But if you don't like that, just take it as a version from openmpE. Written in HP-C, developed on a 918RX MPE/iX 6.0 pp2. Fixed in E.01.01 28 Jan 2004 T1. Remove the ";1" trailing from listed filenames. F0. Allow specifying target directories and files with #sector number. Like this: cd #24 list #706 DonnaGarverick Open CDREADMG from same group.account as CDREAD; not current group.account. =========================================================================== Example: Fox 12: Fox 12:CDREAD CDREAD [E.01.01 Jan 28 2004] Language 0 NATIVE-3000 >help exit dismount mount [ldev] help volume xeq filename version lang [number] :[mpe command] cd [pathname| #sector] dir [pathname| #sector] list filename | #sector copy filename | #sector >mount 5 Volume CDROM5 mounted on device 5 5:/>vol CD Format: CD001 Volume 1 of 1 System: Volume: NEW Volume Set: Publisher: Preparer: Application: NERO - BURNING ROM Copyright: Abstract: Bibliographic: Application: Future Data: Created: 2001110414030000 Modified: 2001110414030000 Expiration: 0000000000000000 Effective: 0000000000000000 Sector size: 2048 Volume size: 177479 sectors (363476992 347 MB) Path Table sector: 319 size 3944 Root Dir sector: 19 size 2048 5:/>dir Sector bytesize date________time type name 19 2048 1900/00/00 0:00 . 19 2048 1900/00/00 0:00 .. 20 2048 2001/11/04 12:50 R7/ 29 2048 2001/11/04 11:46 WIN98_SE/ 5:/>cd r7 Sector bytesize date________time type name 20 2048 1900/00/00 0:00 . 19 2048 1900/00/00 0:00 .. 21 2048 2001/11/04 12:50 API/ 26 2048 2001/11/04 12:50 DISK_1/ 27 2048 2001/11/04 12:50 DISK_2/ 28 2048 2001/11/04 12:50 DISK_3/ 5:/20>cd api Sector bytesize date________time type name 21 2048 1900/00/00 0:00 . 20 2048 1900/00/00 0:00 .. 721 105620 1990/07/05 13:26 API.DOC 22 2048 2001/11/04 12:50 APIDEMO/ 23 2048 2001/11/04 12:50 BASIC/ 24 2048 2001/11/04 12:50 C/ 25 2048 2001/11/04 12:50 PASCAL/ 5:/21>dir pascal Sector bytesize date________time type name 25 2048 1900/00/00 0:00 . 21 2048 1900/00/00 0:00 .. 712 3606 1989/10/16 14:34 APIUNIT.PAS 714 3792 1989/10/16 14:35 APIUNIT.TPU 716 2229 1989/10/16 14:35 P_APILIB.OBJ 718 3856 1989/10/16 14:35 SAMPLE.EXE 720 1141 1989/10/16 14:35 SAMPLE.PAS 5:/21>cd c Sector bytesize date________time type name 24 2048 1900/00/00 0:00 . 21 2048 1900/00/00 0:00 .. 695 4150 1989/10/16 14:34 API.H 698 3599 1989/10/16 14:34 C_CAPI.LIB 700 3599 1989/10/16 14:34 C_LAPI.LIB 702 3599 1989/10/16 14:34 C_MAPI.LIB 704 3599 1989/10/16 14:34 C_SAPI.LIB 706 671 1989/10/16 14:34 SAMPLE.C 707 8509 1989/10/16 14:34 SAMPLE.EXE 5:/24>list sample.c File SAMPLE.C size 671 /* * sample.c * * Include all of the API function declarations in api.h */ #include "api.h" main() { char serno[32]; if (api_instchk( serno ) !=0 ) { printf ("No API support - use /W switch when starting Reflection\n"); exit(); } else printf ("Reflection present, serial no: %s\n", serno); printf( "Hit any key to pop-up Reflection :"); for (;;) { if ( kbhit()) { getch(); break; } }; api_popup(); printf ("\nBack from Reflection\n"); } 5:/24>copy sample.c File SAMPLE.C size 671 Hostname [SAMPLE.C]?samplec . ACCOUNT= KEVENM GROUP= CD FILENAME CODE ------------LOGICAL RECORD----------- ----SPACE---- SIZE TYP EOF LIMIT R/B SECTORS #X MX SAMPLEC 256B FA 29 4095 1 256 1 8 5:/24>:print samplec /* * sample.c * * Include all of the API function declarations in api.h */ #include "api.h" main() { char serno[32]; if (api_instchk( serno ) !=0 ) { printf ("No API support - use /W switch when starting Reflection\n"); exit(); } else printf ("Reflection present, serial no: %s\n", serno); printf( "Hit any key to pop-up Reflection :"); for (;;) { if ( kbhit()) { getch(); break; (24/29) Continue? } }; api_popup(); printf ("\nBack from Reflection\n"); } 5:/>help exit dismount mount [ldev] help volume xeq filename version lang [number] :[mpe command] cd [pathname| #sector] dir [pathname| #sector] list filename | #sector copy filename | #sector 5:/>lang 1 Language AMERICAN 5:/>help Commands: Exit Mount [device-number] Help Dismount Version Read sector Xecute filename Volume :mpe command Lang [NLS-language-number] cd [pathname | #sector] Dir [pathname | #sector] List filename | #sectir Copy filename | #sector 5:/>e [getintvar] errno=29 [getintvar] MPE intr 0 err 0 stat 0:0 Fox 12:showvar cd@ CDREAD_DEV = 5 CDREAD_DISMOUNT = 0 CDREAD_LANG = 1 Fox 12: ===========================================================================