Machine Code Loader/Editor
1 REM 111111111122222222223333333333444444444455555555556666666666777777777788888888889999999999000000000011111111112222222222333333333344444444445555555555666666666677777777778888888888999999999900000000001111111111222222222233333333334444444444555555555566666666667777777777888888888899999999990000000000
2 CLS
3 PRINT "T/S 1000 MACH CODE LOADER/EDITOR"
4 PRINT AT 2,0;"DO YOU WISH TO...",,,
5 PRINT " 1)...WRITE CODE?"
6 PRINT " 2)...LIST CODE?"
7 PRINT " 3)...EDIT CODE?"
8 PRINT " 4)...MOVE CODE?"
9 PRINT " 5)...COPY CODE?"
10 PRINT " 6)...DELETE CODE?"
11 PRINT " 7)...RUN CODE?"
12 PRINT " 8)...SAVE SPACE ABOVE RAMTOP?"
13 PRINT " 9)...MOVE CODE DOWN TO SAVE IT?"
14 PRINT "10)...SEARCH FOR A GIVEN BYTE?"
15 PRINT "11)...SAVE PROGRAM AND CODE?"
16 PRINT "12)...QUIT PROGRAM?",,,
17 PRINT "ENTER NBR. OF SELECTION."
18 INPUT A
19 IF A<1 OR A>12 THEN GOTO 18
20 IF A=1 THEN GOTO 200
21 IF A=2 THEN GOTO 300
22 IF A=3 THEN GOTO 600
23 IF A=4 THEN GOTO 800
24 IF A=5 THEN GOTO 1100
25 IF A=6 THEN GOTO 700
26 IF A=7 THEN GOTO 500
27 IF A=8 THEN GOTO 900
28 IF A=9 THEN GOTO 1000
29 IF A=10 THEN GOTO 1200
30 IF A=11 THEN GOTO 400
31 IF A=12 THEN STOP
200 CLS
201 PRINT ,,"%E%N%T%E%R% %A%D%D%R%E%S%S% %I%N% %D%E%C%I%M%A%L% % % % % % % % "
202 PRINT "%E%N%T%E%R% %C%O%D%E% %I%N% %H%E%X%A%D%E%C%I%M%A%L% % % % % % % "
203 PRINT "%E%N%D% %C%O%D%E% %B%Y% %E%N%T%E%R%I%N%G% %"%S%"% % % % % % % % "
210 PRINT ,,"ADDRESS TO WRITE TO:";
220 INPUT N
225 PRINT N
230 LET A$=""
240 IF A$="" THEN INPUT A$
250 IF A$="S" THEN GOTO 2
260 POKE N,((CODE A$-28)*16+(CODE A$(2)-28))
270 LET N=N+1
280 LET A$=A$(3 TO )
290 GOTO 240
300 CLS
302 PRINT "START ADDRESS: ";
310 INPUT W
320 PRINT W
330 PRINT "END ADDRESS: ";
340 INPUT Y
350 PRINT Y
360 FOR M=W TO Y
370 LET P=PEEK M
380 LET Q=INT (P/16)
390 LET NIC=((P/16)-Q)*16
391 PRINT M;" ";CHR$ (Q+28)+CHR$ (NIC+28)
392 NEXT M
393 PRINT
394 PRINT "ANY MORE LISTING? (Y/N)"
395 INPUT Q$
396 IF Q$<>"Y" THEN GOTO 2
397 GOTO 300
400 CLS
410 PRINT "SAVE AS: ";
420 INPUT S$
430 PRINT S$
440 PRINT "START TAPE AND PRESS ENTER"
450 INPUT Q$
460 SAVE S$
470 GOTO 2
500 CLS
501 PRINT "ADDRESS OF ROUTINE: ";
510 INPUT ADR
520 PRINT ADR
525 CLS
530 FOR I=1 TO 20
540 NEXT I
550 CLS
560 RAND USR ADR
570 PRINT AT 20,0;"%T%O% %R%E%T%U%R%N% %T%O% %M%E%N%U% %P%R%E%S%S% %E%N%T%E%R% % % "
580 INPUT Q$
590 GOTO 2
600 CLS
610 PRINT "ADDRESS OF BYTE: ";
620 INPUT BY
630 PRINT BY
632 PRINT "PRESENT VALUE: ";
633 LET P=PEEK BY
634 LET Q=INT (P/16)
635 LET NIC=((P/16)-Q)*16
636 PRINT CHR$ (Q+28)+CHR$ (NIC+28)
640 PRINT "CHANGE TO: ";
650 INPUT C$
660 PRINT C$
670 POKE BY,((CODE C$-28)*16+(CODE C$(2)-28))
673 FOR J=1 TO 15
674 NEXT J
680 PRINT "ANY MORE EDITING? (Y/N)"
690 INPUT Q$
695 IF Q$<>"Y" THEN GOTO 2
696 GOTO 600
700 CLS
710 PRINT "START ADDRESS: ";
720 INPUT ST
730 PRINT ST
740 PRINT "END ADDRESS: ";
750 INPUT EN
760 PRINT EN
770 FOR J=ST TO EN
780 POKE J,0
790 NEXT J
791 GOTO 2
800 DIM D(300)
801 CLS
802 LET TOT=1
805 PRINT "MOVE ""UP"" OR ""DOWN""?"
806 INPUT M$
807 PRINT M$
809 PRINT
810 PRINT "START ADDRESS: ";
811 INPUT BEG
813 PRINT BEG
814 PRINT "END ADDRESS OF CODE: ";
816 INPUT END
817 PRINT END
818 IF END-BEG>299 THEN PRINT "YOU MAY ONLY MOVE 299 BYTES."
819 IF END-BEG>299 THEN GOTO 800
820 PRINT "DISPLACEMENT: ";
821 INPUT DIS
822 PRINT DIS
823 FOR J=BEG TO END
824 LET D(TOT)=PEEK J
825 LET TOT=TOT+1
827 NEXT J
829 IF M$="DOWN" THEN GOTO 860
835 LET TOT=1
836 FOR J=(BEG+DIS) TO (END+DIS)
837 POKE J,D(TOT)
838 LET TOT=TOT+1
839 NEXT J
840 FOR J=BEG TO (BEG+DIS-1)
841 POKE J,0
850 NEXT J
851 GOTO 2
860 LET TOT=1
862 FOR J=(BEG-DIS) TO (END-DIS)
863 POKE J,D(TOT)
864 LET TOT=TOT+1
865 NEXT J
866 FOR J=(END-DIS) TO END
867 POKE J,0
868 NEXT J
870 GOTO 2
900 CLS
910 PRINT "NEW RAMTOP IS: ";
920 INPUT NE
930 PRINT NE
940 POKE 16388,NE-256*INT (NE/256)
950 POKE 16389,INT (NE/256)
960 GOTO 2
1000 CLS
1005 PRINT "THE CODE WILL BE COPIED INTO"
1006 PRINT "MEMORY STARTING AT 16514."
1010 PRINT "START ADDRESS: ";
1020 INPUT ST
1025 PRINT ST
1030 PRINT "END ADDRESS: ";
1035 INPUT EN
1040 PRINT EN
1045 LET SA=16514
1050 FOR J=ST TO EN
1055 POKE SA,PEEK J
1060 LET SA=SA+1
1070 NEXT J
1080 GOTO 2
1100 CLS
1110 PRINT "START ADDRESS OF CODE"
1120 PRINT "THAT IS TO BE COPIED: ";
1130 INPUT ST
1140 PRINT ST
1150 PRINT "END ADDRESS: ";
1160 INPUT EN
1170 PRINT EN
1180 PRINT "ADDRESS TO BE COPIED TO: ";
1190 INPUT C
1191 PRINT C
1193 LET N=0
1194 FOR J=ST TO EN
1195 POKE (N+C),PEEK J
1196 LET N=N+1
1197 NEXT J
1198 GOTO 2
1200 CLS
1202 PRINT "START ADDRESS FOR SEARCH: ";
1203 INPUT A
1204 PRINT A
1205 PRINT "END ADDRESS FOR SEARCH: ";
1206 INPUT E
1207 PRINT E
1208 PRINT "BYTE TO BE SEARCHED FOR: ";
1209 INPUT Q$
1210 PRINT Q$
1211 LET N=((CODE Q$-28)*16+(CODE Q$(2)-28))
1212 FOR J=A TO E
1213 IF PEEK J=N THEN PRINT J
1214 NEXT J
1215 PRINT "%P%R%E%S%S% %E%N%T%E%R% %T%O% %R%E%T%U%R%N% %T%O% %M%E%N%U% % % "
1216 INPUT Q$
1217 GOTO 2
9000 SAVE "1000%3"
9010 RUN
People
No people associated with this content.