Line 1 contains machine code that is called by the USR function later in the program.
Note that in these programs, you MUST type in line 1 and line 2 exactly as shown below:-
In line 1, after the REM, type the following on the keyboard using the “one entry keyword” method, so ‘<=’ (on key R), ‘3’ then enter a space, then the graphic character on key Y, then a space and then the ‘TAN’ keyword (key E).
Both the ‘<=’ and the ‘TAN’ are entered using the single key entry system, NOT as separate symbols and letters.
Then list line 1 before proceeding. It should look like the program listing except you will have a space instead of a question mark.
Now enter line 2. Then RUN the program. If you now list the program, lines 1 & 2 should look exactly the same as the listings of my screenshots.
You can then enter the rest of the program.
The machine code is
Code: Select all
IN A,(1F) DB 1F
LD C,A 4F
LD B,0 06 00
RET C9
I should also say the the second program can only handle one joystick action at a time, so if you press fire and then move the joystick, the program will ignore the movement of the joystick.
Mark