assemblycpumachine-codez80signedness

Are bytes/words/addresses signed or unsigned in Z80 assembler/machine code?


I am making an emulator for Z80 binaries but I cannot find out whether all the integer data types are signed or unsigned from the manual or from google. So are the numbers from registers A,B...HL,BC etc signed or not?

Also, in machine code are the bytes/words/addresses which come after the instructions as arguments signed or unsigned?

Like in these examples (from 8080/Z80 Instruction Set):

8080 Mnemonic    Z80 Mnemonic    Machine Code    Operation
-------------    ------------    ------------    ---------
MVI A,byte       LD  A,byte      3Ebyte          A <- byte
LXI B,word       LD  BC,word     01word          BC <- word
JMP address      JP  address     C3address       PC <- address

Thanks in advance.


Solution

    1. The registers can contain either, and most operands calculate both answers at the same time because of Two's complement. Some instructions do however need information whether the containing value is signed or unsigned. They exist in two forms, one for signed and one for unsigned. Can't remember whether Z80 has any of these.

    2. See (1.) Absolute addresses are unsigned and relative addresses (branches) are signed, to be able to jump backwards.