eForth1  v2.4
copy

Macros

#define CELLCPY(n)
 
#define MEMCPY(len, seq)
 
#define OPSTR(ip, seq)
 

Detailed Description

Macro Definition Documentation

◆ CELLCPY

#define CELLCPY (   n)
Value:
{ \
va_list argList; \
va_start(argList, n); \
int lit=0; \
for (; n; n--) { \
IU j = (IU)va_arg(argList, int); \
if (lit) { \
STORE(j); \
lit = 0; \
DEBUG(" %04x", j); \
continue; \
} \
if (j < 0x80) { \
lit = (j==opDOLIT); \
if (j != opNOP) { \
BSET(PC++, j); \
DEBUG(" %02x", j); \
} \
} \
else { \
STORE(j | fCOLON); \
DEBUG(" %04x", j); \
} \
} \
va_end(argList); \
_rdump(); \
}

◆ MEMCPY

#define MEMCPY (   len,
  seq 
)
Value:
{ \
memcpy(&_byte[PC], seq, len); \
PC += len; \
}

◆ OPSTR

#define OPSTR (   ip,
  seq 
)
Value:
{ \
SET(PC, ip | fCOLON); \
PC += CELLSZ; \
int len = strlen(seq); \
BSET(PC++, len); \
MEMCPY(len, seq); \
}
opNOP
@ opNOP
opcodes start at 0
Definition: eforth_asm.h:30
fCOLON
#define fCOLON
Definition: eforth_config.h:75
CELLSZ
#define CELLSZ
Definition: eforth_config.h:36
IU
U16 IU
instruction/address unit (16-bit)
Definition: eforth_config.h:28
PC
IU PC
assembler program counter
Definition: eforth_asm.c:14
_byte
U8 * _byte
assembler byte array (heap)
Definition: eforth_asm.c:16