z80:Glossary

From Learn @ Cemetech
Jump to: navigation, search

For all the words that you don't know the meaning to (and some that you do), here's a place for you to look them up.

Accumulator

The A register, it is the most commonly used register. It is also the only register that can be used in many mathematical operations.

ASCII

The American Standard Code for Information Interchange. It is a standard for character interpretation that has been widely accepted. It uses 1 byte (8 bits) to hold a character, and thus is limited to 256 different characters. Because that is not sufficient today, more and more programmers are switching to Unicode.

Binary

Base two numbering system. Has the digits 0 and 1.

Bit

A binary digit. It is the smallest most basic form of data that you can manipulate on any electronic device. The value of a bit can either be 0 or 1

Byte

8 bits. It is the most common form of data that is used. It can hold values from %00000000-%11111111, or 0-255. Can be signed or unsigned.

Decimal

Base ten numbering system. Has the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Decimal is also the counting system that we use in everyday life.

Directive

Directives A command that tells the compiler to do something. This instruction is not included into the program, but it's effects may, and usually are in the program. An example is the .org directive, which itself is not included into the program, but does change the address value of labels (a very good thing) in the program.

Entry-Point

A pre-defined point in the RAM that can be access to perform a function. These are usually the start of ROM calls, but can also be the start of custom-functions that can be called from assembly programs.

Flag

System Flags A flag is any bit that is holds a special purpose. It can either be raised (set), or not raised (reset). There uses are many and varied. There are 2 general flags: the F register and System Flags.

Hexadecimal

Base 16 numbering system. Has the digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F.

Instruction

Opcodes A command that is included into the program. It is recognized by it's hex opcode, which when interpreted as a command, does something. An example of an instruction set is the LD instruction.

Macro

Macros Lines of code that on compile are replaced with other lines of code. A notable example is BCALL.

One's Compliment

Change all the values of the byte to the opposite value (1's to 0's and vice-versa).

Opcode

Opcode Reference Chart Short for "operation code. Is a single instruction that can be executed by the CPU. Usually refers to the hex code equivalents to the assembly mnemonics, for example "add a, c" would be 81h.

Overflow

If a value is too big to fit into the designated space. Ex. trying to fit %111111111 (511) into a byte (maximum capacity: %11111111, or 255) would result in an overflow.

Parity

Whether the number of 1's in the accumulator is even or odd. Is set when the number is even, and reset when the number is odd.

ROM Calls

ROM Calls are functions pre-programmed into the calculator for its use, as well as the programmer's use. To use a ROM call, use the BCALL macro.

Signed Byte

A byte that can be positive or negative. When a byte is signed, the farthest left bit represents either positive or negative (0 is positive and 1 is negative). Note that the calculator does not distinguish between signed or unsigned values. Also note that since the farthest left bit is used to hold the sign, the range for signed integers in a byte is %11111111-%01111111, or -128 to 127. Note that for negative numbers, %10000000 represents a -128, not a -0, and %10000001 represents a -127, not a -1. The negative numbers are counted smallest to largest, so don't forget that -128 is really smaller than -127!

Two's Compliment

Performs one's compliment and then adds one to the number. Note that by doing so, for signed integers, it changes the number to the negative form of that number. Note that you can't do this for the %10000000 (-128), which becomes %10000000 (-128). The reason this happens is because of a -(-128), which should be a positive 128, but is unrepresentable within a byte.

Unicode

A 16-bit version of ASCII. Although it currently follows no international standard (more of an international guideline), it is more common today because of the demands by the global community. The Unicode can hold 65536 different characters, and was designed as a standard that could hold every language's character set plus a little more.

Unsigned Byte

A byte which can not hold negative numbers. Can hold values %00000000-%11111111, or 0-255. Note that the calculator can not distinguish between signed or unsigned values.

Word

16 bits. Can hold values between %0000000000000000-%1111111111111111 , or 0-65535. Although theoretically you could create unsigned and signed word (again, not distinguished by calculator), usually if you need a negative number this large you would use a floating point instead of a word. For the most part, words are used as addresses.