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
Enthalten in: Professional Book Archive
Aktivieren Sie unsere intelligente Suche, um passende Fachinhalte oder Patente zu finden.
Wählen Sie Textabschnitte aus um mit Künstlicher Intelligenz passenden Patente zu finden. powered by
Markieren Sie Textabschnitte, um KI-gestützt weitere passende Inhalte zu finden. 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.