/* This subroutine takes care of the ORG psuedo operation code.
 *
 * $Log: org.c,v $
 * Revision 1.2  1997/06/04 01:14:57  david
 * ANSI-fied the program.
 *
 */

#include <stdio.h>
#include "xasm.h"

static char *RcsId = "$Id: org.c,v 1.2 1997/06/04 01:14:57 david Exp $";

void org( char *label, char *opcode, char *operand, char *lptr )
{
char *objcode, *proper(), *Error = "org: No Operand.";

labproc( label );
	
if ( operand == NULL || *operand == '\0' )
   {
   xerror( Error );
   return;
   }
   
if ( !(objcode = proper( label, opcode, operand, NULL ) ) )
   {
   xerror( "org: No Operand Code." );
   return;
   }
   
loc = atoh( objcode );
printl( (long) loc, NULL, 0, lptr );
}
