Jump to content

Glossary: Difference between revisions

Added overflow and underflow.
>Bbbbbbbbba
(Bit the bullet and added the anchors. The case sensitivity is a slight pain...)
>Bbbbbbbbba
(Added overflow and underflow.)
Line 14:
:A technique for writing a number in hexadecimal where, unlike in the regular conversion from decimal to hexadecimal (for example, dec[58] = hex[3A]), the decimal digits are written as-is in hexadecimal, two per byte (for example, dec[58] = hex[58]).
:In Pokémon games, BCD is often used for quantities of money and casino coins; it is also fairly commonly used in clock chips, such as the ones used in generation II and III games with said feature.
 
;{{Anchor|Buffer overflow}}'''[[Buffer overflow]]'''
:To write more data into a buffer than its size allows. The data will end up being written into adjacent memory areas, causing memory corruption.
 
;{{Anchor|Count byte}}'''Count byte'''
Line 32 ⟶ 35:
:That data may however happen to form valid and meaningful machine code, as seen
-->
;{{Anchor|Overflow}}'''Overflow'''
:1. For a value to exceed the range of its data type. For example, the range for an unsigned [[byte]] is 0~255, so trying to calculate 100+200 would result in an overflow. If the condition is not checked, then the value would usually be "wrapped around" to an in-range value: The above example would give 300-256 = 44. Depending on the exact definition, may or may not include [[#Underflow|underflow]].
:2. See [[#Buffer overflow|buffer overflow]].
 
;{{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.
Line 37 ⟶ 44:
;{{Anchor|Terminator}}'''Terminator'''
:A value that signifies the end of a list or a string. To avoid ambiguity, it must be an otherwise invalid value for that list or string. Common values for terminators are 0x00 or 0xFF. Notably, in Generation I and II, the control character 0x50 usually acts as the terminator, although there are other control characters that also terminate the string (in addition to their other functions).
 
;{{Anchor|Underflow}}'''Underflow'''
:For a value to be lower than the minimum representable value in its data type. For example, the range for an unsigned [[byte]] is 0~255, so trying to calculate 0-1 would result in an underflow. If the condition is not checked, then the value would usually be "wrapped around" to an in-range value: The above example would give (-1)+256 = 255. May or may not be considered a type of [[#Overflow|overflow]] depending on the exact definition of the latter.
:A notable example of underflow in Pokémon games is [[item underflow]], which refers to underflowing the item count to 255, allowing the player to access an [[expanded item pack]].
 
;{{Anchor|W^X}}'''W^X''' (Write Xor eXecute)
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.