This file outines what I did to correct my PX-8 version of Mex 1.14 so that the SET COMM command would work correctly and so that the screen would not get behind and go crazy when running at 1200 baud. First, after quite a bit of exploration, I discovered why the SET COMM command does not work correctly in the PX-8 version of Mex 1.14. I started by looking at the config utility and finding out how it diferentiated between the different values for setting the RS-232. All of the values for the RS-232 paramaters can be examined by using DDT or some other memory management utility and looking at memeroy locations F00Fh thru F013h. The following table outlines what's where. F00Fh Baud rate F010h Word length F011h Parity F012h Stop bits F013h Special flags (DTR, DSR, etc.) The SETUP0: code in the 1.0 version of the PX-8 overlay correctly sets the baud rate and word length, but it does not use a correct value for "even" parity or "2" stop bits. For some reason, the PX-8 uses 03h for those values instead of the more logical progression of 00h 01h 02h. I'm not a programmer, so there may be a reason that I'm not aware of. Anyway, I changed the SPARITY: and SSTOP: portions of the overlay so that the correct values for "even" parity and "2" stop bits are stored. These changes are shown below. Note that the new code is larger than the old code, so a reassemble and reoverlay is necessary. SPARITY:CPI 'E'+1 ;greater than parity JNC SSTOP ;check for stop bits -> CPI 'E' ;check for "even" parity -> JNZ SPAR0 -> SUI 'B' ;even parity = 3 -> JMP SPAR1 SPAR0: SUI 'C' ;make 0 or 1 <- new label SPAR1: STA PARBITS CALL DPARITY JMP SETUP0 SSTOP: CPI 'G'+1 ;greater than stop bits JNC SMOD ;check for modem SUI 'F'-1 CPI 1 JZ SSTOP1 -> ADI 1 ;two stop bits = 3 SSTOP1: STA STP CALL DSTP JMP SETUP0 To correct the problem with the screen not keeping up at 1200 baud, I made some slight changes to the input XON/XOFF routine that adjusts for the slow screen of the PX-8 during high speed communications. I made the changes in the MODSTAT: area of the overlay. More specifically in the MDSTAT2: and MDSTAT3: areas. I didn't save the original code, so I can't recall what the original values were, but I changed them to what you see here. XRA A ;Clear carry -> LXI H,200 ;3/4 full buffer DB 0EDH,042H ;SBC HL,BC JNC MDSTAT3 ;Continue if < 200 chars in buffer . . . -> LXI H,50 DB 0EDH,042H ;SBC HL,BC JC MDSTAT4 ;Don't send XON until < 50 chars in buffer LDA PENDXOFF ;Ok, we've got < 50, did we send an XOFF? The original configured version of MEXPX.COM that I had downloaded from somewhere used an input buffer that was larger than 255 bytes, and for some reason it would not work for me. So I changed the buffer to 255 bytes and modified this area of the overlay. I fixed the buffer using the patch file called MEXPAT.ASM. The value I changed was ASIZE: (I believe that it was somewhere around 400 before the change.) I also changed XSIZE: to avoid timeouts while writing to disk (or memory). ; Buffer variables. See BUFFERS.DOC for setup information ; PSIZE: DB 2 ;default=2k 0D21h ASIZE: DB 255 ;"big" capture buffer 0D22h XSIZE: DB 4 ;4K transfer buffer 0D23h NSIZE: DB 1 ;1k for 85 batch files 0D24h PRELEN: DB 40 ;maximum length of PREFIX string 0D25h SUFLEN: DB 40 ;maximum length of SUFFIX string 0D26h A memory dump of the patch area (0D00h) follows, if you have DDT or some other way to view a hex dump of a file, then look at your version of Mex and see how it compares to this (this was done using SuperZap): File-Name Access Current-Sector File-Offset B:MEX .COM R/W 0018 000D00 000D00 C3 F4 0D C3 00 00 00 00 60 EE 47 F1 47 F4 47 F7 |........`.G.G.G.| 000D10 47 FA 47 B8 58 00 08 01 3B 04 08 3E 15 06 00 1B |G.G.X...;..>....| 000D20 00 02 FF 04 01 28 28 00 00 90 01 01 01 01 01 00 |.....((.........| 000D30 00 00 00 01 00 01 96 00 1E FF FF 00 01 00 41 42 |..............AB| 000D40 44 45 4B 4C 51 52 53 54 56 58 00 00 00 00 00 00 |DEKLQRSTVX......| 000D50 00 00 D0 00 00 CB 0D AF 0D CB 0D CD 3C 95 3C 00 |............<.<.| 000D60 00 FF FF 00 4D 45 58 20 20 20 20 20 48 4C 50 06 |....MEX HLP.| 000D70 49 4E 49 2E 4D 45 58 00 00 06 53 52 54 45 4C 4D |INI.MEX...SRTELM| PSIZE: is at 0D21h and the rest of the values follow. For an explination of the rest of the flags, see MEXPAT.ASM. If your version of MEX114.COM is configured the same as mine, then the value for ASIZE: is only 1 byte not the 2 that the original PX-8 overlay required. The original PX-8 overlay uses the PX-8's internal RS-232 buffer to store incoming data, but it conflicted with Mex's standard incoming buffer stored at ASIZE:. This may have been the central problem with my original MEXPX.COM program. The standard version of Mex shows ASIZE: to be 255h, and if you apply the original PX-8 overlay to a clean copy of MEX114.COM, it would overrun the incoming buffer and cause the screen to get behind. If the bytes shown for your version of Mex located at memory locations 0D21h to 0D26h are different that the ones shown here, you may have to reassemble a new overlay using the MEXPAT.ASM file along with your fixed MXOPX8.ASM file. For more information on these flags, the buffers, and changing them, see the file MEX-BUFF.LBR. It contains a wealth of information including the MEXPAT.ASM overlay. I have updated the MXOPX8.ASM file so that it incorporates all of my fixes and have called it version 1.1. Using that overlay along with the MXO-SM.ASM and MEXPAT.ASM overlays, you should be able to create your own bug-free version of Mex 1.14. I have included all of the overlays needed to set up your own PX-8 version of Mex 1.14 in the file MXOPX8.LBR. When you do make a new MEXPX.COM file from these overlays, use a clean (non-overlayed) version of MEX114.COM as a base. Sometimes leftover data from old overlays may cause problems with the new overlays you are adding. I was suprised that the fix to the SET COMM command was so simple and that noone else had come up with it eariler, but since I use Mex on my PX-8 all the time, I was determined to fix it at least for myself. I hope that some of the rest of you can benefit from my fixes. If anyone has any questions or problems, I'd be more than happy to help out. Bob Kitchen CIS: 73756,1015 Delphi: CHESSIE GEnie: RGKITCHEN Sigop - Portables and CP/M Sigs 21 Century Connection TBBS Charleston, WV 304-768-71915 Delphi: CHESSIE GEnie: RGKITCHEN Sigop - Portables and CP/M Sigs 21 C