LMS 2012
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
bytecodes.c File Reference

Go to the source code of this file.

Data Structures

struct  OPCODE
 
struct  SUBCODE
 

Macros

#define MAX_SUBCODES   33
 Max number of sub codes. More...
 
#define OPCODE_NAMESIZE   20
 Opcode and sub code name length. More...
 
#define MAX_LABELS   32
 Max number of labels per program. More...
 
#define OC(OpCode, Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8)
 
#define SC(ParameterFormat, SubCode, Par1, Par2, Par3, Par4, Par5, Par6, Par7, Par8)
 
#define SUBP   0x01
 Next nibble is sub parameter table no. More...
 
#define PARNO   0x02
 Defines no of following parameters. More...
 
#define PARLAB   0x03
 Defines label no. More...
 
#define PARVALUES   0x04
 Last parameter defines number of values to follow. More...
 
#define PAR   0x08
 Plain parameter as below: More...
 
#define PAR8   (PAR + DATA_8)
 DATA8 parameter. More...
 
#define PAR16   (PAR + DATA_16)
 DATA16 parameter. More...
 
#define PAR32   (PAR + DATA_32)
 DATA32 parameter. More...
 
#define PARF   (PAR + DATA_F)
 DATAF parameter. More...
 
#define PARS   (PAR + DATA_S)
 DATAS parameter. More...
 
#define PARV   (PAR + DATA_V)
 Parameter type variable. More...
 
#define FILENAME_SUBP   ARRAY_SUBP
 
#define TST_SUBP   VM_SUBP
 

Enumerations

enum  {
  UI_READ_SUBP = 0, UI_WRITE_SUBP = 1, UI_DRAW_SUBP = 2, UI_BUTTON_SUBP = 3,
  FILE_SUBP = 4, PROGRAM_SUBP = 5, VM_SUBP = 6, STRING_SUBP = 7,
  COM_READ_SUBP = 8, COM_WRITE_SUBP = 9, SOUND_SUBP = 10, INPUT_SUBP = 11,
  ARRAY_SUBP = 12, MATH_SUBP = 13, COM_GET_SUBP = 14, COM_SET_SUBP = 15,
  FILENAME_SUBP = 16, SUBPS
}
 

Macro Definition Documentation

#define FILENAME_SUBP   ARRAY_SUBP

Definition at line 135 of file bytecodes.c.

#define MAX_LABELS   32

Max number of labels per program.

Definition at line 24 of file bytecodes.c.

#define MAX_SUBCODES   33

Max number of sub codes.

Definition at line 22 of file bytecodes.c.

#define OC (   OpCode,
  Par1,
  Par2,
  Par3,
  Par4,
  Par5,
  Par6,
  Par7,
  Par8 
)
Value:
\
[OpCode] = { \
.Pars = ((ULONG)Par1) + \
((ULONG)Par2 << 4) + \
((ULONG)Par3 << 8) + \
((ULONG)Par4 << 12) + \
((ULONG)Par5 << 16) + \
((ULONG)Par6 << 20) + \
((ULONG)Par7 << 24) + \
((ULONG)Par8 << 28), \
.Name = #OpCode, \
}
unsigned int ULONG
Basic Type used to symbolise 32 bit unsigned values.
Definition: lmstypes.h:31

Definition at line 41 of file bytecodes.c.

#define OPCODE_NAMESIZE   20

Opcode and sub code name length.

Definition at line 23 of file bytecodes.c.

#define PAR   0x08

Plain parameter as below:

Definition at line 76 of file bytecodes.c.

#define PAR16   (PAR + DATA_16)

DATA16 parameter.

Definition at line 78 of file bytecodes.c.

#define PAR32   (PAR + DATA_32)

DATA32 parameter.

Definition at line 79 of file bytecodes.c.

#define PAR8   (PAR + DATA_8)

DATA8 parameter.

Definition at line 77 of file bytecodes.c.

#define PARF   (PAR + DATA_F)

DATAF parameter.

Definition at line 80 of file bytecodes.c.

#define PARLAB   0x03

Defines label no.

Definition at line 73 of file bytecodes.c.

#define PARNO   0x02

Defines no of following parameters.

Definition at line 72 of file bytecodes.c.

#define PARS   (PAR + DATA_S)

DATAS parameter.

Definition at line 81 of file bytecodes.c.

#define PARV   (PAR + DATA_V)

Parameter type variable.

Definition at line 82 of file bytecodes.c.

#define PARVALUES   0x04

Last parameter defines number of values to follow.

Definition at line 74 of file bytecodes.c.

#define SC (   ParameterFormat,
  SubCode,
  Par1,
  Par2,
  Par3,
  Par4,
  Par5,
  Par6,
  Par7,
  Par8 
)
Value:
\
[ParameterFormat][SubCode] = { \
.Pars = ((ULONG)Par1) + \
((ULONG)Par2 << 4) + \
((ULONG)Par3 << 8) + \
((ULONG)Par4 << 12) + \
((ULONG)Par5 << 16) + \
((ULONG)Par6 << 20) + \
((ULONG)Par7 << 24) + \
((ULONG)Par8 << 28), \
.Name = #SubCode, \
}
unsigned int ULONG
Basic Type used to symbolise 32 bit unsigned values.
Definition: lmstypes.h:31

Definition at line 56 of file bytecodes.c.

#define SUBP   0x01

Next nibble is sub parameter table no.

Definition at line 71 of file bytecodes.c.

#define TST_SUBP   VM_SUBP

Definition at line 136 of file bytecodes.c.

Enumeration Type Documentation

anonymous enum
Enumerator
UI_READ_SUBP 
UI_WRITE_SUBP 
UI_DRAW_SUBP 
UI_BUTTON_SUBP 
FILE_SUBP 
PROGRAM_SUBP 
VM_SUBP 
STRING_SUBP 
COM_READ_SUBP 
COM_WRITE_SUBP 
SOUND_SUBP 
INPUT_SUBP 
ARRAY_SUBP 
MATH_SUBP 
COM_GET_SUBP 
COM_SET_SUBP 
FILENAME_SUBP 
SUBPS 

Definition at line 111 of file bytecodes.c.