Added SetEASegment and SetEAAddressSize (not yet implemented).

svn path=/trunk/yasm/; revision=36
0.3
Peter Johnson 24 years ago
parent 7f9f858b98
commit 8d656576e2
  1. 5
      include/bytecode.h
  2. 19
      libyasm/bytecode.c
  3. 5
      libyasm/bytecode.h
  4. 19
      src/bytecode.c
  5. 5
      src/bytecode.h

@ -1,4 +1,4 @@
/* $Id: bytecode.h,v 1.4 2001/05/21 20:17:51 peter Exp $
/* $Id: bytecode.h,v 1.5 2001/05/22 20:46:13 peter Exp $
* Bytecode utility functions header file
*
* Copyright (C) 2001 Peter Johnson
@ -82,6 +82,9 @@ effaddr *ConvertImmToEA(effaddr *ptr, immval *im_ptr, unsigned char im_len);
immval *ConvertIntToImm(immval *ptr, unsigned long int_val);
void SetEASegment(effaddr *ptr, unsigned char segment);
void SetEAAddressSize(effaddr *ptr, unsigned char addrsize, unsigned char len);
void BuildBC_Insn(bytecode *bc,
unsigned char opersize,
unsigned char opcode_len,

@ -1,4 +1,4 @@
/* $Id: bytecode.c,v 1.5 2001/05/21 21:04:54 peter Exp $
/* $Id: bytecode.c,v 1.6 2001/05/22 20:46:13 peter Exp $
* Bytecode utility functions
*
* Copyright (C) 2001 Peter Johnson
@ -110,6 +110,23 @@ immval *ConvertIntToImm(immval *ptr, unsigned long int_val)
return ptr;
}
void SetEASegment(effaddr *ptr, unsigned char segment)
{
if(!ptr)
return;
if(ptr->segment != 0) {
Error(ERR_INVALID_EA, (char *)NULL);
return;
}
ptr->segment = segment;
}
void SetEAAddressSize(effaddr *ptr, unsigned char addrsize, unsigned char len)
{
}
void BuildBC_Insn(bytecode *bc,
unsigned char opersize,
unsigned char opcode_len,

@ -1,4 +1,4 @@
/* $Id: bytecode.h,v 1.4 2001/05/21 20:17:51 peter Exp $
/* $Id: bytecode.h,v 1.5 2001/05/22 20:46:13 peter Exp $
* Bytecode utility functions header file
*
* Copyright (C) 2001 Peter Johnson
@ -82,6 +82,9 @@ effaddr *ConvertImmToEA(effaddr *ptr, immval *im_ptr, unsigned char im_len);
immval *ConvertIntToImm(immval *ptr, unsigned long int_val);
void SetEASegment(effaddr *ptr, unsigned char segment);
void SetEAAddressSize(effaddr *ptr, unsigned char addrsize, unsigned char len);
void BuildBC_Insn(bytecode *bc,
unsigned char opersize,
unsigned char opcode_len,

@ -1,4 +1,4 @@
/* $Id: bytecode.c,v 1.5 2001/05/21 21:04:54 peter Exp $
/* $Id: bytecode.c,v 1.6 2001/05/22 20:46:13 peter Exp $
* Bytecode utility functions
*
* Copyright (C) 2001 Peter Johnson
@ -110,6 +110,23 @@ immval *ConvertIntToImm(immval *ptr, unsigned long int_val)
return ptr;
}
void SetEASegment(effaddr *ptr, unsigned char segment)
{
if(!ptr)
return;
if(ptr->segment != 0) {
Error(ERR_INVALID_EA, (char *)NULL);
return;
}
ptr->segment = segment;
}
void SetEAAddressSize(effaddr *ptr, unsigned char addrsize, unsigned char len)
{
}
void BuildBC_Insn(bytecode *bc,
unsigned char opersize,
unsigned char opcode_len,

@ -1,4 +1,4 @@
/* $Id: bytecode.h,v 1.4 2001/05/21 20:17:51 peter Exp $
/* $Id: bytecode.h,v 1.5 2001/05/22 20:46:13 peter Exp $
* Bytecode utility functions header file
*
* Copyright (C) 2001 Peter Johnson
@ -82,6 +82,9 @@ effaddr *ConvertImmToEA(effaddr *ptr, immval *im_ptr, unsigned char im_len);
immval *ConvertIntToImm(immval *ptr, unsigned long int_val);
void SetEASegment(effaddr *ptr, unsigned char segment);
void SetEAAddressSize(effaddr *ptr, unsigned char addrsize, unsigned char len);
void BuildBC_Insn(bytecode *bc,
unsigned char opersize,
unsigned char opcode_len,

Loading…
Cancel
Save