Skip to main content
Top

1982 | OriginalPaper | Chapter

Unconditional Jumps and Keyboard Input

Author : Anthony Woods

Published in: Assembly Language Assembled for the Sinclair ZX81

Publisher: Macmillan Education UK

Activate our intelligent search to find suitable subject content or patents.

search-config
loading …

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>&#x2009;</mtext><mtext>&#x2009;</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.

Metadata
Title
Unconditional Jumps and Keyboard Input
Author
Anthony Woods
Copyright Year
1982
Publisher
Macmillan Education UK
DOI
https://doi.org/10.1007/978-1-349-06620-9_5

Premium Partner