tjJ 15:C%=C%-32 ?W%=?W%*16+C% &C9:G%<15:G%=G%+1:D%=D%+3tlC "C%=&CA:F%<15:F%=F%+1:E%=E%+1 C%=&CB:F%:F%=F%-1:E%=E%-1 D%,E%);: B%=:D%=5:G%=0:60,E%);: 'C%<>&C8:G%:G%=G%-1:D%=D%-3dhC FC%<>&C9:G%<15:G%=G%+1:D%=D%+3:F%<15:F%=F%+1:E%=E%+1:D%=5:G%=0 "C%=&CA:F%<15:F%=F%+1:E%=E%+1 C%=&CB:F%:F%=F%-1:E%=E%-1 60+G%,E%);:  B%=:D%=50:G%=15:D%,E%);: D:C%=&8C:G%=0:D%=5 C%=&8D:G%=15:D%=50 C%=&8E:F%=15:E%=19 C%=&8F:F%=0:E%=4 $B%=:D%,E%);: .5T:C:"Set "C$:C%=C$:I%=0255:Q%?I%=C%::A: jL:C:"*"C$::"*";C$:C$ G .'"Press space to continue";:=32::A: +I:C:"Write "C$:C$="":C%=S%:C%=C$ ""Writing to ";:F(C%):X%?5=10 '"OK ?";:C$=:C$<>"Y"C$<>"y":A: sX%?6=(C%&FF0000)&10000:X%?7=(C%&FF00)&100:X%?8=C%:L%:S%=C%:A:?X%:C:"**** Disc fault "~?X%:G:D%,E%); ( ?X%=0: 2*N:C:"Read "C$:C$="":C%=S%:C%=C$ Z$"Reading ";:F(C%):X%?5=8:T@E xM::'"W i n c h e s t e r D i s c E d i t o r"''"0-9,A-F overtype when in the data area. All keys overtype in the text area":"Cursor Keys - Move the cursor in the data and text areas" "Shifted Cursor Keys - Move the cursor to row/column ends in the data area":'"R - Read a sector from the disc. Read ":"N - Read the Next sector from the disc":"P - Read the Previous sector from the disc" "W - Write a sector to the disc. Write ":"S - Set the sector buffer to a value. Set ":"X - Exchange all value1 bytes to value2. Exchange //" "L - Look for a pattern starting at the current sector. Exits by found or Escape":"G - Go on Looking, using the same pattern as was last used":"M - Mask. Set the Mask used in comparisons when Looking." "* - Star command to the BBC machine OS":"Escape - leave the current operation with the option of leaving the program":"H - Help, this command":'"All numbers are in Hex if preceded by '&', else in decimal":t\D 6E:C%=S%+1:X%?5=8:T@E TO:C%=S%-1:C%<0: hX%?5=8:T@E r_X:C:"Exchange /"C$:C%=C$,C$,"/")-1):O%=C$,C$,"/")+1):I%=Q%Q%+255:?I%=C%:?I%=O%  :A: P::I%=0:''"Type in the pattern to search for as a list of :"'" or & or ' [RETURN]"'"or as $"'"Terminate the list with a null entry"''"Look for :":"&";~I%;:" ? "C$ 1I%=0C$,1)="$":$U%=C$,2):V%=C$-2::TzG C$="":TpG (C$,1)="'"U%?I%=C$,2,1)U%?I%=C$ I%=I%+1:I%>255 0 V%=I%-1 :"Now specify the search limits within each sector, ie the range of positions"'"where the found string may start, from 0 to 255":"Start search byte ? "C$:T%=C$:"End search byte ? "C$:K%=C$:255-V%(U%?J%M%):J%=V%:::E: :H%=:Z%<>S%::A ڌG%=I%16:F%=I%16:D%=5+G%*3:E%=F%+4:D%-2,E%);"*";:C:"Found at &"~I%;". Continue ?";:C$=:C$<>"Y"C$<>"y":C$;D%,E%);:I%=256::: H%=::E: R::''"The Mask is used to ignore bits in Looking for a pattern"'"E.g. to ignore the top bit, &7F. To ignore case, &DF. To ignore both, &5F"'"Type [RETURN] for the default, &FF"':"Mask ? "C$:C$="":M%=&FF:M%=C$ > :A: HK:N%500:I%=033:P%=N%:[OPT0:LDA#Q%256:STA&80:LDA#Q%256:STA&81:LDX#4:.I:LDA#31:JSR&FFEE:LDA#3:JSR&FFEE:TXA:JSR&FFEE:LDA#32:JSR&FFEE:LDY#0:.J:LDA(&80),Y:JSRD:INY:CPY#16:BCCJ:LDA#31:JSR&FFEE:LDA#60:JSR&FFEE:TXA:JSR&FFEE:LDY#0:.K LDA(&80),Y:BPLG:PHA:LDA#17:JSR&FFEE:LDA#0:JSR&FFEE:LDA#17:JSR&FFEE:LDA#129:JSR&FFEE:PLA:.G:#&7F:CMP#32:BCSE:LDA#&2E:.E CMP#&7F:BNEF:LDA#&FF:.F JSR&FFEE:LDA#17:JSR&FFEE:LDA#1:JSR&FFEE:LDA#17:JSR&FFEE:LDA#128:JSR&FFEE:INY:CPY#16:BCCK:LDA&80 ADC#15:STA&80:BCCL:INC&81:.L:INX:CPX#20:BCSH:JMPI:.H:RTS:.D:PHA:LSRA:LSRA:LSRA:LSRA:JSRB:PLA:#15:JSRB:LDA#32:JMP&FFEE:.BA#&30:CMP#&3A:BCCC:ADC#6:.C:JMP&FFEE:]:: XH%=:<>17:C:"Exit ?";:C$=:C$:C$="Y"C$="y"C$="Q"C$="q":"FX4,0":::TDA 0:''"***** ERROR"::" at line ";:G:TNA