If you own Rev. 1.1 of the software, not the manual, please let us know. We can make you an offer, you can't resist. ;-) The version we search for is maybe just from McStuff Co. and not from OSS. Thank you so much in advance for your help, greatly appreciated by the community.
0005 ;************************************************** 0010 ; EQUATES INTO BUG/65: 0015 ; 0020 loadpoint = ???? ; to be determined by user!! 0025 lp = loadpoint ; just an abbreviation 0030 MCBEND = lp+$21F ; BUG/65 END CODE MSB 0035 DISPV = lp+$209 ; DISPLAY CHAR 0040 USRCMD = lp+$220 ; USER COMMAND VECTOR 0045 GET2HX = lp+$22C ; GET 2 HEX PARAMS 0050 HEXl = $FC ; HEX PARAM 1 RESULT 0055 HEX2 = $FE ; HEX PARAM 2 RESULT 0060 ERRPAR = lp+$235 ; REPORT PARAM ERROR 0065 DHXBYT = lp+$238 ; DISPLAY HEX BYTE 0070 LSTPG0 = lp+$240 ; LAST BUG/65 P0 BYTE USED 0075 EOL = $9B ; END OF LINE CHAR 0080 ; 0090 ;************************************************** 0100 *= USRCMD ; PATCH US INTO BUG/65 0110 JMP USERC1 0120 ; 0130 *= lp+$2000 ; RIGHT AFTER BUG/65 CODE 0140 USERC1 CMP #'1 ; COMMAND "1" ? 0150 BEQ CMDOK ; YES 0160 RTS ; ELSE RTN EQUAL RESET - ERR 0170 ; 0180 CMDOK JSR GET2HX ; GET START, END 0190 LDA HEX1 ; MAKE SURE BOTH SPECIFIED 0200 ORA HEX1+1 0210 BEQ PARMER ; OR ELSE ERROR 0220 LDA HEX2 0230 ORA HEX2+1 0240 BNE PARMOK 0250 ; 0260 PARMER JMP ERRPAR ; REPORT PARAM ERROR 0270 ; 0280 PARMOK LDX LSTPG0 ; LAST BUG/65 P0 BYTE 0290 ; (WE'LL USE THE NEXT 0300 ; FOR OUR ACCUMULATOR) 0310 LDA #0 ; CLEAR ACCUMULATOR 0320 STA 1,X 0330 TAY ; INIT Y PTR INDEX 0340 ; 0350 LOOP LDA HEX2+1 ; PAST END ADDRESS ? 0360 CMP HEX1+1 0370 BCC DONE ; YES 0380 BNE NXTEOR ; NO 0390 LDA HEX2 0400 CMP HEX1 0410 BCC DONE ; YES 0420 ; 0430 NXTEOR LDA (HEX1),Y ; CALC EOR CHKSUM 0440 EOR 1,X ; EOR WITH ACCUM 0450 STA 1,X ; AND SAVE IN ACCUM 0460 INC HEX1 ; BUMP PTR 0470 BNE LOOP 0480 INC HEX1+1 0490 JMP LOOP 0500 ; 0510 DONE LDA #EOL ; TO NEXT SCREEN LINE 0520 JSR DISPV 0530 LDX LSTPG0 ; RESTORE ACCUM ADDRESS 0540 LDA 1,X ; DISPLAY HEX RESULT 0550 JSR DHXBYT 0560 LDA #0 ; RTN OK (EQUAL SET) 0570 RTS 0580 ; 0590 *= MCBEND ; CHANGE BUG/65 CODE 0600 .BYTE >[*+$FF] ; END BYTE TO INCLUDE 0610 .END ; THAT'S ALL FOLKSThe MAC/65 file of the 'User Command Handler Example': 'USRCOMHD.M65' is already on all of the atr images above.
Device ID $3F instead $40. BUG/65 jumps indirect into the put-byte-routine of the OS ($E436 -> $FECA+1), therefore no IOCB-channel is opened and the device number is missing.
Patch (thank you ep for the solution!):
Load BUG/65 and change the following:
ORG+$068B LDX #36 LDY #E4 JMP 2777=>
ORG+$068B JMP 0600 0600 PHA LDX #10 LDA #1 STA 341,X PLA JMP FECB
a): BASIC program:
5 REM BUG/65 BUG -- VERSION 4 PATCH PROGRAM 10 XIO 36,#1,0,0,"D:BUG65.COM":REM UNPROTECT FILE 20 OPEN #1,12,0,"D:BUG65.COM" 30 FOR I=1 TO 2668:REM MOVE TO PROPER POSITION 40 GET #1,C 50 NEXT I 60 PUT #1,12 70 CLOSE #1
The above program named as "BUGV4FIX.BAS" is in form of a file already on all of the atr-images above.
To make the patch to BUG/65 do as follows: 1) Insert your BASIC cartridge or use BASIC A+ disk. 2) Place your BUG/65 disk into the disk drive. 3) Use this BASIC program above to apply the one byte patch so that BUG/65 will work with OS/A+ version 4.
b): machine language program:
name of file: BUGV4FIX.COM
BUGV4FIX.COM ; we are still searching for that file, it seems to be lost in time, like tears in rain. Any help, any hint in that case is very much appreciated. :-)
At the end of the BUG/65 manual we can read:
1. Copy the files BUG65.COM and BUGV4FIX.COM to a version 4 disk using the COPY24 command (see the DOSXL manual for details on this command).
2. At the version 4 "D1:" prompt, type the command: BUGV4FIX (RETURN).
3. The file BUG65.COM on that disk is now compatible with version 4 of DOSXL.
WARNING: Do NOT perform the BUGV4FIX command on your version 2 master disk!
In order to allow itself to be relocated virtually anywhere in memory, BUG/65 as shipped includes a relocation bit map and relocation program. In addition, relocatable BUG/65 always loads in at locations $9800 through $BC00. If these addresses are "poison" to you (e.g., if you want to use BUG/65 with a cartridge plugged in), you may wish to produce a non-relocatable version designed to run within an address range you pick. If so, USING A 48K SYSTEM, simply specify the loadpoint, as shown in the preceding section (e.g., via BUG65 7000) and allow BUG/65 to load and relocate. Then exit to OS/A+ (via Quit) and use OS/A+ intrinsic command SAVE to save a non-relocatable version. The address range to be SAVEd may be calculated as follows:
SAVE filename.com loadpoint+$200 loadpoint+$1FFF
Thus, if you had specified "BUG65 7000", you could save the non-relocatable version via
SAVE BUG7000.COM 7200 8FFF
thus also giving it a name which will later remind you where it will load at. To execute this non-relocatable version, simply type in its name (BUG7000 in the example shown).