Post Reply 
HP 71B CAT$ Problem
02-12-2017, 03:46 AM
Post: #1
HP 71B CAT$ Problem
Today I was writing a quick program to count the files on a diskette, so I though I would just use CAT$ in a loop until the filename was null and then exit, but what happened was unexpected. The diskette I was working with was formatted with 16 sectors allocated for directory and the directory was full with 128 files on the disk. When CAT$ tried to read the next entry after 128 strange things happened. I would always get a "Loop open" message and one time the 71B even dropped out of control mode. The HPIL module is the 1B version, I will try it tomorrow with my other 71B to see if I get the same result. Has anyone else seen this before?
Find all posts by this user
Quote this message in a reply
02-12-2017, 09:02 AM (This post was last modified: 02-12-2017 09:31 AM by J-F Garnier.)
Post: #2
RE: HP 71B CAT$ Problem
It may be related to the end-of-directory bug (on both 1A and 1B ROM versions), an old bug that I recently described in detail on my HP71 bug page.
But I can't reproduce your problem (on my emu71 emulator, not with a real HP9114). Even with a directory full (and so a corrupted first file), CAT$ after the last file correctly returns a null string.

If you could make a disk image, I would like to investigate. I'm still interested in all HP71 new-old-bugs !

J-F
Visit this user's website Find all posts by this user
Quote this message in a reply
02-12-2017, 04:59 PM
Post: #3
RE: HP 71B CAT$ Problem
(02-12-2017 09:02 AM)J-F Garnier Wrote:  It may be related to the end-of-directory bug (on both 1A and 1B ROM versions), an old bug that I recently described in detail on my HP71 bug page.
But I can't reproduce your problem (on my emu71 emulator, not with a real HP9114). Even with a directory full (and so a corrupted first file), CAT$ after the last file correctly returns a null string.

If you could make a disk image, I would like to investigate. I'm still interested in all HP71 new-old-bugs !

J-F

Well the diskette has been hit by the end of directory bug, and it would seem that the end of directory marker is what it is failing on, but I guess there is a chance I may have tried to read past it too. I ran my program on a diskette that does not have a full directory and the same thing happened when it got to the end. I will play with it a little more to see if I can get a better idea of the cause.

Paul.
Find all posts by this user
Quote this message in a reply
02-12-2017, 06:04 PM (This post was last modified: 02-13-2017 01:56 AM by Paul Berger (Canada).)
Post: #4
RE: HP 71B CAT$ Problem
Never mind it seems the odd behaviour is caused by Linkplus, I tried a different PC with a HPIL adapter and I get a different result. On this second one it goes through the directory correctly but it does not print out the total and turns off the 71B when it is done... very strange.

Edit.... Well maybe not so strange after all. One of the devices that Linkplus emulates is a printer, which it of course redirects to the PCs printer device, and if you PRINT something when there is no printer attached bad things happen, they even warn you about that in the manual. Well when I wrote the program I used PRINT instead of DISP to display the total and had no printer attached. It finally occurred me when I got home this evening that it might be trying to print something, so I hooked up a printer and sure enough it printed the total it was then that it finally clicked that I had used PRINT instead of DISP. It would have been nice if they allowed you to turn off the printer emulation.
Find all posts by this user
Quote this message in a reply
02-13-2017, 01:47 PM
Post: #5
RE: HP 71B CAT$ Problem
(02-12-2017 06:04 PM)Paul Berger (Canada) Wrote:  ... I had used PRINT instead of DISP. It would have been nice if they allowed you to turn off the printer emulation.

Would PRINTER IS DISPLAY do the trick? (I'd try it but I'm 2000 miles away from my HP-71 right now...)

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
02-13-2017, 02:12 PM
Post: #6
RE: HP 71B CAT$ Problem
(02-13-2017 01:47 PM)Joe Horn Wrote:  
(02-12-2017 06:04 PM)Paul Berger (Canada) Wrote:  ... I had used PRINT instead of DISP. It would have been nice if they allowed you to turn off the printer emulation.

Would PRINTER IS DISPLAY do the trick? (I'd try it but I'm 2000 miles away from my HP-71 right now...)

Yes I think that would or 'PRINTER IS *' would do it too.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)