Difference between revisions of "User:CoBB"

From WikiTI
Jump to: navigation, search
(Z80 instruction set)
Line 8: Line 8:
 
|-
 
|-
 
| call A || <tt>11001101 Al Ah</tt> || 17 || - || - || - || - || - || - || - || - || sp -= 2, (sp) := pc, pc := A
 
| call A || <tt>11001101 Al Ah</tt> || 17 || - || - || - || - || - || - || - || - || sp -= 2, (sp) := pc, pc := A
 +
|-
 +
| ccf || <tt>00111111</tt> || 4 || - || - || v || X || v || - || 0 || X || hf := cf, cf := !cf
 
|-
 
|-
 
| ld R1,R2 || <tt>01xxxyyy</tt> || 4 || - || - || - || - || - || - || - || - || R1 := R2
 
| ld R1,R2 || <tt>01xxxyyy</tt> || 4 || - || - || - || - || - || - || - || - || R1 := R2
Line 30: Line 32:
 
| R || 8-bit general purpose register: a, b, c, d, e, h, l || 111, 000, 001, 010, 011, 100, 101
 
| R || 8-bit general purpose register: a, b, c, d, e, h, l || 111, 000, 001, 010, 011, 100, 101
 
|}
 
|}
 +
 +
=== Flags ===
 +
* - = no change
 +
* 0 = always reset
 +
* 1 = always set
 +
* X = change, described under Effect
 +
* v = OR with the respective bit of the accumulator

Revision as of 03:32, 25 February 2006

About this page

Ez az én kis játszóterem.

Z80 instruction set

Reference

Instruction Opcode Time S Z X H Y P N C Effect
call A 11001101 Al Ah 17 - - - - - - - - sp -= 2, (sp) := pc, pc := A
ccf 00111111 4 - - v X v - 0 X hf := cf, cf := !cf
ld R1,R2 01xxxyyy 4 - - - - - - - - R1 := R2
pop P 11xx0001 10 - - - - - - - - P := (sp), sp += 2
push P 11xx0101 11 - - - - - - - - sp -= 2, (sp) := P
ret 11001001 10 - - - - - - - - pc := (sp), sp += 2

Legend

Notation Meaning Respective opcode bits
A 16-bit address Al - low byte, Ah - high byte
P 16-bit register pair: bc, de, hl, af 00, 01, 10, 11
Q 16-bit register: bc, de, hl, sp 00, 01, 10, 11
R 8-bit general purpose register: a, b, c, d, e, h, l 111, 000, 001, 010, 011, 100, 101

Flags

  • - = no change
  • 0 = always reset
  • 1 = always set
  • X = change, described under Effect
  • v = OR with the respective bit of the accumulator