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
Products
Media
Image Gallery
Source Code
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.