|
Post by oldsailor on May 30, 2022 4:03:49 GMT
I am new to my Commodore 128 and I have started to do some beginning programming using Basic 7. I have ran across a program that uses the Open statement in a way that I do not understand.
This is the statement from the program I am examining:
1040 OPEN15,8,15, "IJ";
My problem is I can find no reference to the "IJ" portion of the above statement. I have checked Commodore reference books, third party basic 7 reference books, and I have searched online to no avail. Does anyone have any ideas? Or is there a better reference I have not heard about?
Any help at this point would be appreciated.
|
|
|
Post by oziphantom on May 30, 2022 15:04:47 GMT
I'm not aware of IJ being anything special I<number> tells the drive to initialize that sub drive. I could be that is opening a file called IJ. For drive commands you need a 1541/1571/1581 user's guide. as this is a command being send to a drive for its DOS to deal with. It would help if I knew what the program was trying to do, or the lines after this one did.
|
|
|
Post by oldsailor on May 30, 2022 23:04:50 GMT
The program is an Auto Boot Creator. Written by Fred Bowen & Terry Ryan sometime long ago and far away. Here are the first few lines of the program if it will help. I know that the "#" in line 1060 allows the 1571 to auto select the buffer. But I can't find any reference to the open statement in line 1040 and it's use of "IJ".
Also, thank you so much for your reply.
P.S. - I forgot to mention that there is no reference to a file "IJ" in the remainder of the listing nor is there a file "IJ" on the disk where the program "Auto Boot Creator" was saved.
1000 PRINT"{CLR} *** AUTO BOOT CREATOR ***" 1010 REM 1020 REM BY FRED BOWEN & TERRY RYAN 1030 REM 1040 OPEN15,8,15,"IJ": NU$=CHR$(0) 1050 : IF DS THEN PRINT"*** DISK ERROR; ";DS$: E=-1: GOTO 1720 1060 OPEN 8,8,8,"#" 1070 PRINT#15,"U1;8 0 1 0":PRINT#15,"B-P";8;5 1080 : GET#8,BA$ 1090 PRINT#15,"U1:8 0 1 0" 1100 : FORI=0TO24: GET#8,A$: BL$=BL$+CHR$(ASC(A$)): NEXT 1110 IF (ASC(BA$)AND1)=0 THEN BEGIN 1120 : IF LEFT$(BL$,3)="CBM" THEN BEGIN 1130 : PRINT"*** ALREADY A BOOT DISK: "; 1140 : I=8 1150 : DO 1160 : A$=MID$(BL$,I,1) 1170 : PRINTA$; 1180 : I=I+1 1190 : LOOP UNTIL A$=NU$ 1200 : PRINT 1210 : BEND: ELSE BEGIN 1220 : PRINT"***BOOT SECTOR USED BY ANOTHER PROGRAM ***" 1230 : BEND 1240 : INPUT"{CUR DN}{CUR RT} CONTINUE (Y/N) ";A$ 1250 : IF A$<>"Y" THEN E=-1: GOTO1720 1260 : BA = -1 1270 BEND 1280 . . . 1750 END
|
|
|
Post by oziphantom on May 31, 2022 9:59:12 GMT
I could just be a typo, the I is exactly what you would want to do, and maybe the J is just "ignored". Would have to consult a rom disassembly. Maybe the J tells a 1571 to load the extended and only the first BAM, only other thing I could think of.
|
|
|
Post by oldsailor on May 31, 2022 15:28:41 GMT
Thanks for the quick reply. I know that the program Auto Boot Creator was designed to work on track 1 sector 0 of the 1571. I found a use of the "I" in a program listing in the book COMMODORE 1571 INTERNALS by Abacus Software on page 30. I shows listing for both Basic 2.0 and Basic 7.0. Unfortunately, I could not find anything mentioning the "J" use. One interesting note I found in an internet article was that Fred Bowen and Terry Ryan were the C128 software engineers. Below is a portion of the text of the article I found:
The primary hardware designer of the C128 was Bil Herd, who had worked on the Plus/4. Other hardware engineers were Dave Haynie and Frank Palaia, while the IC design work was done by Dave DiOrio. The main Commodore system software was developed by Fred Bowen and Terry Ryan, while the CP/M subsystem was developed by Von Ertwine.
I really appreciate your feedback and suggestions. While I am new to using Basic 7 (or at least attempting to use it) I have been a Commodore fan for more years than I care to admit. Thank you again.
|
|
|
Post by oziphantom on Jun 1, 2022 17:44:48 GMT
I asked the drive coding gods, yeah IJ does I0 basically. The J in the ROM code will just be ignored. Its possible it was meant to be "UJ" which is drive reset, and it is a type to "IJ" which just does an initialize or they realized that a reset took to long and that an initialize was all it needed but left the J for some reason.
|
|