This is the Machine Code program I used to discuss turning a Call PQ Routine (a GOSUB with a RETURN) into a GOTO PQ with the RETURN address:
Q + 1 + 256 P in HL as follows:
First, set up the following Basic program, RUN it and then LOAD all the decimal values found at the end of this article when prompted for each INPUT N at its proper address:
NOTE: If you made an error then iput a number larger than 255 and start over.
1 REM ...25 characters minimum...
10 FOR I = 16514 TO 16538
20 PRINT I;" ";
30 INPUT N
40 PRINT N
50 POKE I,N
60 NEXT I
70 CLS
80 PRINT AT 5,0;"inverse space"
90 RAND USR 16523
100 POKE 16528,118
110 POKE 16532,118
120 PRINT AT 10,0;"inverse space"
130 RAND USR 16523
140 STOP
ADDRESS OPERATION HEX DEC ------- --------- --- --- 16514 POP HL E1 225 16515 LET A=PEEK HL 7E 126 16516 CP 128 WITH A FE80 254,128 16518 RETURN IF ZERO C8 200 16519 RST 10 (PRINT) D7 215 16520 INC HL 23 35 16521 GOTO (-8) 18F8 24,248 16523 CALL 16514 CDPQ 205,130,64 16526 K 48 16527 . 27 16528 0 16529 V 59 16530 A 38 16531 N 51 16532 0 16533 V 59 16534 L 49 16535 I 46 16536 E 42 16537 T 57 16538 inverse space 128
Media
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.