REM > S/SerFix REM Fixes double-null problem with MOS 5.00 : Ver$="0.10":start%=&FFFF0380:DIM mcode% &400:SerInID=1 INSV=&22A:RMV=&22C:CNPV=&22E:OSBYTE=&FFF4:OSARGS=&FFDA:OSVEC=&FFB6 : zp=&A8:PtrBlk=&80:InPtr=PtrBlk:OutPtr=PtrBlk+2:Temp=PtrBlk+4 : FOR P=0 TO 1 O%=mcode%:P%=start% : [OPT P*3+4 .Ins CPX #SerInID:BNE InsertCall:\ Not serial input TAY:BNE InsertCall:\ Not a null JSR InsertCall:BCC InsertCall:\ Put two nulls in RTS:\ Quit if buffer full .InsertCall JMP &FFFF : .go% LDA #0:LDX #1:JSR &FFF4:\ What OS? PHP:SEI:CPX #5:BNE NotCompact:\ Only needs fixing on MOS 5.00 : LDA INSV:STA InsertCall+1:LDA INSV+1:STA InsertCall+2 LDA #Ins AND 255:STA INSV:LDA #Ins DIV 256:STA INSV+1 : .NotCompact PLP:RTS:EQUS Ver$ ]:NEXT PRINT"*Save SerFix ";~mcode%;" ";~O%;" "~go%OR&FFFF0000;" ";~start%