Skip to main content

1982 | OriginalPaper | Buchkapitel

Unconditional Jumps and Keyboard Input

verfasst von : Anthony Woods

Erschienen in: Assembly Language Assembled for the Sinclair ZX81

Verlag: Macmillan Education UK

Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.

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.

Metadaten
Titel
Unconditional Jumps and Keyboard Input
verfasst von
Anthony Woods
Copyright-Jahr
1982
Verlag
Macmillan Education UK
DOI
https://doi.org/10.1007/978-1-349-06620-9_5