byte1()..byte4()

PräprozessorAusschließlich eine Funktion des Preprocessor

Gibt die einzelnen Bytes der niederwertigsten Stelle bis zur höherwertigsten Stelle vom 32-Bit-Wert einer Konstante oder eines Symbols zurück. Syntax:

  • byteWert = byte1( value ) - niederwertiges Byte aus niederwertigem Word
  • byteWert = byte2( value ) - höherwertiges Byte aus niederwertigem Word
  • byteWert = byte3( value ) - niederwertiges Byte aus höherwertigem Word
  • byteWert = byte4( value ) - höherwertiges Byte aus höherwertigem Word

Siehe auch: Direktiven, luna-pp Beispiel:

asm
  '32-Bit-Wert laden
  '
  ' Speicher ->
  ' 4e 61 bc 00
  '  :  :  :  :
  '  :  :  :  +-byte4()
  '  :  :  +-byte3()
  '  :  +-byte2()
  '  +-byte1()
  '
  ldi _HA0,byte1(12345678)
  ldi _HA1,byte2(12345678)
  ldi _HA2,byte3(12345678)
  ldi _HA3,byte4(12345678)
endasm