prolog ==> .
-jump ==> "jmp $1".
+jump ==> "bra $1".
locals ==> "link a6, #-$1".
process_operand( str, op)
-char *str;
-struct t_operand *op;
+register char *str;
+register struct t_operand *op;
{
char *glob_lbl();
}
int is_reg( str)
-char *str;
+register char *str;
{
switch ( *str) {
case 'a' :
char *glob_lbl( lbl)
char *lbl;
{
- char *gl, *malloc();
+ char *gl, *Malloc();
- gl = malloc( strlen( lbl) + 3);
+ gl = Malloc( strlen( lbl) + 3);
sprintf( gl, "\"%s\"", lbl);
return( gl);
}
int mode_reg( eaddr)
-struct t_operand *eaddr;
+register struct t_operand *eaddr;
{
switch ( eaddr->type) {
case IS_A_REG : return( 0x08 | eaddr->reg);
code_extension( eaddr)
-struct t_operand *eaddr;
+register struct t_operand *eaddr;
{
switch ( eaddr->type) {
int two_log( nr)
-int nr;
+register int nr;
{
- int log;
+ register int log;
for ( log = 0; nr >= 2; nr >>= 1)
log++;
#define BYTES_REVERSED
#define WORDS_REVERSED
-#define ONE_BYTE char
-#define TWO_BYTES short
+#define ONE_BYTE int
+#define TWO_BYTES int
#define FOUR_BYTES long
#define EM_WSIZE 4
#define NAME_FMT "_%s"
#define DNAM_FMT "_%s"
-#define DLB_FMT "_%ld"
+#define DLB_FMT "I_%ld"
#define ILB_FMT "I%x_%lx"
#define HOL_FMT "hol%d"
+#define GENLAB 'I'
+
#define ALIGN_FMT ".align\n"
#define BYTE_FMT ".data1 %ld\n"
process_operand( str, op)
-char *str;
-struct t_operand *op;
+register char *str;
+register struct t_operand *op;
{
char *glob_lbl();
}
int is_reg( str)
-char *str;
+register char *str;
{
switch ( *str) {
case 'a' :
char *glob_lbl( lbl)
char *lbl;
{
- char *gl, *malloc();
+ char *gl, *Malloc();
- gl = malloc( strlen( lbl) + 3);
+ gl = Malloc( strlen( lbl) + 3);
sprintf( gl, "\"%s\"", lbl);
return( gl);
}
int mode_reg( eaddr)
-struct t_operand *eaddr;
+register struct t_operand *eaddr;
{
switch ( eaddr->type) {
case IS_A_REG : return( 0x08 | eaddr->reg);
code_extension( eaddr)
-struct t_operand *eaddr;
+register struct t_operand *eaddr;
{
switch ( eaddr->type) {
int two_log( nr)
-int nr;
+register int nr;
{
- int log;
+ register int log;
for ( log = 0; nr >= 2; nr >>= 1)
log++;