alexhagn@neabbs.UUCP (ALEXANDER HAGEN) (07/11/90)
While exploring my Amiga bridgeboard, I found a bug in the Janus 2.0 system software (Handler 2.63, Library 33.1). Since I can program in 8088 Assembler as well, I decided to fix it myself. The bug is located in the JFreeMem routine in the PC.Boot file. What's wrong? When returning allocated memory, the JFreeMem function adds the wrong memory locations together. Also, the wrong byte is unlocked, causing data destruction elsewhere in Janus memory! Any other call to the janus mem alloc and free functions will lock up the bridgeboard. Only an Amiga-reset will fix this - unless you know what byte to change :-) To find out wether your bridgeboard contains the bug, enter the following lines on the MS-DOS side: A> debug -a 0100 1436:0100 mov ax,0202 1436:0103 mov bx,0100 1436:0106 int 0b 1436:0108 push bx 1436:0109 mov ax,0202 1436:010C mov bx,0100 1436:010F int 0b 1436:0111 mov ax,0302 1436:0114 int 0b 1436:0116 pop bx 1436:0117 mov ax,0302 1436:011A int 0b 1436:011C nop 1436:011D -g=0100 011c -q If the bridgeboard does not return to the dos prompt, your system software contains the bug. In that case, follow the steps below: 1) Reset the Amiga 2) Run the BASIC program, listed below 3) Reset the Amiga again REM Janus 2.0 Bug fix REM Copyright (c) 1990 by drs. A.D. Hagen CLEAR,50000& REM Checking data for typing errors check&=0 FOR i=0 TO 100 READ num check&=check&+num NEXT i IF check&<>700730& THEN PRINT "Data contains error!!!":STOP REM Removing bug RESTORE NAME ":pc/system/pc.boot" AS ":pc/system/pc.boot.old" OPEN ":pc/system/pc.boot.old" FOR INPUT AS #1 LEN=4096 OPEN ":pc/system/PC.Boot" FOR OUTPUT AS #2 LEN=4096 PRINT #2,INPUT$(1168,#1); a$=INPUT$(202,#1) FOR i=0 TO 100 READ num:IF num<0 THEN num=num+65536& msb=INT(num/256):lsb=num-256*msb PRINT #2,CHR$(msb);CHR$(lsb); NEXT i PRINT #2,INPUT$(10918,#1); CLOSE #1,#2 DATA &H1E83,&HEB04,&H2E8E,&H06EE,&H218C,&HC18E,&HD9BF,&H0200 DATA &H3C01,&H7407,&H3C02,&H75D7,&HBF10,&H0026,&H3B5D,&H0A73 DATA &HCEF9,&HF026,&HD015,&H7304,&H9090,&HEBF5,&H8D75,&H0857 DATA &H0656,&H068B,&H7508,&H8E5D,&H068B,&H4F02,&H2601,&H4D0C DATA &HEB49,&H222A,&H2A2A,&H2042,&H7567,&H7320,&H6669,&H7865 DATA &H6420,&H6279,&H2064,&H7273,&H2E20,&H412E,&H442E,&H2048 DATA &H6167,&H656E,&H2028,&H5555,&H4350,&H3A20,&H616C,&H6578 DATA &H6861,&H676E,&H406E,&H6561,&H6262,&H732E,&H7575,&H6370 DATA &H2920,&H2A2A,&H2A58,&H5856,&H1E8B,&H3439,&HDE72,&HF607 DATA &H5F89,&H3726,&H891D,&H268B,&H5502,&H89D0,&H01FA,&H39DA DATA &H750E,&H2601,&HC826,&H8945,&H028B,&H0726,&H8905,&H89FB DATA &H89D8,&H01C8,&H39F0,&H750A,&H8B44,&H0201,&H4702,&H8B04 DATA &H8907,&HB000,&H075F,&H26C6,&H057F END Hope this helps... ----------------------------------------------------------------------- _ Alexander Hagen | PRIV MSGS IN DUTCH, GERMAN OR ENGLISH _/_\__ Newtonstraat 20 | ````-o--o- 4532 KH Terneuzen | UUCP alexhagn@neabbs.UUCP The Netherlands | Fido 2:285/403.2 ------THE-FIRST-AND-ONLY-UNREGISTERED-AMIGA-BRIDGEBOARD-DEVELOPER------