--- title: "Entering and Recalling Text in Machine Code" type: "article" slug: "entering-and-recalling-text-in-machine-code-3" url: "http://localhost/article/entering-and-recalling-text-in-machine-code-3/" markdown_url: "http://localhost/article/entering-and-recalling-text-in-machine-code-3.md" published_at: "2022-10-07T12:28:28+00:00" modified_at: "2026-07-14T23:59:40+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "This subroutine will the user to allow enter up to Characters to 277 into machine code and recover them at will. The routine consists of four parts. The first part is the machine code loader program. 10 FOR x=55501 TO 55533 20 READ z: POKE x,z 30 NEXT x 40 DATA 62,0,205,48,18,225,70, 35,229,33,183,215,126,35,254,128, 56,250,16,248,126,35,254,128,200, 215,24,248,201,205,205,216,1,201…" category: - name: "The Plotter" slug: "the-plotter" taxonomy: "category" url: "http://localhost/category/periodicals/the-plotter/" post_tag: - name: "Best of Timex/Sinclair 2068 Articles and Documents" slug: "ts2068best" taxonomy: "post_tag" url: "http://localhost/tag/ts2068best/" - name: "Machine language programming" slug: "machine-language" taxonomy: "post_tag" url: "http://localhost/tag/machine-language/" - name: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" - name: "Type-in program" slug: "type-in-program" taxonomy: "post_tag" url: "http://localhost/tag/type-in-program/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Dennis Jurries" slug: "dennis-jurries" taxonomy: "indiv" url: "http://localhost/indiv/dennis-jurries/" publication_r: id: 21216 title: "The Plotter" type: "periodical" url: "http://localhost/periodical/the-plotter/" authors: "Dennis Jurries" authors_r: - name: "Dennis Jurries" slug: "dennis-jurries" taxonomy: "indiv" url: "http://localhost/indiv/dennis-jurries/" volume: "3" issue: "3" issues_articles: - id: 39424 title: "The Plotter v3 n3" type: "issue" url: "http://localhost/issue/the-plotter-v3-n3/" pages: "5" archive_link: false --- # Entering and Recalling Text in Machine Code This subroutine will the user to allow enter up to Characters to 277 into machine code and recover them at will. The routine consists of four parts. The first part is the machine code loader program. ``` 10 FOR x=55501 TO 55533 20 READ z: POKE x,z 30 NEXT x 40 DATA 62,0,205,48,18,225,70, 35,229,33,183,215,126,35,254,128, 56,250,16,248,126,35,254,128,200, 215,24,248,201,205,205,216,1,201 ``` RUN the above program then DELETE it. The second part consists of six lines that allow the text you input into machine code to be recovered. ``` 10 FOR x=1 TO z 20 POKE 55533,x 30 RANDOMIZE USR 55530 40 PAUSE 0 50 NEXT x 60 STOP ``` The third part of the routine allows the user to put text into machine code. Once the user puts the text in and tests it then this part may be deleted. ``` 100 LET z=1: LET j=55224: LET a$="" 110 PRINT "Input text (limit 32 characters if you want to print text on the 24th line only). Press enter when finished with text." 120 PRINT 130 GO SUB 300 140 INPUT a$ 150 IF LEN a$>=55500-j THEN PRINT AT 0,0;"Text too long. Input text.": CLS : LET j=j-LEN a$: LET z=z-1: GO TO 110 160 FOR i=1 TO LEN a$ 170 POKE j,CODE a$(i) 180 IF j<55500 and i=LEN a$ THEN POKE j+,128 190 IF j<55500 and i=LEN a$ THEN LET j=j+1 200 IF k<55500 THEN LET j=j+1 210 NEXT i 220 LET z=z+1 230 GO SUB 400 240 LET z=z-1 250 STOP 300 PRINT "TEXT #";z;'" ";277-LEN a$;" characters remaining." 310 RETURN 400 PRINT 410 PRINT "More text? (y/n)" 420 PAUSE 0 430 IF INKEY$="y" or INKEY$="Y" THEN CLS : GO TO 110 440 RETURN ``` The above is set up to print on the 24th line. Several different messages can be run if you as a line, 45 CLS. If you wish to print text from the top of the page then POKE 55502,2. To change back to the 24th line POKE 55502,0. The following is the OP CODE for the machine code routine entered in part one above. This is the forth part of the subroutine. ``` 55501 LD A,0 55503 CALL 4656 55506 POP HL 55507 LD B,(HL) 55508 INC HL 55509 PUSH HL 55510 LD HL,55223 55513 LD A,(HL) 55514 INC HL 55515 CP 128 55517 JR C,55513 55519 DJNZ B,55513 55521 LD A,(HL) 55522 INC HL 55523 CP 128 55525 RET Z 55526 RST 16 55527 JR 55521 55529 RET 55530 CALL 55501 55533 01 55534 RET ```