Image Map Image Map
Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Running DDT and needing console imput

  1. #11
    Join Date
    Jan 2007
    Location
    Pacific Northwest, USA
    Posts
    32,020
    Blog Entries
    18

    Default

    No--the granularity of the CP/M file system is 128 bytes.

    ASCII files will use a ctrl-Z (hex 1a) to indicate the end of the file, but it's up to the application to know that (e.g. TYPE or ED). Some early MS-DOS utilities also honored the 1A ASCII file end.

    The way CP/M tells the file size is to search the directory for the highest extent and compute the file size from the record count and extent number. You can, in fact, have a file larger than the disk in CP/M (called a "sparse file").

  2. #12

    Default

    CP/M uses the entire 128 bytes. Files don't have a byte count - at least not in CP/M 2.2. Text files have a Ctrl-Z character to indicate EOF at a byte boundary, but I think you are talking about binary files. Some programs will fill the last buffer to 128 bytes, to ensure it is "clean" (otherwise, it contains the remnants of the previous operation).

    I'm guessing you are using a "put character" sort of routine to fill the buffer byte-by-byte, writing when 128 bytes have been put. Depending on how you've done that, it could be that the initial values of the variables used to control that buffering have resulted in dropping the first byte that is "put".

  3. #13
    Join Date
    Jun 2014
    Location
    Salt Lake City, Utah
    Posts
    513
    Blog Entries
    1

    Default

    Thanks guys, that is really helpful. I think tomorrow I should be able to get this all working.

    Len
    Spread the joy of Vintage Addiction

    -->www.chronworks.com/<--->www.i8008.net/<--

  4. #14
    Join Date
    Jun 2014
    Location
    Salt Lake City, Utah
    Posts
    513
    Blog Entries
    1

    Default

    Got it!!!

    I added a routine to fill the DMA area with 0x1A.

    I had to add delays to the serial stream on the PC side. I run my port at 9600 baud. A 2Mhz 8080 struggles. With the delays on the chars everything is good.

    If anyone is interested I can post the code. It's a port of Grants DOWNLOAD.COM from Z80 to 8080 so I can upload SW over a serial port easily. Grant wrote a utility that runs on windows that you drop files onto to convert them to HEX. Then you paste the resulting HEX into your serial terminal. The DOWNLOAD program recreates the file on your CPM machine. Adding the <cntl> z makes it work well with text files.

    Thanks for all your help!!!

    len
    Spread the joy of Vintage Addiction

    -->www.chronworks.com/<--->www.i8008.net/<--

  5. #15

    Default

    Yeah, 2MHz Z80/8080 is going to have trouble with a sustained stream at 9600 baud. You might be able to bypass BDOS/BIOS and directly access the UART in DOWNLOAD.COM, but even then you have to eventually write to disk which blows it all out of the water. You must have added some serious delays. The surest way would be to use handshaking. But if your host PC doesn't honor handshake signals/characters then you're stuck.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •