--- title: "ML Copier" id: 77455 type: "computer_media" slug: "ml-copier" url: "http://localhost/computer_media/ml-copier/" markdown_url: "http://localhost/computer_media/ml-copier.md" published_at: "2026-11-15T18:38:23+00:00" modified_at: "2026-11-15T18:38:23+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/ml-copier-1.png" excerpt: "Copy machine code into a string, then POKE it back at any new address." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "LKDOS" slug: "lkdos" taxonomy: "post_tag" url: "http://localhost/tag/lkdos/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" - name: "ZX81" slug: "zx81" taxonomy: "post_tag" url: "http://localhost/tag/zx81/" model: - name: "Sinclair ZX81" slug: "zx81" taxonomy: "model" url: "http://localhost/model/zx81/" - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" genre: - name: "Machine Language" slug: "machine-language" taxonomy: "genre" url: "http://localhost/type/machine-language/" media_type: "Program" download_url: "https://archive.org/download/timex-sinclair-software-archive/ML%20Copier%20%281988%29%28-%29%28TS1000%29%28Program%29.zip" mediadate: "1988" images: - url: "http://localhost/wp-content/uploads/2026/11/ml-copier-1.png" - url: "http://localhost/wp-content/uploads/2026/11/ml-copier-2.png" - url: "http://localhost/wp-content/uploads/2026/11/ml-copier-3.png" article_media: - id: 42159 title: "ZX81 EPROM Board" type: "article" url: "http://localhost/article/zx81-eprom-board-2/" media_type_tags: "Machine Language" license: false --- # ML Copier Moves machine code from one place in memory to another. GOTO 20 asks for the first and last addresses of the code, copies the bytes into a string (printing each one), and stops; GOTO 130 then asks for the new address and POKEs the bytes there. Because the code is held in E$, you can SAVE the program between the two steps and move the code later. Lines 10-16 print the instructions: delete lines 105 and 175 to stop the bytes being printed and speed it up (lines 205 and 275 keep copies to put back). Line 300 (RAND USR 14336) is the Larken ZX81 disk save and needs the Larken ROM; GOTO 310 for a tape save only reaches a REM and restarts the program, so SAVE it yourself. No author is printed; this is Listing 3 (MLCOPY.B1) of the EPROM board article. Published in Sinc-Link May-June 1988 ([ZX81 EPROM Board](https://timexsinclair.com/article/zx81-eprom-board-2/)). ## Source Code ``` 10 PRINT "TO PRINT ML BEING COPIED/POKED." 11 PRINT "ENTER C:TO SPEEDUP.DELETE 105," 12 PRINT "175.SEE PROGARM END TO REPLACE" 13 PRINT "AFTER ML IS COPIED.USE GOTO 130" 14 PRINT "TO PLACE ML WHERE DESIRED.IF THE" 15 PRINT "DELETIONS WERE MADE.USE GOTO20" 16 STOP 20 PRINT "INPUT FIRST ML ADDRESS TO COPY" 30 INPUT A 35 PRINT A 36 PRINT 40 PRINT "INPUT LAST ML ADDRESS TO COPY" 50 INPUT B 55 PRINT B 56 PRINT 60 LET C=(B-A)+1 65 DIM E$(C) 70 PRINT "BYTES TO BE COPIED=";C 72 PAUSE 100 75 CLS 76 FAST 80 LET A=A-1 90 FOR N=1 TO C 100 LET E$(N)=CHR$ PEEK (A+N) 105 PRINT CODE E$(N);" "; 110 NEXT N 112 PRINT 113 PRINT 114 SLOW 115 PRINT "TRANSFER TO STRING COMPLETE" 116 PRINT "GOTO 310 TO TAPE SAVE:GOTO 300" 117 PRINT "FOR DISK:GOTO 130 TO MOVE ML" 120 STOP 125 PRINT 130 PRINT "FIRST ML ADDRESS OF DESTINATION" 131 PRINT "IT IS NOW= ";A+1 140 INPUT A 145 CLS 146 FAST 150 LET A=A-1 160 FOR N=1 TO C 170 POKE (A+N),CODE E$(N) 175 PRINT PEEK (A+N);" "; 180 NEXT N 184 PRINT 185 PRINT 186 PRINT "ML MOVED TO DESIRED LOCATION" 187 SLOW 190 STOP 200 REM "LINES 105,175 ARE BELOW SO THAT" 201 PRINT "THEY MAY BE RE-ENTERED IF WISHED" 205 PRINT CODE E$(N);" "; 275 PRINT PEEK (A+N);" "; 300 RAND USR 14336 310 REM SAVE"MLCOPY.B1" 320 GOTO 1 ```