8-Bit Software Online Conversion
Auto Data Scrambler - Listing
10REM Scrambled Save
20REM By M.T.Farnworth
30REM (c) Mikesoft/Andersonic
40*KEY10O.|MGOTO60|M
50CALL !-4
60MODE7:PRINT'
70INPUT"Enter code number (1-255):"C%
80IF (C%<1) OR (C%>255) GOTO60
90FOR I%=0 TO 2 STEP 2
100P%=&900
110[OPT I%
120.start EQUD 0
130.end EQUD 0
140.scram
150LDA start:CMP end:BNE cont2
160LDA start+1:CMP end+1:BNE cont2
170RTS
180.cont2
190LDA start:STA stadd+1:STA store+1
200LDA start+1:STA stadd+2:STA store+2
210LDX start
220.loop
230.stadd LDA &3000,X
240EOR #C%
250.store STA &3000,X
260INX:CPX #0:BEQ pageup
270.cont
280CPX end:BNE loop
290LDA stadd+2:CMP end+1:BNE loop
300RTS
310.pageup INC stadd+2:INC store+2
320JMP cont
330.setvec
340LDA &212:STA filev2+1
350LDA &213:STA filev2+2
360LDA #filev MOD 256:STA &212
370LDA #filev DIV 256:STA &213
380RTS
390.xreg EQUB 0
400.yreg EQUB 0
410.accum EQUB 0
420.filev
430CMP #0:BNE next1:JMP save
440.next1
450CMP #&FF:BNE next2:JMP load
460.next2
470.filev2 JMP &3000
480.save
490STX xreg:STX get+1
500STY yreg:STY get+2
510LDX #&A
520.loop2
530.get LDA &3000,X:STA start-&A,X
540INX:CPX #&12:BNE get
550JSR scram
560LDA #0:LDX xreg:LDY yreg
570JSR filev2
580STA accum
590JSR scram
600LDX xreg:LDY yreg:LDA accum
610RTS
620.load
630STX xreg:STX get2+1
640STY yreg:STY get2+2
650LDX #6:JSR get2:STA test
660LDX #2:JSR get2:STA start
670LDX #3:JSR get2:STA start+1
680LDA #&FF:LDX xreg:LDY yreg
690JSR filev2
700STA accum
710LDA test:BEQ usecont
720LDX #2:JSR get2:STA start
730LDX #3:JSR get2:STA start+1
740.usecont
750CLC
760LDX #&A:JSR get2:ADC start:STA end
770LDX #&B:JSR get2:ADC start+1:STA en
d+1
780JSR scram:LDX xreg:LDY yreg:LDA acc
um
790RTS
800.get2 LDA &3000,X:RTS
810.test EQUB 0
820]:NEXT
830CALL setvec
840*KEY10
850PRINT"All files saved before the ne
xt BREAK will be scrambled automatical
ly. Any files which are loaded will b
e considered scrambled and desc
rambled automatically. Please rememb
er your code number."