Jump to content

Recommended Posts

12 hours ago, GDMike said:

I have a scenario that doesn't know what the path+filename would be as it's generated by the user, and is contained in the following.

FNM    BSS  16
COUNT  DATA 0

And I gather from the user, the path+filename into FNM and the length of the filename into COUNT. How would I setup my PAB with this information instead of using the TEXT of a defined path?

 

How much space you allow for the filename (probably should think “pathname”) depends on the DSR. The TI disk controller’s DSR only allows 10-character filenames, but other controllers allow longer paths that include subdirectory names. Even with the TI DSR, your PAB should allow for 25 characters because one way to specify a pathname is DSK.<diskname>.<filename>. Since the diskname can also be 10 characters, that is 3 characters for the devicename (DSK), 10 characters for diskname, 10 characters for filename and 2 characters for the ‘.’ separators.

 

Remember that the namelength in the PAB is a single byte (byte 9). In your scenario, you would need to copy the LSB of COUNT to byte 9 of your PAB in VRAM. If your VRAM address of your PAB is VPAB, say, then something like the following would copy the namelength and the pathname for the file to your PAB:

VPAB   EQU  >1200             VRAM location of PAB
*
* Copy namelength byte to VRAM location of PAB
       LI   R0,VPAB+9         VRAM address of PAB's namelength byte to R0
       MOVB @COUNT+1,R1       namelength byte to R1
       BLWP @VSBW             write the namelength byte to PAB
*
* Copy filename (pathname) to VRAM location of PAB
       LI   R0,VPAB+10        VRAM address of PAB's filename to R0
       LI   R1,FNM            RAM address of filename to R1
       LI   R2,COUNT          namelength to R2
       BLWP @VMBW             write the filename to PAB

 

...lee

Edited by Lee Stewart
clearer comment for “LI R0,VPAB+10”
  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks Lee. I think you've covered this way back when, but I'll confirm that it's probably best that I intentionally do a DF128 read/write type of operation.

I'll lose 28 bytes since I'm saving 1k per SNP page.

How much data again can I get into a DSSD disk, 720k? If that's the case, I'll use less Sam's than I originally thought.

 

 

Share this post


Link to post
Share on other sites

720K is what you can achieve with a DSDD 3.5" (80 track) floppy disk (2880 sectors).

  • Like 2

Share this post


Link to post
Share on other sites
9 hours ago, GDMike said:

... but I'll confirm that it's probably best that I intentionally do a DF128 read/write type of operation.

I'll lose 28 bytes since I'm saving 1k per SNP page....

Is this some midnight math too, or what do you mean here?

If we are talking real disk sectors, then they are 256 bytes. Each can hold exactly two records that are 128 bytes long.

A 1 K page will fill exactly four sectors. Now assuming you are talking kilobyte, not 1000 characters. But since a kilobyte is 1024 bytes, the difference isn't 28 there either.

Share this post


Link to post
Share on other sites

The latest release (early, and no LOAD\SAVE options yet)

SNP with bugs removed

its a Disp Fixed 80 with program name = SNP and start name = SNP

 

SNP

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...