Jump to content

Glossary: Difference between revisions

m
Added <code> tags for label names in the disassembly.
m (Text replacement - "~" to "–")
m (Added <code> tags for label names in the disassembly.)
 
(2 intermediate revisions by one other user not shown)
Line 41:
 
;{{Anchor|Jump table}}'''Jump table'''
:A table of addresses pointing to assembly code (typically entry points of functions). A relatively well-known example of a jump table is <code>[https://github.com/pret/pokered/blob/725b86ebbec23bd1f53fd60bf0201c904fee951d/engine/items/items.asm#L18 ItemUsePtrTable]</code> in Generation I. An invalid index into a jump table will usually cause glitches, possibly [[arbitrary code execution]] exploits.
<!--
;{{Anchor|Machine code}}'''Machine code'''
Line 61:
;{{Anchor|Party count}}'''Party count'''
:The value of the [[#Count byte|count byte]] for a party Pokémon list. Normally, it is just the number of Pokémon in the party.
 
;{{Anchor|Pointer}}'''Pointer'''
:A pointer is a term used in programming used to describe a value that contains the address of data or code. It is often space-efficient to store pointers in a table where the pointer is fetched from the table before using it to jump to the relevant code as opposed to programming a series of branches that each then jump to their own subroutines.
:Early Pokemon games use pointer tables to reference the location of things such as Pokemon graphics (which cause the game to read data from the address pointed to instead of execute code there), move and item effects, and text.
 
;{{Anchor|Species byte 1}}'''Species byte 1'''
Line 78 ⟶ 82:
 
;{{Anchor|Stack pointer}}'''Stack pointer'''
:A special-purpose register that points to the topmost entry of the [[#Stack|stack]]. In the GB CPU, the stack pointer is named <code>sp</code>, and it is decreased by 2 (since the stack entries are 2-byte numbers) for each <code>push</code> or <code>call</code>, and increased by 2 for each <code>pop</code> or <code>ret</code>.
 
;{{Anchor|Terminator}}'''Terminator'''
Cookies help us deliver our services. By using our services, you agree to our use of cookies.