> RGBEDIT " Change palette in LDPIC file ( HW%=1 2)&87:A%=--20480:A%<0:=+A%:$&600 <;&82:R%19,G%19,B%19,L%15:F$="":pal%=0:osb=&FFF4:wd%=20 Freset:clr:HELP Z1sm%=0::clr:0,26);::A%=(200):sm%:load d"C=0::scrn:'8;:wd%=+1:clr n)F$<>"":0,26);wd%;0,26);F$,wd%); x:23,1;0;0;0;0:::N=L%?C >0,27);"COL:";~C;" R:"d(R%?N)" G:"d(G%?N)" B:"d(B%?N); +C$=:U%=2*(-1)+1:C$>"_":C$=(C$&DF) C$=",":C=(C-1)15 C$=".":C=(C+1)15 ",.",C$)=0 1C$="R":R%?N=R%?N+U%:(R%?N)-16:R%?N=R%?N-U% 1C$="G":G%?N=G%?N+U%:(G%?N)-16:G%?N=G%?N-U% 1C$="B":B%?N=B%?N+U%:(B%?N)-16:B%?N=B%?N-U% &"RGB",C$):rgb(N,R%?N,G%?N,B%?N) "CDLSPHQ*",C$):clr 3C$="C":"COLOUR: ";:C=:C=((C15)-9*(C>64))15 C$="D":"DEFAULT";:reset "LSPHQ*",C$) C$="H":HELP C$="*":CMD C$="L":LOAD "C$="S":SAVE ,C$="P":PALL 6 C$="Q": J4mem(S%):A%-1:-A%-1024>S%:mem%=A%+512mem%= T ^2clr:26,23,1,1;0;0;0;:0,27);wd%;0,27);: h"err(A$):msg(A$):A%=(200): r'msg(A$):0,27);wd%;0,27);A$;: |reset:A%=015:L%?A%=A%:R%?A%=15*(A%1):G%?A%=7.5*(A%2):B%?A%=3.75*(A%4)::R%!16=&F000000:G%!16=&F00:B%!16=&80F00:clrs:20: 2clrs:A%=015:rgb(A%,R%?A%,G%?A%,B%?A%):: 3load:F$<>"":sm%mem%=::"LDPIC "+F$:clrs  rHELP:23,1;0;0;0;0:"Colour RGB Default <> Load Save Palette"(-(wd%>40))"Help Quit *"(wd%-);:A%=:clr: -CMD:28,0,27,wd%-1,0:"*"A$:sm%=:A$ ,":";:C$=(&DF):127:C$<>10:26:clr "LSP",C$)=0:load  LOAD:"LOAD: "A$ -in%=(A$):in%=0:err("File not found"): mem%?(ptr%+2)=r(G%?(A%-1))*16+r(B%?(A%-1)):ptr%=ptr%+3: v8"SAVE "+A$+" "+~mem%+"+"+~(pal%+24)+" 0 FFFFFD00" F$=A$:load: 0PALL:"PALETTE ";:T%=&DF:"LS",T%)=0: "T%=T%=76:T%:"LOAD";"SAVE"; @": "A$:ch%=0:T%:ch%=(A$):ch%=0:err("File not found"): Bch%:sz%=#ch%:#ch%:ch%=0:sz%>128:err("Not palette file"): PAL2:load: _PAL2:mem(128):ptr%=mem%:T%:"LOAD "+A$+" "+~ptr%:?ptr%<>19:err("Not palette file"): гT%:A%=019:?ptr%=19:ptr%?1=A%15:ptr%?2=16+(A%16)2-(A%>16):ptr%?3=R%?A%*17:ptr%?4=G%?A%*17:ptr%?5=B%?A%*17:ptr%=ptr%+6::"SAVE "+A$+" "+~mem%+" "+~ptr%+" 0 FFFFED00": $A%=1sz%6:ptr%?1=16:C%=ptr%?2 *ptr%?1<16:C%=ptr%?1:ptr%?2<>16:C%=16 [C%<16:R%?C%=(ptr%?3)16:G%?C%=(ptr%?4)16:B%?C%=(ptr%?5)16:rgb(C%,R%?C%,G%?C%,B%?C%) ptr%=ptr%+6::  #rgb(I%,D%,E%,F%):A%,X%,Y%,O% (HW%=0:19,I%,16,D%*16,E%*16,F%*16:  YHW%=1:A%=151:X%=35:Y%=I%*16+D%:osb:Y%=E%*16+F%:osb:19,I%,L%?I%;0;19,E%,L%?E%;0;: *OX%=96:Y%=&E0+I%:osb:Y%=D%15:osb:Y%=(E%15)+64:osb:Y%=(F%15)+128:osb: > scrn H$A%=135:A%=((osb)&FF0000)65536 R&dx%="7264487264486464",2*A%+1,2) \85:A%=015:0,A%:160*(A%7),127-(A%8)*64:0,0,-63 f 81,159,0:0,0,63:81,-159,0 p40,7-(A%7):160*(A%7)+dx%,108-(A%8)*64:;~A%; z :4: ݤd(A%)=A%+" ",2) %ݤrev(A%):=r(A%16)+16*r(A%15) ;ݤr(A%):="00080412021006140109051303110715",A%*2+1,2) 6ݤbit:bits%=0:data%=mem%?ptr%:ptr%=ptr%+1:bits%=8 *data%=data%*2:bits%=bits%-1:=data%256 .ݤget(N%):A%,B%:B%=1N%:A%=(A%2)bit: A%=A%2:N%=N%+1:N%>8:=A%  ݤscan )dw%=rev(mem%?0):mode%=rev(mem%?1)7 0stp%=rev(mem%?10):cw%=rev(mem%?11):bits%=0 4num%=256*("&"+"5050504028282004",mode%*2+1,2)) &dw%=0dw%>8cw%=0cw%>8stp%>8:=0 /mc:!addr=mem%+12:!num=num%:?dw=dw%:?cw=cw% 4scan:ptr%=!addr-mem%:ptr%ext%:=0 $= 8mc:mc%=mc%:mc%: BMaddr=&70:num=&72:data=&74:bits=&75:byte=&76:cw=&77:dw=&78:cnt=&79:add=&7A L!mc%95:P=01:P%=mc%:[OPT P*2 V.scan:LDY#0:STYbits `).lp1:JSRbit:LDA#1:BCCnxt:LDXcw:JSRget j5.nxt:STAadd:LDXdw:JSRget:LDAnum:SEC:SBCadd:STAnum t(LDAnum+1:SBC#0:STAnum+1:Anum:BNElp1 ~%.alg:LDAbits:BEQret:JSRbit:JMPalg .get:STXcnt 1.lp2:JSRbit:RORbyte:DEX:BNElp2:LDAbyte:LDXcnt %.lp3:CPX#8:BCSret:LSRA:INX:BNElp3 9.bit:LDAbits:BNElp4:LDA(addr),Y:STAdata:LDA#8:STAbits INCaddr:BNElp4:INCaddr+1 '.lp4:DECbits:ASLdata:.ret:RTS:]::