8-Bit Software Online Conversion
:0.$.SfeSave - Listing
10 REM SAFE SAVING MK II
20 REM BY ALEX WILSON
30 REM USER (506)
40 REM
50 REM
60MODE1
70:
80PROCassemble
90:
100PROCoutline("Safer Saving",1,1,2,1)
110PROCoutline("When you Try to save a
file which",1,3,3,0)
120PROCoutline("Already exsists you wi
ll be prompted.",1,5,3,0)
130PROCoutline("File exsists 'OVERWRIT
E FILE'.?",1,7,3,0)
140PROCoutline("If you answer 'Y' the
file will be",1,9,3,1)
150PROCoutline("saved. But if you answ
er with anything",1,11,3,1)
160PROCoutline("other than 'Y' the fil
e will not be",1,13,3,1)
170PROCoutline("saved to Disc.",1,15,3
,1)
180PROCoutline("÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷
÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷",1,17,1,2)
190PROCoutline("PRESS ANY KEY TO CONTI
NUE.....",1,21,2,1)
200 PROCoutline("÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷
÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷",1,25,1,0)
210 G=GET
220CLS
230PROCoutline("BASIC.",1,1,2,1)
240VDU10:VDU10:VDU10
250END
260:
270DEFPROCassemble
280IF?&212+256*?&213=&0A00THENENDPROC
290oswrch=&FFE3
300osbyte=&FFF4
310osrdch=&FFE0
320osfind=&FFCE
330oldvec=?&212+256*?&213
340FORpass%=0TO2STEP2
350P%=&0A00
360[OPT pass%
370.newvec
380CMP#0:BNE notus
390PHP
400PHA
410TXA:PHA
420TYA:PHA
430STX&70:STY&71
440LDY#0
450LDA(&70),Y:PHA
460INY
470LDA(&70),Y:TAY
480PLA:TAX
490LDA#&40
500JSR osfind
510CMP#0
520BEQ ok
530LDA#messageMOD256:STA&70
540LDA#messageDIV256:STA&71
550LDY#0
560.ploop
570LDA(&70),Y
580CMP#0
590BEQ out
600JSR oswrch
610INY
620JMP ploop
630.ok
640LDA#0:TAY
650JSR osfind
660PLA:TAY
670PLA:TAX
680PLA
690PLP
700.notus
710JMP oldvec
720.out
730JSR osrdch
740BCS error
750CMP#ASC"Y"
760BEQ ok
770CMP#ASC"y"
780BEQ ok
790.done
800LDA#0:TAY
810JSR&FFCE
820PLA:PLA
830PLA:PLA
840RTS
850.error
860CMP#27
870BNE done
880LDA#126
890JSR osbyte
900JMP done
910.message
920OPTFNequs("File exists. Overwrite t
he file?")
930OPTFNequb(7)
940OPTFNequb(13)
950OPTFNequb(0)
960]
970NEXT
980*KEY 10?&212=0:?&213=&0A|M
990?&212=0
1000?&213=&0A
1010ENDPROC
1020:
1030DEFFNequs(equs$)
1040$P%=equs$
1050P%=P%+LENequs$
1060=pass%
1070:
1080DEFFNequb(equb%)
1090?P%=equb%MOD256
1100P%=P%+1
1110=pass%
1120:
1130DEF PROCoutline(text$,x,y,c1,c2)
1140gx=x*32:gy=1024-(y*32):VDU5
1150GCOL 0,c1
1160MOVE gx-4,gy:PRINT text$
1170MOVE gx+4,gy:PRINT text$
1180MOVE gx,gy-4:PRINT text$
1190MOVE gx,gy+4:PRINT text$
1200MOVE gx-4,gy-4:PRINT text$
1210MOVE gx+4,gy-4:PRINT text$
1220MOVE gx+4,gy+4:PRINT text$
1230MOVE gx-4,gy+4:PRINT text$
1240GCOL 0,c2:MOVE gx,gy:PRINT text$
1250VDU 4:ENDPROC
1260: