[Coco] I$Create

Bill Gunshannon bill.gunshannon at hotmail.com
Tue Mar 21 15:46:29 EDT 2023


On 3/21/2023 9:25 AM, L. Curtis Boyle wrote:
> Can you post a code snippet of one that you have tried, and what the resulting attributes you are getting?

I can do better than that.  Here's a program.


         nam     create_file
         ttl     M6809 Program to create a file and a directory
*
         ifp1
         use     /DD/defs/os9.d
         endc
*
         mod     PRGSIZ,PRGNAM,TYPE,REVS,START,SIZE
PRGNAM  fcs     /cf/
TYPE    set     Prgrm+Objct
REVS    set     ReEnt+1
*
FILE1   fcs     #./file1#
         fcb     $0D
FILE2   fcs     #./file2#
         fcb     $0D
FILE3   fcs     #./file3#
         fcb     $0D
FILE4   fcs     #./file4#
         fcb     $0D
DIR1    fcs     #./dir1#
         fcb     $0D
DIR2    fcs     #./dir2#
         fcb     $0D
DIR3    fcs     #./dir3#
         fcb     $0D
DIR4    fcs     #./dir4#
         fcb     $0D
         rmb     250
         rmb     200
SIZE    equ     .
*
START   equ     *
         leax    FILE1,U
         lda     UPDAT.
         ldb     READ.+WRITE.+PREAD.+PWRIT.
         os9     I$Create
         leax    FILE2,U
         lda     UPDAT.
         ldb     READ.+WRITE.+EXEC.+PREAD.+PWRIT.
         os9     I$Create
         leax    FILE3,U
         lda     UPDAT.
         ldb     %00011011
         os9     I$Create
         leax    FILE4,U
         lda     UPDAT.
         ldb     %00011111
         os9     I$Create
         leax    DIR1,U
         lda     UPDAT.
         ldb     READ.+WRITE.+PREAD.+PWRIT.
         os9     I$MakDir
         leax    DIR2,U
         lda     UPDAT.
         ldb     READ.+WRITE.+EXEC.+PREAD.+PWRIT.
         os9     I$MakDir
         leax    DIR3,U
         lda     UPDAT.
         ldb     %00011011
         os9     I$MakDir
         leax    DIR4,U
         lda     UPDAT.
         ldb     %00011111
         os9     I$MakDir
         clrb
         os9     F$Exit
         emod
PRGSIZ  equ     *
         END

----------------------------


And here is the result:


{N3|06}/DD/Users/bill/M6809/CF/FTest:dir -e

  Directory of .  2023/03/21 15:41

Owner  Last modified   Attributes Sector Bytecount Name
----- ---------------- ---------- ------ --------- ----
   65  2023/03/21 15:40  ------wr   12809       907 AAA
   65  2023/03/21 15:40  ----r-wr   12814       67E ft.a
   65  2023/03/21 15:41  -se-re--   13000         0 file1
   65  2023/03/21 15:41  --e-rew-   13800         0 file2
   65  2023/03/21 15:41  -se-re--   14000         0 file3
   65  2023/03/21 15:41  --e-rew-   14800         0 file4
   65  2023/03/21 15:41  dse-re--   15000        40 dir1
   65  2023/03/21 15:41  d-e-rew-   15800        40 dir2
   65  2023/03/21 15:41  dse-re--   16000        40 dir3
   65  2023/03/21 15:41  d-e-rew-   16800        40 dir4


Thanks for the help.  I am sure there is something subtle I am missing.

I haven't done any M6809 programming in decades.

bill




More information about the Coco mailing list