[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prodos MLI difficulties



In article <1993Aug16.164841.5218@leland.Stanford.EDU>
geomorph@leland.Stanford.EDU (Bayard Wenzel) writes:

| Say I want to create a file. Then I eventually have to point to the
| pathname. The technical reference manual says if the pathname doesn't 
| start with a '/', prodos will use the present path to create a full
| pathname. However, when I give it anything less than a full pathname
| (/this/is/a/pain for instance) it gives me error $40, incorrect
| pathname syntax.
| 
| M'aidez... M'aidez...

The problem you are encountering is like due to the fact that the
pathname buffer you have defined is not set up as a class 0 input
string.  Class 0 input strings require a single length byte which
holds the length of the pathname which follows.

Here is an example of what you might try:

creFile	jsr	$BF00		;ProDOS mli entry point
	dfb	$C0		;   CREATE FILE
	da	creParm		;   CREATE FILE PARAMETERS
	bcs	oops		;oops!  had a boo-boo.  :)
	bcc	saright		;everything is 'saright'

creParm	dfb	$07		;seven parms in the creation table
	da	crePath		;pointer to class 0 pathname
	dfb	%11100011	;bit 7, 1 = destroy enable
				;    6, 1 = rename enable
				;    5, 1 = back-up needed
				;  4-3, 0 (must be because reserved)
				;    2, 0 = not invisible
				;    1, 1 = write enable
				;    0, 1 = read enable
	dfb	$06		;binary file type (why not! :)
	da	$4000		;auxilliary type (default load addr)
	dfb	$00		;storage type (default to seedling)
	dfb	$00		;current date is creation date
	dfb	$00		;current time is creation time

crePath	dfb	$0F		;the pathname is 15 characters long
	asc	'/THIS/IS/A/PAIN'

I hope that you find this helpful.  Let me know if this works.

| -bayard wenzel
| geomorph@leland.stanford.edu
-- 
 internet: dockery@griffin.cuc.ab.ca
      -or- sbdocker@acs.ucalgary.ca
      -or- dockery@pro-calgary.cts.com
 pro-line: dockery@pro-calgary