Global Macros (StdLib.interface)

List of globally available macros that can be used in external libraries or inline assembler or need. The entries in the list refer to the folder structure in the library (see picture). The possibly expected parameters or registers used please refer to the description or the code within the respective entry.

Macros / Delay /

  • _DELAY_CLK - Waiting Number Cycles (cycles)
  • _DELEY_US - Waiting number of microseconds


  • Extend(Group,SourceType,DestinationType) - Universal Conversion (Casting) of numeric values in a tab group.


  • PopPC, PushPC - Return address to / from Stack (Automatic 2 or 3 byte program counter).
  • PopLA, PushLA - register group LA (_LA3::_LA0) from/to Stack (4 Byte).
  • PopLA1, PushLA1 - register group LA-Low (_LA1::_LA0) from/to Stack (2 Byte).
  • PopLA2, PushLA2 - register group LA-High (_LA3::_LA2) from/to Stack (2 Byte).
  • PopLB, PushLB - register group LB (_LB3::_LB0) from/to Stack (4 Byte).
  • PopLB1, PushLB1 - register group LB-Low (_LB1::_LB0) from/to Stack (2 Byte).
  • PopLB2, PushLB2 - register group LB-High (_LB3::_LB2) from/to Stack (2 Byte).
  • PopA, PushA - register group A (_HA3::_HA0) from/to Stack (4 Byte).
  • PopA1, PushA1 - register group A-Low (_HA1::_HA0) from/to Stack (2 Byte).
  • PopA2, PushA2 - register group A-High (_HA3::_HA2) from/to Stack (2 Byte).
  • PopA24, PushA24 - register group A 24-Bit (_HA2::_HA0) from/to Stack (3 Byte).
  • PopB, PushB - register group B (_HB3::_HB0) from/to Stack (4 Byte).
  • PopB1, PushB1 - register group B-Low (_HB1::_HB0) from/to Stack (2 Byte).
  • PopB2, PushB2 - register group B-High (_HB3::_HB2) from/to Stack (2 Byte).
  • PopB24, PushB24 - register group B 24-Bit (_HB2::_HB0) from/to Stack (3 Byte).
  • PopA2Z, PushA2Z - Register (ZH::_HA0) from/to Stack (16 Byte).
  • PopAll, PushAll - All Register from/to Stack (34 Byte, with loop, short Version).
  • PopAllFast, PushAllFast - Register (ZH::_HA0) from/to Stack (34 Byte, direct - fast).
  • PopW, PushW - Pointer-Register W (WH:WL) from/to Stack (2 Byte).
  • PopX, PushX - Pointer-Register X (XH:XL) from/to Stack (2 Byte).
  • PopY, PushY - Pointer-Register Y (YH:YL) from/to Stack (2 Byte).
  • PopZ, PushZ - Pointer-Register Z (ZH:ZL) from/to Stack (2 Byte).


  • SetTypeReg_SramTemp - Object type in Register _HA2 set for SRAM/STMP (return values).
  • SetTypeReg_Flash - Object type in Register _HA2 set for FLASH (return values).
  • SetTypeReg_Eeprom - Object type in Register _HA2 set for EEPROM (return values).


  • SregSave, SregRestore - Status Register on Stack Backup/Restore, global Interrupts disable/restore.
  • SregSaveRS, SregRestoreRS - Status Register on Stack Backup/Restore (Indication of the register), global Interrupts disable/restore.


  • xIn, xOut - Automatic use of in/out for Port register access.
  • xCbi, xSbi - Automatic use of cbi/sbi for Port register access.
  • gCbi, gSbi - Automatic use of cbi/sbi for Port register access (Replacement modifies Register WL).
  • xSbic, xSbis - Automatic use of sbic/sbis (Replacement modifies Register _TMPD).
  • gSbic, gSbis - Automatic use of sbic/sbis (Replacement modifies Register WL).