Topics

Error 128 - Line too long during get


Anders
 

This is what I get when I try loading YATZY from an image located at: https://retrocalculator.com/software/#YATZ9816. There are two files in the image, YATZ9816 which is a PROG file and  YATZA which is an ASCII file, but when I look at the actual disk image they both look like tokenised BASIC.

If I extract the YATZ_9816 file from the tarball and put it in the image, using HPDir, then it refuses to load. It is a straught ASCII-file with 0A as delimiter. When I look at other files I have saved as ASCII, they appear to be stored as BASIC (or Pascal) strings, ie an integer for the length and then the actual characters.

How do I go about getting a program file saved as ASCII with UNIX line endings onto a LIF image so that I can GET it on the 9816?

I tried converting the TD0 file to a straight image, but I cannot load from that either.


 

Anders,

 

Convert the td0 to hpi and your problem should be solved.

https://hp9845.net/9845/downloads/software/Teledisk-to-hpi-utility.zip

Or recreate the disk from the td0 image with teledisk on a DOS pc.

 

-Rik

 

Van: VintHPcom@groups.io <VintHPcom@groups.io> Namens Anders
Verzonden: zondag 2 februari 2020 12:40
Aan: VintHPcom@groups.io
Onderwerp: [VintHPcom] Error 128 - Line too long during get

 

This is what I get when I try loading YATZY from an image located at: https://retrocalculator.com/software/#YATZ9816. There are two files in the image, YATZ9816 which is a PROG file and  YATZA which is an ASCII file, but when I look at the actual disk image they both look like tokenised BASIC.

If I extract the YATZ_9816 file from the tarball and put it in the image, using HPDir, then it refuses to load. It is a straught ASCII-file with 0A as delimiter. When I look at other files I have saved as ASCII, they appear to be stored as BASIC (or Pascal) strings, ie an integer for the length and then the actual characters.

How do I go about getting a program file saved as ASCII with UNIX line endings onto a LIF image so that I can GET it on the 9816?

I tried converting the TD0 file to a straight image, but I cannot load from that either.


Anders
 

That is the probem. That utility does not work on more recent PCs, so I use, libdisk

libdsk1512\dskconv.exe" -otype raw BAS2SYS.TD0 BAS2SYS.BIN

This has woerked well for most disks, but fails on this one. No idea why?

OTOH, writing a small C program that takes an Ascii file and produces one with Pascal style strings is trivial. I will see if I can do that instead.


 

Yes, the other solution is using a Viper card with a 9121 connected.

Read the file and use SAVE ”xxxx”  to write the ascii version to the dos disk..

Or install HPBASIC for Windows

-Rik

 

Van: VintHPcom@groups.io <VintHPcom@groups.io> Namens Anders
Verzonden: zondag 2 februari 2020 13:22
Aan: VintHPcom@groups.io
Onderwerp: Re: [VintHPcom] Error 128 - Line too long during get

 

That is the probem. That utility does not work on more recent PCs, so I use, libdisk

libdsk1512\dskconv.exe" -otype raw BAS2SYS.TD0 BAS2SYS.BIN

This has woerked well for most disks, but fails on this one. No idea why?

OTOH, writing a small C program that takes an Ascii file and produces one with Pascal style strings is trivial. I will see if I can do that instead.


Anders
 

// a2rmb.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include "stdio.h" #include "string.h" FILE *infile; FILE *outfile; char buffer[1000]; char temp[10]; int rc; int length; unsigned char hi, lo; int _tmain(int argc, char* argv[]) { rc= fopen_s(&infile,argv[1],"r"); if(rc != 0) { printf("Invalid infile name %s", argv[1]); return 0; } rc = fopen_s(&outfile,argv[2],"wc"); if(rc != 0) { printf("Invalid outfile name %s", argv[2]); return 0; } // memset(buffer,0,500); while(fgets(buffer,500,infile)!=NULL) { //fprintf(outfile,"%s",buffer); length = strlen(buffer); if(buffer[length-1] == 0x0d) { buffer[length-1] = 0; --length; } if(buffer[length-1] == 0x0a) { buffer[length-1] = 0; --length; } hi = length/256; lo = length % 256; fwrite(&hi,1,1,outfile); fwrite(&lo,1,1,outfile); fwrite(buffer,1,length, outfile); } fclose(infile); fclose(outfile); return 0; }

No idea why this will nt post correctly though..


Anders
 

Here is the file anyway!


 

The ascii file yatz.txt

 

-Rik

 

Van: VintHPcom@groups.io <VintHPcom@groups.io> Namens Anders
Verzonden: zondag 2 februari 2020 13:58
Aan: VintHPcom@groups.io
Onderwerp: Re: [VintHPcom] Error 128 - Line too long during get

 

Here is the file anyway!


Anders
 

Yes, problem seems to be that it barfs on line 40 with line too long. Does the 98x6 have a maximum line length when reading ascii program files? Also, there needs to be an FF at the end.


Paul Berger
 

The 86/87 Operating and Basic Programming Manual, available at hpmuseum.net, states the maximium line length you can enter from the keyboard is 159   characters.  I would expect that this would apply to lines read from a file as well.

Paul.

On 2020-02-02 10:00 a.m., Anders wrote:
Yes, problem seems to be that it barfs on line 40 with line too long. Does the 98x6 have a maximum line length when reading ascii program files? Also, there needs to be an FF at the end.


Anders
 

Yes, but all lines are shorter than that. Im a stumped.


 

I haven’t a problem reading it, I used the .td0 file to recreate the lif disc.

And used my viper card (82324B) to load the file in memory and create the .txt file.

I’ve run the program on the viper and it runs fine.

 

-Rik

 

 

Van: VintHPcom@groups.io <VintHPcom@groups.io> Namens Anders
Verzonden: zondag 2 februari 2020 16:22
Aan: VintHPcom@groups.io
Onderwerp: Re: [VintHPcom] Error 128 - Line too long during get

 

Yes, but all lines are shorter than that. Im a stumped.


Anders
 

Can you pretty please post the LIF file you have?

I also found out that you need a FF at the end of every line when converting. It works fine for other programs now, but not for that YATZY thing :(


Anders
 

The Ascii format seems to be more complicated than that. A line like "10 PRINT PI*2" gets an FF tagged to the end, but not a line that ends with a quote, ie "20 PRINT "RMB" "


rmb_guru
 

Anders,

I've attached a zip file containing a HP9122 LIF Disk image file that contains the following:

hp9122lif_YATZ9816.bin
VOLUME LABEL: B9836
FILE NAME PRO TYPE  REC/FILE BYTE/REC   ADDRESS     DATE     TIME

YATZ9816      PROG        82      256        16     2-Feb-20 18:15
YATZ9816a     ASCII       82      256        98     2-Feb-20 18:16

584704 of 626688 bytes free.

The "YATZ9816" file is a LOAD'able version of the program.
The "YATZ9816a" file is a GET'able ASCII version of the program.

Let me know if you need something else.

Enjoy,


Anders
 

Thanks, both of you. Will test tonight!


Anders
 

Thanks again. Both image files worked perfectly and the one RMBGuru sent is a perfect illustration what difference there is loading a PROG versus an ASCII-file.

I did a compare of the file Rik sent and the one produced by libdisk and they are indeed different. In the libdisk one the first difference seems to be ath offset 1000h where the data is pushed up 80h bytes. I have alerted John Eliot.