1982 | OriginalPaper | Chapter
Unconditional Jumps and Keyboard Input
Author : Anthony Woods
Published in: Assembly Language Assembled for the Sinclair ZX81
Publisher: Macmillan Education UK
Included in: Professional Book Archive
Activate our intelligent search to find suitable subject content or patents.
Select sections of text to find matching patents with Artificial Intelligence. powered by
Select sections of text to find additional relevant content using AI-assisted search. powered by
You have so far only seen programs which carry out their instructions in the sequence in which they are written. However, as you know from your BASIC programs, it is usual to include in programs some instructions which allow the sequence to be changed. This is done by jumping from the present instruction in the program to some other instruction. There are two types of jump instructions — unconditional and conditional. This chapter will only look at unconditional jumps. An unconditional jump has the form <math display='block'> <mrow> <mi>J</mi><mi>P</mi><mtext> </mtext><mtext> </mtext><mi>n</mi><mi>n</mi> </mrow> </math> $$JP\;\,nn$$ where nn is the address of a memory byte. The instruction causes the computer to take the instruction at address nn as the next instruction. Because it can be quite difficult to calculate the address for the required jump, the address to be jumped to is usually specified to the assembler program by means of a label, as shown in figure 5.1.