[Coco] I$Create
Christopher R. Hawks
chawks at dls.net
Tue Mar 21 16:54:00 EDT 2023
On Tue, 21 Mar 2023 15:46:29 -0400
Bill Gunshannon via Coco <coco at maltedmedia.com> wrote:
>
> 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
>
>
>
Bill:
I'm pretty sure the lines _should_ be:
ldb #READ.+WRITE.+PREAD.+PWRIT.
Without the # register b would be loaded with the value stored at
address %00011011 ($1B) (decimal 27)
Christopher R. Hawks
HAWKSoft
--
Piglet noticed that even though he had a very small heart,
it could hold a rather large amount of gratitude.
---Winnie Ther Pooh
----------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
More information about the Coco
mailing list