mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
Remove GASP.
This commit is contained in:
parent
12aae7ea17
commit
fea179166e
@ -1,3 +1,22 @@
|
||||
2002-12-02 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* gasp.c: Delete. It has been deprecated.
|
||||
* NEWS: Mention that gasp has been removed.
|
||||
* Makefile.am: Remove references to gasp.
|
||||
* makefile.vms: Likewise.
|
||||
* mpw-make.sed: Likewise.
|
||||
* Makeile.in: Regenerate.
|
||||
* doc/gasp.texi: Delete.
|
||||
* doc/Makefile.am: Remove references to gasp.texi.
|
||||
* doc/Makefile.in: Regenerate.
|
||||
* macro.c: Delete references to gasp.
|
||||
Remove use of comment_char function parameter as it is no longer
|
||||
needed.
|
||||
* macro.h: Update prototypes to remove comment_char parameter.
|
||||
Fix formatting.
|
||||
* read.c (read_a_source_file, s_irp): Remove comment_char
|
||||
parameter from invocation of functions in macro.c
|
||||
|
||||
2002-12-02 Hans-Peter Nilsson <hp@axis.com>
|
||||
|
||||
* read.c (emit_expr) [!WORKING_DOT_WORD]: Initialize x->use_jump.
|
||||
|
@ -196,7 +196,7 @@ GAS_CFILES = \
|
||||
symbols.c \
|
||||
write.c
|
||||
|
||||
CFILES = $(GAS_CFILES) gasp.c itbl-ops.c
|
||||
CFILES = $(GAS_CFILES) itbl-ops.c
|
||||
|
||||
HFILES = \
|
||||
as.h \
|
||||
@ -447,8 +447,8 @@ po/POTFILES.in: @MAINT@ Makefile
|
||||
for file in $(POTFILES); do echo $$file; done | sort > tmp \
|
||||
&& mv tmp $(srcdir)/po/POTFILES.in
|
||||
|
||||
# Note: GASP is now deprecated and will be removed at some point in the future.
|
||||
# Anything that GASP could do can now be done by GAS.
|
||||
# Note: GASP is now deprecated and has been removed. It is still
|
||||
# available in the CVS archive or older binutils releases if it is needed.
|
||||
noinst_PROGRAMS = as-new
|
||||
noinst_SCRIPTS = $(GDBINIT)
|
||||
EXTRA_SCRIPTS = .gdbinit
|
||||
@ -512,10 +512,6 @@ $(OBJS): $(INCDIR)/bin-bugs.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
|
||||
as.h asintl.h bignum.h bit_fix.h config.h emul.h expr.h flonum.h \
|
||||
frags.h hash.h listing.h obj.h read.h symbols.h tc.h write.h
|
||||
|
||||
gasp_new_SOURCES = gasp.c macro.c sb.c hash.c
|
||||
gasp_new_LDADD = ../libiberty/libiberty.a $(INTLLIBS)
|
||||
gasp_new_DEPENDENCIES = ../libiberty/libiberty.a $(INTLDEPS)
|
||||
|
||||
EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
|
||||
echo $${rootme}/../expect/expect ; \
|
||||
else echo expect ; fi`
|
||||
@ -648,7 +644,7 @@ itbl-parse.c itbl-parse.h: $(srcdir)/itbl-parse.y
|
||||
|
||||
# stand-alone itbl assembler & disassembler
|
||||
|
||||
EXTRA_PROGRAMS = gasp-new itbl-test
|
||||
EXTRA_PROGRAMS = itbl-test
|
||||
itbl_test_SOURCES = itbl-parse.y itbl-lex.l
|
||||
itbl_test_LDADD = itbl-tops.o itbl-test.o $(GASLIBS) @LEXLIB@
|
||||
|
||||
@ -2369,8 +2365,6 @@ symbols.o: symbols.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \
|
||||
$(INCDIR)/obstack.h subsegs.h struc-symbol.h
|
||||
write.o: write.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h \
|
||||
output-file.h dwarf2dbg.h
|
||||
gasp.o: gasp.c $(INCDIR)/getopt.h $(INCDIR)/safe-ctype.h \
|
||||
sb.h macro.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
|
||||
itbl-ops.o: itbl-ops.c itbl-ops.h $(INCDIR)/symcat.h
|
||||
e-crisaout.o: $(srcdir)/config/e-crisaout.c $(INCDIR)/symcat.h \
|
||||
emul-target.h
|
||||
|
@ -1,6 +1,6 @@
|
||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
@ -312,7 +312,7 @@ GAS_CFILES = \
|
||||
write.c
|
||||
|
||||
|
||||
CFILES = $(GAS_CFILES) gasp.c itbl-ops.c
|
||||
CFILES = $(GAS_CFILES) itbl-ops.c
|
||||
|
||||
HFILES = \
|
||||
as.h \
|
||||
@ -570,8 +570,8 @@ POTFILES = $(MULTI_CFILES) $(TARGET_ENV_HFILES) $(OBJ_FORMAT_HFILES) \
|
||||
$(HFILES) $(CFILES) $(GAS_CFILES)
|
||||
|
||||
|
||||
# Note: GASP is now deprecated and will be removed at some point in the future.
|
||||
# Anything that GASP could do can now be done by GAS.
|
||||
# Note: GASP is now deprecated and has been removed. It is still
|
||||
# available in the CVS archive or older binutils releases if it is needed.
|
||||
noinst_PROGRAMS = as-new
|
||||
noinst_SCRIPTS = $(GDBINIT)
|
||||
EXTRA_SCRIPTS = .gdbinit
|
||||
@ -621,10 +621,6 @@ as_new_DEPENDENCIES = $(TARG_CPU_O) $(OBJ_FORMAT_O) $(ATOF_TARG_O) \
|
||||
$(extra_objects) $(GASLIBS) $(INTLDEPS)
|
||||
|
||||
|
||||
gasp_new_SOURCES = gasp.c macro.c sb.c hash.c
|
||||
gasp_new_LDADD = ../libiberty/libiberty.a $(INTLLIBS)
|
||||
gasp_new_DEPENDENCIES = ../libiberty/libiberty.a $(INTLDEPS)
|
||||
|
||||
EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
|
||||
echo $${rootme}/../expect/expect ; \
|
||||
else echo expect ; fi`
|
||||
@ -642,7 +638,7 @@ EXTRA_as_new_SOURCES = config/m68k-parse.y
|
||||
|
||||
# stand-alone itbl assembler & disassembler
|
||||
|
||||
EXTRA_PROGRAMS = gasp-new itbl-test
|
||||
EXTRA_PROGRAMS = itbl-test
|
||||
itbl_test_SOURCES = itbl-parse.y itbl-lex.l
|
||||
itbl_test_LDADD = itbl-tops.o itbl-test.o $(GASLIBS) @LEXLIB@
|
||||
|
||||
@ -2380,9 +2376,6 @@ DEFS = @DEFS@ -I. -I$(srcdir) -I.
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBS = @LIBS@
|
||||
gasp_new_OBJECTS = gasp.$(OBJEXT) macro.$(OBJEXT) sb.$(OBJEXT) \
|
||||
hash.$(OBJEXT)
|
||||
gasp_new_LDFLAGS =
|
||||
itbl_test_OBJECTS = itbl-parse.$(OBJEXT) itbl-lex.$(OBJEXT)
|
||||
itbl_test_DEPENDENCIES = itbl-tops.o itbl-test.o \
|
||||
../libiberty/libiberty.a
|
||||
@ -2414,10 +2407,10 @@ configure configure.in gdbinit.in itbl-lex.c itbl-parse.c
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
TAR = gtar
|
||||
GZIP_ENV = --best
|
||||
SOURCES = $(gasp_new_SOURCES) $(itbl_test_SOURCES) $(as_new_SOURCES) $(EXTRA_as_new_SOURCES)
|
||||
OBJECTS = $(gasp_new_OBJECTS) $(itbl_test_OBJECTS) $(as_new_OBJECTS)
|
||||
SOURCES = $(itbl_test_SOURCES) $(as_new_SOURCES) $(EXTRA_as_new_SOURCES)
|
||||
OBJECTS = $(itbl_test_OBJECTS) $(as_new_OBJECTS)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
@ -2520,10 +2513,6 @@ distclean-libtool:
|
||||
|
||||
maintainer-clean-libtool:
|
||||
|
||||
gasp-new$(EXEEXT): $(gasp_new_OBJECTS) $(gasp_new_DEPENDENCIES)
|
||||
@rm -f gasp-new$(EXEEXT)
|
||||
$(LINK) $(gasp_new_LDFLAGS) $(gasp_new_OBJECTS) $(gasp_new_LDADD) $(LIBS)
|
||||
|
||||
itbl-test$(EXEEXT): $(itbl_test_OBJECTS) $(itbl_test_DEPENDENCIES)
|
||||
@rm -f itbl-test$(EXEEXT)
|
||||
$(LINK) $(itbl_test_LDFLAGS) $(itbl_test_OBJECTS) $(itbl_test_LDADD) $(LIBS)
|
||||
@ -2575,7 +2564,7 @@ maintainer-clean-recursive:
|
||||
dot_seen=no; \
|
||||
rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
rev="$$subdir $$rev"; \
|
||||
test "$$subdir" = "." && dot_seen=yes; \
|
||||
test "$$subdir" != "." || dot_seen=yes; \
|
||||
done; \
|
||||
test "$$dot_seen" = "no" && rev=". $$rev"; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
@ -3274,8 +3263,6 @@ symbols.o: symbols.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \
|
||||
$(INCDIR)/obstack.h subsegs.h struc-symbol.h
|
||||
write.o: write.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h \
|
||||
output-file.h dwarf2dbg.h
|
||||
gasp.o: gasp.c $(INCDIR)/getopt.h $(INCDIR)/safe-ctype.h \
|
||||
sb.h macro.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
|
||||
itbl-ops.o: itbl-ops.c itbl-ops.h $(INCDIR)/symcat.h
|
||||
e-crisaout.o: $(srcdir)/config/e-crisaout.c $(INCDIR)/symcat.h \
|
||||
emul-target.h
|
||||
|
2
gas/NEWS
2
gas/NEWS
@ -1,5 +1,7 @@
|
||||
-*- text -*-
|
||||
|
||||
* GASP has now been removed.
|
||||
|
||||
* Support for Texas Instruments TMS320C4x and TMS320C3x series of
|
||||
DSP's contributed by Michael Hayes and Svein E. Seldal.
|
||||
|
||||
|
@ -15,8 +15,6 @@ POD2MAN = pod2man --center="GNU Development Tools" \
|
||||
|
||||
man_MANS = as.1
|
||||
|
||||
# The gasp.texi file is now deprecated, as GASP has been deprecated.
|
||||
# It will disappear in a future release.
|
||||
info_TEXINFOS = as.texinfo
|
||||
|
||||
asconfig.texi: $(CONFIG).texi
|
||||
@ -71,7 +69,7 @@ install: install-info
|
||||
|
||||
# This one isn't ready for prime time yet. Not even a little bit.
|
||||
|
||||
noinst_TEXINFOS = internals.texi gasp.texi
|
||||
noinst_TEXINFOS = internals.texi
|
||||
|
||||
DISTCLEANFILES = asconfig.texi
|
||||
|
||||
|
@ -133,8 +133,6 @@ POD2MAN = pod2man --center="GNU Development Tools" \
|
||||
|
||||
man_MANS = as.1
|
||||
|
||||
# The gasp.texi file is now deprecated, as GASP has been deprecated.
|
||||
# It will disappear in a future release.
|
||||
info_TEXINFOS = as.texinfo
|
||||
|
||||
CPU_DOCS = \
|
||||
@ -173,7 +171,7 @@ CPU_DOCS = \
|
||||
|
||||
# This one isn't ready for prime time yet. Not even a little bit.
|
||||
|
||||
noinst_TEXINFOS = internals.texi gasp.texi
|
||||
noinst_TEXINFOS = internals.texi
|
||||
|
||||
DISTCLEANFILES = asconfig.texi
|
||||
|
||||
@ -195,7 +193,7 @@ DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = tar
|
||||
TAR = gtar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
|
1456
gas/doc/gasp.texi
1456
gas/doc/gasp.texi
File diff suppressed because it is too large
Load Diff
3761
gas/gasp.c
3761
gas/gasp.c
File diff suppressed because it is too large
Load Diff
64
gas/macro.c
64
gas/macro.c
@ -1,4 +1,4 @@
|
||||
/* macro.c - macro support for gas and gasp
|
||||
/* macro.c - macro support for gas
|
||||
Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
@ -63,7 +63,7 @@ extern void *alloca ();
|
||||
#include "asintl.h"
|
||||
|
||||
/* The routines in this file handle macro definition and expansion.
|
||||
They are called by both gasp and gas. */
|
||||
They are called by gas. */
|
||||
|
||||
/* Internal functions. */
|
||||
|
||||
@ -75,8 +75,8 @@ static int get_apost_token PARAMS ((int, sb *, sb *, int));
|
||||
static int sub_actual
|
||||
PARAMS ((int, sb *, sb *, struct hash_control *, int, sb *, int));
|
||||
static const char *macro_expand_body
|
||||
PARAMS ((sb *, sb *, formal_entry *, struct hash_control *, int, int));
|
||||
static const char *macro_expand PARAMS ((int, sb *, macro_entry *, sb *, int));
|
||||
PARAMS ((sb *, sb *, formal_entry *, struct hash_control *, int));
|
||||
static const char *macro_expand PARAMS ((int, sb *, macro_entry *, sb *));
|
||||
|
||||
#define ISWHITE(x) ((x) == ' ' || (x) == '\t')
|
||||
|
||||
@ -99,7 +99,7 @@ static struct hash_control *macro_hash;
|
||||
|
||||
int macro_defined;
|
||||
|
||||
/* Whether we are in GASP alternate mode. */
|
||||
/* Whether we are in alternate syntax mode. */
|
||||
|
||||
static int macro_alternate;
|
||||
|
||||
@ -653,12 +653,11 @@ sub_actual (start, in, t, formal_hash, kind, out, copyifnotthere)
|
||||
/* Expand the body of a macro. */
|
||||
|
||||
static const char *
|
||||
macro_expand_body (in, out, formals, formal_hash, comment_char, locals)
|
||||
macro_expand_body (in, out, formals, formal_hash, locals)
|
||||
sb *in;
|
||||
sb *out;
|
||||
formal_entry *formals;
|
||||
struct hash_control *formal_hash;
|
||||
int comment_char;
|
||||
int locals;
|
||||
{
|
||||
sb t;
|
||||
@ -689,14 +688,7 @@ macro_expand_body (in, out, formals, formal_hash, comment_char, locals)
|
||||
else if (in->ptr[src] == '\\')
|
||||
{
|
||||
src++;
|
||||
if (in->ptr[src] == comment_char && comment_char != '\0')
|
||||
{
|
||||
/* This is a comment, just drop the rest of the line. */
|
||||
while (src < in->len
|
||||
&& in->ptr[src] != '\n')
|
||||
src++;
|
||||
}
|
||||
else if (in->ptr[src] == '(')
|
||||
if (in->ptr[src] == '(')
|
||||
{
|
||||
/* Sub in till the next ')' literally. */
|
||||
src++;
|
||||
@ -779,7 +771,7 @@ macro_expand_body (in, out, formals, formal_hash, comment_char, locals)
|
||||
formal_entry *f;
|
||||
|
||||
src = sb_skip_white (src + 5, in);
|
||||
while (in->ptr[src] != '\n' && in->ptr[src] != comment_char)
|
||||
while (in->ptr[src] != '\n')
|
||||
{
|
||||
static int loccnt;
|
||||
char buf[20];
|
||||
@ -806,17 +798,6 @@ macro_expand_body (in, out, formals, formal_hash, comment_char, locals)
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (comment_char != '\0'
|
||||
&& in->ptr[src] == comment_char
|
||||
&& src + 1 < in->len
|
||||
&& in->ptr[src + 1] == comment_char
|
||||
&& !inquote)
|
||||
{
|
||||
/* Two comment chars in a row cause the rest of the line to
|
||||
be dropped. */
|
||||
while (src < in->len && in->ptr[src] != '\n')
|
||||
src++;
|
||||
}
|
||||
else if (in->ptr[src] == '"'
|
||||
|| (macro_mri && in->ptr[src] == '\''))
|
||||
{
|
||||
@ -899,12 +880,11 @@ macro_expand_body (in, out, formals, formal_hash, comment_char, locals)
|
||||
body. */
|
||||
|
||||
static const char *
|
||||
macro_expand (idx, in, m, out, comment_char)
|
||||
macro_expand (idx, in, m, out)
|
||||
int idx;
|
||||
sb *in;
|
||||
macro_entry *m;
|
||||
sb *out;
|
||||
int comment_char;
|
||||
{
|
||||
sb t;
|
||||
formal_entry *ptr;
|
||||
@ -954,7 +934,7 @@ macro_expand (idx, in, m, out, comment_char)
|
||||
|
||||
/* Peel off the actuals and store them away in the hash tables' actuals. */
|
||||
idx = sb_skip_white (idx, in);
|
||||
while (idx < in->len && in->ptr[idx] != comment_char)
|
||||
while (idx < in->len)
|
||||
{
|
||||
int scan;
|
||||
|
||||
@ -1056,8 +1036,7 @@ macro_expand (idx, in, m, out, comment_char)
|
||||
sb_add_string (&ptr->actual, buffer);
|
||||
}
|
||||
|
||||
err = macro_expand_body (&m->sub, out, m->formals, m->formal_hash,
|
||||
comment_char, 1);
|
||||
err = macro_expand_body (&m->sub, out, m->formals, m->formal_hash, 1);
|
||||
if (err != NULL)
|
||||
return err;
|
||||
|
||||
@ -1090,14 +1069,12 @@ macro_expand (idx, in, m, out, comment_char)
|
||||
}
|
||||
|
||||
/* Check for a macro. If one is found, put the expansion into
|
||||
*EXPAND. COMMENT_CHAR is the comment character--this is used by
|
||||
gasp. Return 1 if a macro is found, 0 otherwise. */
|
||||
*EXPAND. Return 1 if a macro is found, 0 otherwise. */
|
||||
|
||||
int
|
||||
check_macro (line, expand, comment_char, error, info)
|
||||
check_macro (line, expand, error, info)
|
||||
const char *line;
|
||||
sb *expand;
|
||||
int comment_char;
|
||||
const char **error;
|
||||
macro_entry **info;
|
||||
{
|
||||
@ -1135,7 +1112,7 @@ check_macro (line, expand, comment_char, error, info)
|
||||
sb_add_char (&line_sb, *s++);
|
||||
|
||||
sb_new (expand);
|
||||
*error = macro_expand (0, &line_sb, macro, expand, comment_char);
|
||||
*error = macro_expand (0, &line_sb, macro, expand);
|
||||
|
||||
sb_kill (&line_sb);
|
||||
|
||||
@ -1160,13 +1137,12 @@ delete_macro (name)
|
||||
success, or an error message otherwise. */
|
||||
|
||||
const char *
|
||||
expand_irp (irpc, idx, in, out, get_line, comment_char)
|
||||
expand_irp (irpc, idx, in, out, get_line)
|
||||
int irpc;
|
||||
int idx;
|
||||
sb *in;
|
||||
sb *out;
|
||||
int (*get_line) PARAMS ((sb *));
|
||||
int comment_char;
|
||||
{
|
||||
const char *mn;
|
||||
sb sub;
|
||||
@ -1204,10 +1180,10 @@ expand_irp (irpc, idx, in, out, get_line, comment_char)
|
||||
sb_reset (out);
|
||||
|
||||
idx = sb_skip_comma (idx, in);
|
||||
if (idx >= in->len || in->ptr[idx] == comment_char)
|
||||
if (idx >= in->len)
|
||||
{
|
||||
/* Expand once with a null string. */
|
||||
err = macro_expand_body (&sub, out, &f, h, comment_char, 0);
|
||||
err = macro_expand_body (&sub, out, &f, h, 0);
|
||||
if (err != NULL)
|
||||
return err;
|
||||
}
|
||||
@ -1215,7 +1191,7 @@ expand_irp (irpc, idx, in, out, get_line, comment_char)
|
||||
{
|
||||
if (irpc && in->ptr[idx] == '"')
|
||||
++idx;
|
||||
while (idx < in->len && in->ptr[idx] != comment_char)
|
||||
while (idx < in->len)
|
||||
{
|
||||
if (!irpc)
|
||||
idx = get_any_string (idx, in, &f.actual, 1, 0);
|
||||
@ -1226,7 +1202,7 @@ expand_irp (irpc, idx, in, out, get_line, comment_char)
|
||||
int nxt;
|
||||
|
||||
nxt = sb_skip_white (idx + 1, in);
|
||||
if (nxt >= in->len || in->ptr[nxt] == comment_char)
|
||||
if (nxt >= in->len)
|
||||
{
|
||||
idx = nxt;
|
||||
break;
|
||||
@ -1236,7 +1212,7 @@ expand_irp (irpc, idx, in, out, get_line, comment_char)
|
||||
sb_add_char (&f.actual, in->ptr[idx]);
|
||||
++idx;
|
||||
}
|
||||
err = macro_expand_body (&sub, out, &f, h, comment_char, 0);
|
||||
err = macro_expand_body (&sub, out, &f, h, 0);
|
||||
if (err != NULL)
|
||||
return err;
|
||||
if (!irpc)
|
||||
|
47
gas/macro.h
47
gas/macro.h
@ -1,5 +1,5 @@
|
||||
/* macro.h - header file for macro support for gas and gasp
|
||||
Copyright 1994, 1995, 1996, 1997, 1998, 2000
|
||||
/* macro.h - header file for macro support for gas
|
||||
Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2002
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
Written by Steve and Judy Chamberlain of Cygnus Support,
|
||||
@ -37,14 +37,14 @@
|
||||
name and its default value. Each time the macro is expanded, the
|
||||
formals get the actual values attatched to them. */
|
||||
|
||||
/* describe the formal arguments to a macro */
|
||||
/* Describe the formal arguments to a macro. */
|
||||
|
||||
typedef struct formal_struct {
|
||||
struct formal_struct *next; /* next formal in list */
|
||||
sb name; /* name of the formal */
|
||||
sb def; /* the default value */
|
||||
sb actual; /* the actual argument (changed on each expansion) */
|
||||
int index; /* the index of the formal 0..formal_count-1 */
|
||||
struct formal_struct *next; /* Next formal in list. */
|
||||
sb name; /* Name of the formal. */
|
||||
sb def; /* The default value. */
|
||||
sb actual; /* The actual argument (changed on each expansion). */
|
||||
int index; /* The index of the formal 0..formal_count - 1. */
|
||||
} formal_entry;
|
||||
|
||||
/* Other values found in the index field of a formal_entry. */
|
||||
@ -52,13 +52,14 @@ typedef struct formal_struct {
|
||||
#define NARG_INDEX (-2)
|
||||
#define LOCAL_INDEX (-3)
|
||||
|
||||
/* describe the macro. */
|
||||
/* Describe the macro. */
|
||||
|
||||
typedef struct macro_struct {
|
||||
sb sub; /* substitution text. */
|
||||
int formal_count; /* number of formal args. */
|
||||
formal_entry *formals; /* pointer to list of formal_structs */
|
||||
struct hash_control *formal_hash; /* hash table of formals. */
|
||||
typedef struct macro_struct
|
||||
{
|
||||
sb sub; /* Substitution text. */
|
||||
int formal_count; /* Number of formal args. */
|
||||
formal_entry *formals; /* Pointer to list of formal_structs. */
|
||||
struct hash_control *formal_hash; /* Hash table of formals. */
|
||||
} macro_entry;
|
||||
|
||||
/* Whether any macros have been defined. */
|
||||
@ -72,16 +73,16 @@ extern int macro_nest;
|
||||
extern int buffer_and_nest
|
||||
PARAMS ((const char *, const char *, sb *, int (*) PARAMS ((sb *))));
|
||||
extern void macro_init
|
||||
PARAMS ((int alternate, int mri, int strip_at,
|
||||
int (*) PARAMS ((const char *, int, sb *, int *))));
|
||||
extern void macro_mri_mode PARAMS ((int));
|
||||
PARAMS ((int, int, int, int (*) PARAMS ((const char *, int, sb *, int *))));
|
||||
extern void macro_mri_mode
|
||||
PARAMS ((int));
|
||||
extern const char *define_macro
|
||||
PARAMS ((int idx, sb *in, sb *label, int (*get_line) PARAMS ((sb *)),
|
||||
const char **namep));
|
||||
extern int check_macro PARAMS ((const char *, sb *, int, const char **,
|
||||
macro_entry **));
|
||||
extern void delete_macro PARAMS ((const char *));
|
||||
PARAMS ((int, sb *, sb *, int (*) PARAMS ((sb *)), const char **));
|
||||
extern int check_macro
|
||||
PARAMS ((const char *, sb *, const char **, macro_entry **));
|
||||
extern void delete_macro
|
||||
PARAMS ((const char *));
|
||||
extern const char *expand_irp
|
||||
PARAMS ((int, int, sb *, sb *, int (*) PARAMS ((sb *)), int));
|
||||
PARAMS ((int, int, sb *, sb *, int (*) PARAMS ((sb *))));
|
||||
|
||||
#endif
|
||||
|
@ -45,8 +45,6 @@ OBJS=targ-cpu.obj,obj-format.obj,atof-targ.obj,app.obj,as.obj,atof-generic.obj,\
|
||||
literal.obj,messages.obj,output-file.obj,read.obj,subsegs.obj,symbols.obj,\
|
||||
write.obj,listing.obj,ecoff.obj,stabs.obj,sb.obj,macro.obj,ehopt.obj
|
||||
|
||||
GASPOBJS = gasp.obj,macro.obj,sb.obj,hash.obj
|
||||
|
||||
LIBIBERTY = [-.libiberty]libiberty.olb
|
||||
|
||||
ifeq ($(ARCH),ALPHA)
|
||||
@ -59,7 +57,7 @@ LIBOPCODES =
|
||||
BFDDEP =
|
||||
endif
|
||||
|
||||
all: config.status $(BFDDEP) as.exe gasp.exe
|
||||
all: config.status $(BFDDEP) as.exe
|
||||
|
||||
as.exe: $(OBJS) $(LIBOPCODES) $(LIBBFD) $(LIBIBERTY)
|
||||
ifeq ($(ARCH),ALPHA)
|
||||
@ -68,13 +66,6 @@ else
|
||||
link$(LFLAGS)/exe=$@ $(OBJS),$(LIBIBERTY)/lib$(LIBS)
|
||||
endif
|
||||
|
||||
gasp.exe: $(GASPOBJS) $(LIBBFD) $(LIBIBERTY)
|
||||
ifeq ($(ARCH),ALPHA)
|
||||
link$(LFLAGS)/exe=$@ $(GASPOBJS),$(LIBBFD)/lib,$(LIBIBERTY)/lib$(LIBS)
|
||||
else
|
||||
link$(LFLAGS)/exe=$@ $(GASPOBJS),$(LIBIBERTY)/lib$(LIBS)
|
||||
endif
|
||||
|
||||
config.status:
|
||||
$$ @config-gas
|
||||
|
||||
@ -108,7 +99,7 @@ targ-cpu.obj: targ-cpu.c targ-cpu.h [.config]atof-vax.c
|
||||
gmake -f makefile.vms "CC=$(CC)"
|
||||
$(CD) [-.gas]
|
||||
|
||||
install: as.exe gasp.exe
|
||||
install: as.exe
|
||||
$(CP) $^ GNU_ROOT\:[BIN]
|
||||
|
||||
clean:
|
||||
|
@ -58,18 +58,15 @@ LOCAL_LOADLIBES = \
|
||||
|
||||
# Whack out the config.h dependency, it only causes excess rebuilds.
|
||||
/{OBJS}/s/{OBJS} \\Option-f "{o}"config.h/{OBJS} \\Option-f/
|
||||
/gasp.c/s/gasp\.c "{o}"config.h/gasp.c/
|
||||
|
||||
# ALL_CFLAGS includes TDEFINES, which is not desirable at link time.
|
||||
/CC_LD/s/ALL_CFLAGS/CFLAGS/g
|
||||
|
||||
# The resource file is called mac-as.r.
|
||||
/as.new.r/s/as\.new\.r/mac-as.r/
|
||||
/gasp.new.r/s/gasp\.new\.r/mac-as.r/
|
||||
|
||||
# ...and the PROG_NAME doesn't have a .new in it.
|
||||
/PROG_NAME/s/PROG_NAME='"'as.new'"'/PROG_NAME='"'as'"'/
|
||||
/PROG_NAME/s/PROG_NAME='"'gasp.new'"'/PROG_NAME='"'gasp'"'/
|
||||
|
||||
# Whack out recursive makes, they won't work.
|
||||
/^[ ][ ]*srcroot=/,/^[ ][ ]*(cd /d
|
||||
@ -90,7 +87,6 @@ install \\Option-f all install-only\
|
||||
install-only \\Option-f\
|
||||
NewFolderRecursive "{bindir}"\
|
||||
Duplicate -y :as.new "{bindir}"as\
|
||||
Duplicate -y :gasp.new "{bindir}"gasp\
|
||||
|
||||
|
||||
# Whack out config-rebuilding targets, they won't work.
|
||||
|
@ -862,7 +862,7 @@ read_a_source_file (name)
|
||||
const char *err;
|
||||
macro_entry *macro;
|
||||
|
||||
if (check_macro (s, &out, '\0', &err, ¯o))
|
||||
if (check_macro (s, &out, &err, ¯o))
|
||||
{
|
||||
if (err != NULL)
|
||||
as_bad ("%s", err);
|
||||
@ -1855,7 +1855,7 @@ s_irp (irpc)
|
||||
|
||||
sb_new (&out);
|
||||
|
||||
err = expand_irp (irpc, 0, &s, &out, get_line_sb, '\0');
|
||||
err = expand_irp (irpc, 0, &s, &out, get_line_sb);
|
||||
if (err != NULL)
|
||||
as_bad_where (file, line, "%s", err);
|
||||
|
||||
@ -2296,8 +2296,7 @@ get_line_sb (line)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Define a macro. This is an interface to macro.c, which is shared
|
||||
between gas and gasp. */
|
||||
/* Define a macro. This is an interface to macro.c. */
|
||||
|
||||
void
|
||||
s_macro (ignore)
|
||||
|
@ -1,3 +1,9 @@
|
||||
2002-12-02 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* gasp: Remove entire directory tree. (Gasp has been removed from
|
||||
binutils).
|
||||
* config/default.asp (GASP): Remove definition and initialization.
|
||||
|
||||
2002-12-01 Stephane Carrez <stcarrez@nerim.fr>
|
||||
|
||||
* gas/m68hc11/m68hc11.exp: Rename from all.exp; run the new tests.
|
||||
|
@ -5,11 +5,6 @@ if ![info exists AS] then {
|
||||
set AS [findfile $base_dir/../as-new "../as-new" [transform as]]
|
||||
}
|
||||
|
||||
global GASP
|
||||
if ![info exists GASP] then {
|
||||
set GASP [findfile $base_dir/../gasp-new "../gasp-new" [transform gasp]]
|
||||
}
|
||||
|
||||
global ASFLAGS
|
||||
if ![info exists ASFLAGS] then {
|
||||
set ASFLAGS ""
|
||||
|
@ -1,3 +0,0 @@
|
||||
FILE 1 FIRST LINE
|
||||
.INCLUDE "INC2.H"
|
||||
FILE 1 LAST LINE
|
@ -1,2 +0,0 @@
|
||||
FILE 2 FIRST LINE
|
||||
FILE 2 LAST LINE
|
@ -1,13 +0,0 @@
|
||||
|
||||
foo: .ASSIGNC "hello"
|
||||
BAR: .ASSIGNA 12+34
|
||||
|
||||
\&foo'foo
|
||||
\&foo\&foo\&foo
|
||||
\&foo \&foo \&foo
|
||||
\&BAR\&bar\&BAR
|
||||
|
||||
|
||||
|
||||
|
||||
.END
|
@ -1 +0,0 @@
|
||||
assign.asm:8 Can't find preprocessor variable bar.
|
@ -1,22 +0,0 @@
|
||||
!
|
||||
|
||||
!foo: .ASSIGNC "hello"
|
||||
!BAR: .ASSIGNA 12+34
|
||||
!
|
||||
|
||||
! \&foo'foo
|
||||
hellofoo
|
||||
! \&foo\&foo\&foo
|
||||
hellohellohello
|
||||
! \&foo \&foo \&foo
|
||||
hello hello hello
|
||||
! \&BAR\&bar\&BAR
|
||||
4646
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!
|
||||
! .END
|
@ -1,129 +0,0 @@
|
||||
.AIF 1 EQ 1
|
||||
OK
|
||||
.AELSE
|
||||
BAD
|
||||
.AENDI
|
||||
.AIF 1 EQ 2
|
||||
BAD
|
||||
.AELSE
|
||||
OK
|
||||
.AENDI
|
||||
.AIF 1 EQ 2
|
||||
BAD
|
||||
.AELSE
|
||||
OK
|
||||
.AIF 1 EQ 2
|
||||
BAD
|
||||
.AELSE
|
||||
OK
|
||||
.AENDI
|
||||
.AENDI
|
||||
.AIF 1 LT 2
|
||||
OK
|
||||
.AENDI
|
||||
.AIF 1 EQ 2
|
||||
BAD
|
||||
.AENDI
|
||||
.AIF 1 NE 2
|
||||
OK
|
||||
.AENDI
|
||||
.AIF 1 LE 2
|
||||
OK
|
||||
.AENDI
|
||||
.AIF 1 GT 2
|
||||
BAD
|
||||
.AENDI
|
||||
.AIF 3 GE 2
|
||||
OK
|
||||
.AENDI
|
||||
.AIF 3 LT 2
|
||||
BAD
|
||||
.AENDI
|
||||
.AIF 3 EQ 2
|
||||
BAD
|
||||
.AENDI
|
||||
.AIF 3 NE 2
|
||||
OK
|
||||
.AENDI
|
||||
.AIF 3 LE 2
|
||||
BAD
|
||||
.AENDI
|
||||
.AIF 3 GT 2
|
||||
OK
|
||||
.AENDI
|
||||
.AIF 3 GE 2
|
||||
OK
|
||||
.AENDI
|
||||
.AIF "FOO" EQ "BAR"
|
||||
BAD
|
||||
.AENDI
|
||||
.AIF "FOO" EQ "FOO"
|
||||
OK
|
||||
.AENDI
|
||||
.AIF "FOO" NE "BAR"
|
||||
OK
|
||||
.AENDI
|
||||
.AIF "FOO" EQ "FOO"
|
||||
OK
|
||||
.AENDI
|
||||
.AIF 1 EQ 1
|
||||
.AIF 1 EQ 1
|
||||
OK
|
||||
.AELSE
|
||||
BAD
|
||||
.AENDI
|
||||
.AIF 1 EQ 0
|
||||
BAD
|
||||
.AELSE
|
||||
OK
|
||||
.AENDI
|
||||
OK
|
||||
.AELSE
|
||||
BAD
|
||||
.AENDI
|
||||
.AIF 1 EQ 0
|
||||
BAD
|
||||
.AELSE
|
||||
OK
|
||||
.AENDI
|
||||
.AIF 1 EQ 1
|
||||
OK
|
||||
.AELSE
|
||||
BAD
|
||||
.AENDI
|
||||
.AIF 1 EQ 0
|
||||
BAD
|
||||
.AELSE
|
||||
.AIF 1 EQ 1
|
||||
OK
|
||||
.AELSE
|
||||
BAD
|
||||
.AENDI
|
||||
.AIF 1 EQ 0
|
||||
BAD
|
||||
.AELSE
|
||||
OK
|
||||
.AENDI
|
||||
OK
|
||||
.AENDI
|
||||
.AIF 1 EQ 1
|
||||
OK
|
||||
.AIF 1 EQ 1
|
||||
OK
|
||||
.AELSE
|
||||
BAD
|
||||
.AENDI
|
||||
.AIF 1 EQ 0
|
||||
BAD
|
||||
.AELSE
|
||||
OK
|
||||
.AENDI
|
||||
.AELSE
|
||||
BAD
|
||||
.AENDI
|
||||
.AIF 1 EQ 0
|
||||
BAD
|
||||
.AELSE
|
||||
OK
|
||||
.AENDI
|
||||
.END
|
@ -1,155 +0,0 @@
|
||||
! .AIF 1 EQ 1
|
||||
! OK
|
||||
OK
|
||||
! .AELSE
|
||||
! BAD
|
||||
! .AENDI
|
||||
! .AIF 1 EQ 2
|
||||
! BAD
|
||||
! .AELSE
|
||||
! OK
|
||||
OK
|
||||
! .AENDI
|
||||
! .AIF 1 EQ 2
|
||||
! BAD
|
||||
! .AELSE
|
||||
! OK
|
||||
OK
|
||||
! .AIF 1 EQ 2
|
||||
! BAD
|
||||
! .AELSE
|
||||
! OK
|
||||
OK
|
||||
! .AENDI
|
||||
! .AENDI
|
||||
! .AIF 1 LT 2
|
||||
! OK
|
||||
OK
|
||||
! .AENDI
|
||||
! .AIF 1 EQ 2
|
||||
! BAD
|
||||
! .AENDI
|
||||
! .AIF 1 NE 2
|
||||
! OK
|
||||
OK
|
||||
! .AENDI
|
||||
! .AIF 1 LE 2
|
||||
! OK
|
||||
OK
|
||||
! .AENDI
|
||||
! .AIF 1 GT 2
|
||||
! BAD
|
||||
! .AENDI
|
||||
! .AIF 3 GE 2
|
||||
! OK
|
||||
OK
|
||||
! .AENDI
|
||||
! .AIF 3 LT 2
|
||||
! BAD
|
||||
! .AENDI
|
||||
! .AIF 3 EQ 2
|
||||
! BAD
|
||||
! .AENDI
|
||||
! .AIF 3 NE 2
|
||||
! OK
|
||||
OK
|
||||
! .AENDI
|
||||
! .AIF 3 LE 2
|
||||
! BAD
|
||||
! .AENDI
|
||||
! .AIF 3 GT 2
|
||||
! OK
|
||||
OK
|
||||
! .AENDI
|
||||
! .AIF 3 GE 2
|
||||
! OK
|
||||
OK
|
||||
! .AENDI
|
||||
! .AIF "FOO" EQ "BAR"
|
||||
! BAD
|
||||
! .AENDI
|
||||
! .AIF "FOO" EQ "FOO"
|
||||
! OK
|
||||
OK
|
||||
! .AENDI
|
||||
! .AIF "FOO" NE "BAR"
|
||||
! OK
|
||||
OK
|
||||
! .AENDI
|
||||
! .AIF "FOO" EQ "FOO"
|
||||
! OK
|
||||
OK
|
||||
! .AENDI
|
||||
! .AIF 1 EQ 1
|
||||
! .AIF 1 EQ 1
|
||||
! OK
|
||||
OK
|
||||
! .AELSE
|
||||
! BAD
|
||||
! .AENDI
|
||||
! .AIF 1 EQ 0
|
||||
! BAD
|
||||
! .AELSE
|
||||
! OK
|
||||
OK
|
||||
! .AENDI
|
||||
! OK
|
||||
OK
|
||||
! .AELSE
|
||||
! BAD
|
||||
! .AENDI
|
||||
! .AIF 1 EQ 0
|
||||
! BAD
|
||||
! .AELSE
|
||||
! OK
|
||||
OK
|
||||
! .AENDI
|
||||
! .AIF 1 EQ 1
|
||||
! OK
|
||||
OK
|
||||
! .AELSE
|
||||
! BAD
|
||||
! .AENDI
|
||||
! .AIF 1 EQ 0
|
||||
! BAD
|
||||
! .AELSE
|
||||
! .AIF 1 EQ 1
|
||||
! OK
|
||||
OK
|
||||
! .AELSE
|
||||
! BAD
|
||||
! .AENDI
|
||||
! .AIF 1 EQ 0
|
||||
! BAD
|
||||
! .AELSE
|
||||
! OK
|
||||
OK
|
||||
! .AENDI
|
||||
! OK
|
||||
OK
|
||||
! .AENDI
|
||||
! .AIF 1 EQ 1
|
||||
! OK
|
||||
OK
|
||||
! .AIF 1 EQ 1
|
||||
! OK
|
||||
OK
|
||||
! .AELSE
|
||||
! BAD
|
||||
! .AENDI
|
||||
! .AIF 1 EQ 0
|
||||
! BAD
|
||||
! .AELSE
|
||||
! OK
|
||||
OK
|
||||
! .AENDI
|
||||
! .AELSE
|
||||
! BAD
|
||||
! .AENDI
|
||||
! .AIF 1 EQ 0
|
||||
! BAD
|
||||
! .AELSE
|
||||
! OK
|
||||
OK
|
||||
! .AENDI
|
||||
! .END
|
@ -1,22 +0,0 @@
|
||||
|
||||
Stuff to try and crash it
|
||||
|
||||
foo: .MACRO
|
||||
HI
|
||||
bar: .MACRO
|
||||
THERE
|
||||
bar
|
||||
.ENDM
|
||||
|
||||
|
||||
.ENDM
|
||||
foo
|
||||
foo
|
||||
foo
|
||||
foo
|
||||
foo
|
||||
bar
|
||||
|
||||
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
crash.asm:18 Unreasonable expansion (-u turns off check).
|
File diff suppressed because it is too large
Load Diff
@ -1,13 +0,0 @@
|
||||
|
||||
|
||||
.MACRO foo a b c=a
|
||||
\a \b \c \d
|
||||
.ENDM
|
||||
|
||||
foo 1 2
|
||||
foo 1 2 3 4
|
||||
foo 1
|
||||
foo
|
||||
|
||||
|
||||
.END
|
@ -1,24 +0,0 @@
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
! .MACRO foo a b c=a
|
||||
! \a \b \c \d
|
||||
! .ENDM
|
||||
!
|
||||
|
||||
! foo 1 2
|
||||
! 1 2 a \d
|
||||
1 2 a \d
|
||||
! foo 1 2 3 4
|
||||
! foo 1
|
||||
! 1 a \d
|
||||
1 a \d
|
||||
! foo
|
||||
! a \d
|
||||
a \d
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
! .END
|
@ -1,41 +0,0 @@
|
||||
|
||||
foo: .ASSIGNA 1
|
||||
\&foo+1
|
||||
\&foo+1
|
||||
foo: .ASSIGNC "foo"
|
||||
\&foo+1
|
||||
\&foo+1
|
||||
|
||||
foo: .ASSIGNA 1
|
||||
\&foo+1
|
||||
\&foo+1
|
||||
foo: .ASSIGNC "foo"
|
||||
\&foo+1
|
||||
\&foo+1
|
||||
|
||||
foo: .ASSIGNA 1
|
||||
\&foo+1
|
||||
\&foo+1
|
||||
foo: .ASSIGNC "foo"
|
||||
\&foo+1
|
||||
\&foo+1
|
||||
|
||||
foo: .ASSIGNA 1
|
||||
\&foo+1
|
||||
\&foo+1
|
||||
foo: .ASSIGNC "foo"
|
||||
\&foo+1
|
||||
\&foo+1
|
||||
|
||||
foo: .ASSIGNA 1
|
||||
\&foo+1
|
||||
\&foo+1
|
||||
foo: .ASSIGNC "foo"
|
||||
\&foo+1
|
||||
\&foo+1
|
||||
foo
|
||||
foo foo
|
||||
foo foo
|
||||
foo
|
||||
.END
|
||||
|
@ -1,69 +0,0 @@
|
||||
!
|
||||
|
||||
!foo: .ASSIGNA 1
|
||||
! \&foo+1
|
||||
1+1
|
||||
! \&foo+1
|
||||
1+1
|
||||
!foo: .ASSIGNC "foo"
|
||||
! \&foo+1
|
||||
foo+1
|
||||
! \&foo+1
|
||||
foo+1
|
||||
!
|
||||
|
||||
!foo: .ASSIGNA 1
|
||||
! \&foo+1
|
||||
1+1
|
||||
! \&foo+1
|
||||
1+1
|
||||
!foo: .ASSIGNC "foo"
|
||||
! \&foo+1
|
||||
foo+1
|
||||
! \&foo+1
|
||||
foo+1
|
||||
!
|
||||
|
||||
!foo: .ASSIGNA 1
|
||||
! \&foo+1
|
||||
1+1
|
||||
! \&foo+1
|
||||
1+1
|
||||
!foo: .ASSIGNC "foo"
|
||||
! \&foo+1
|
||||
foo+1
|
||||
! \&foo+1
|
||||
foo+1
|
||||
!
|
||||
|
||||
!foo: .ASSIGNA 1
|
||||
! \&foo+1
|
||||
1+1
|
||||
! \&foo+1
|
||||
1+1
|
||||
!foo: .ASSIGNC "foo"
|
||||
! \&foo+1
|
||||
foo+1
|
||||
! \&foo+1
|
||||
foo+1
|
||||
!
|
||||
|
||||
!foo: .ASSIGNA 1
|
||||
! \&foo+1
|
||||
1+1
|
||||
! \&foo+1
|
||||
1+1
|
||||
!foo: .ASSIGNC "foo"
|
||||
! \&foo+1
|
||||
foo+1
|
||||
! \&foo+1
|
||||
foo+1
|
||||
! foo
|
||||
foo
|
||||
! foo foo
|
||||
foo foo
|
||||
! foo foo
|
||||
foo foo
|
||||
! foo
|
||||
foo
|
||||
! .END
|
@ -1,23 +0,0 @@
|
||||
|
||||
foo .DATA 1,2,3
|
||||
bar .DATA 1,2,3,4,5 ,6
|
||||
.DATA.B 12345,12,2
|
||||
.DATA.W 9,2,12,3,13+41,foo+9
|
||||
.DATA.L 2~99
|
||||
|
||||
|
||||
|
||||
.DATAB 1,2,3
|
||||
.DATAB 1,2,3
|
||||
|
||||
|
||||
|
||||
|
||||
.DATAB 1,9+32
|
||||
|
||||
.DATAB.L 1,H'11111111
|
||||
.DATAB.W 2,H'2222
|
||||
.DATAB.B 3,H'333
|
||||
|
||||
|
||||
.END
|
@ -1,45 +0,0 @@
|
||||
!
|
||||
|
||||
!foo .DATA 1,2,3
|
||||
foo: .long 1,2,3
|
||||
!bar .DATA 1,2,3,4,5 ,6
|
||||
bar: .long 1,2,3,4,5,6
|
||||
! .DATA.B 12345,12,2
|
||||
.byte 12345,12,2
|
||||
! .DATA.W 9,2,12,3,13+41,foo+9
|
||||
.short 9,2,12,3,54,foo+9
|
||||
! .DATA.L 2~99
|
||||
.long 97
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
! .DATAB 1,2,3
|
||||
.fill 1,4,2
|
||||
! .DATAB 1,2,3
|
||||
.fill 1,4,2
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
! .DATAB 1,9+32
|
||||
.fill 1,4,41
|
||||
!
|
||||
|
||||
! .DATAB.L 1,H'11111111
|
||||
.fill 1,4,286331153
|
||||
! .DATAB.W 2,H'2222
|
||||
.fill 2,2,8738
|
||||
! .DATAB.B 3,H'333
|
||||
.fill 3,1,819
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
! .END
|
@ -1,80 +0,0 @@
|
||||
|
||||
; test all ops
|
||||
|
||||
a1 .EQU 4+10
|
||||
a2 .EQU 4-10
|
||||
a3 .EQU 4&10
|
||||
a4 .EQU 4|2
|
||||
a5 .EQU 4~2
|
||||
a6 .EQU 4*10
|
||||
a7 .EQU 40/10
|
||||
a8 .EQU +7
|
||||
a9 .EQU -7
|
||||
a10 .EQU ~7
|
||||
|
||||
|
||||
a1 a2 a3 a4 a5 a6 a7 a8 a9 a10
|
||||
|
||||
; test the priorities
|
||||
|
||||
b1 .EQU 1|2~3&4+5-8*7/2
|
||||
b2 .EQU (1|2~(3&(4+5-(8*(7/2)))))
|
||||
b3 .EQU 10*2/3*4
|
||||
b4 .EQU (((10*2)/3)*4)
|
||||
b5 .EQU 10+2-3+4
|
||||
b6 .EQU (((10+2)-3)+4)
|
||||
|
||||
b1 b2 b3 b4
|
||||
|
||||
; test association
|
||||
|
||||
c1 .EQU -~3
|
||||
c2 .EQU ~-3
|
||||
c3 .EQU -(~3)
|
||||
c4 .EQU ~(-3)
|
||||
|
||||
c1 c2 c3 c4
|
||||
|
||||
; test rules for symbols
|
||||
|
||||
ok1 .EQU FOO
|
||||
ok2 .EQU FOO+10
|
||||
ok3 .EQU 10+FOO
|
||||
ok4 .EQU FOO-10
|
||||
|
||||
ok1
|
||||
ok2
|
||||
ok3
|
||||
ok4
|
||||
|
||||
ok5 .EQU FOO+3+4+5+6
|
||||
ok6 .EQU FOO-BAR
|
||||
|
||||
ok5
|
||||
ok6
|
||||
|
||||
bad1 .EQU FOO+FOO
|
||||
bad2 .EQU FOO*2
|
||||
bad3 .EQU FOO/2
|
||||
bad4 .EQU FOO|2
|
||||
bad5 .EQU FOO&2
|
||||
bad6 .EQU FOO~2
|
||||
bad7 .EQU FOO*2
|
||||
|
||||
; test spacing
|
||||
|
||||
space1 .EQU 1 + 2 +3+FOO + 3
|
||||
space2
|
||||
|
||||
; from the SH manual
|
||||
|
||||
.DATA.L 1+(2-(3+(4-5))),1
|
||||
|
||||
.DATA.L -H'fffffff1+H'000000f0*H'00000010|H'000000f0&H'0000ffff,H'00000fff
|
||||
|
||||
.DATA.L -~-~H'0000000f,H'00
|
||||
|
||||
|
||||
|
||||
|
||||
.END
|
@ -1,7 +0,0 @@
|
||||
exp.asm:56 can't add two relocatable expressions
|
||||
exp.asm:57 the * operator cannot take non-absolute arguments.
|
||||
exp.asm:58 the / operator cannot take non-absolute arguments.
|
||||
exp.asm:59 the | operator cannot take non-absolute arguments.
|
||||
exp.asm:60 the & operator cannot take non-absolute arguments.
|
||||
exp.asm:61 the ~ operator cannot take non-absolute arguments.
|
||||
exp.asm:62 the * operator cannot take non-absolute arguments.
|
@ -1,124 +0,0 @@
|
||||
!
|
||||
|
||||
!; test all ops
|
||||
; test all ops
|
||||
!
|
||||
|
||||
!a1 .EQU 4+10
|
||||
!a2 .EQU 4-10
|
||||
!a3 .EQU 4&10
|
||||
!a4 .EQU 4|2
|
||||
!a5 .EQU 4~2
|
||||
!a6 .EQU 4*10
|
||||
!a7 .EQU 40/10
|
||||
!a8 .EQU +7
|
||||
!a9 .EQU -7
|
||||
!a10 .EQU ~7
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
! a1 a2 a3 a4 a5 a6 a7 a8 a9 a10
|
||||
14 -6 0 6 6 40 4 7 -7 -8
|
||||
!
|
||||
|
||||
!; test the priorities
|
||||
; test the priorities
|
||||
!
|
||||
|
||||
!b1 .EQU 1|2~3&4+5-8*7/2
|
||||
!b2 .EQU (1|2~(3&(4+5-(8*(7/2)))))
|
||||
!b3 .EQU 10*2/3*4
|
||||
!b4 .EQU (((10*2)/3)*4)
|
||||
!b5 .EQU 10+2-3+4
|
||||
!b6 .EQU (((10+2)-3)+4)
|
||||
!
|
||||
|
||||
! b1 b2 b3 b4
|
||||
2 2 24 24
|
||||
!
|
||||
|
||||
!; test association
|
||||
; test association
|
||||
!
|
||||
|
||||
!c1 .EQU -~3
|
||||
!c2 .EQU ~-3
|
||||
!c3 .EQU -(~3)
|
||||
!c4 .EQU ~(-3)
|
||||
!
|
||||
|
||||
! c1 c2 c3 c4
|
||||
4 2 4 2
|
||||
!
|
||||
|
||||
!; test rules for symbols
|
||||
; test rules for symbols
|
||||
!
|
||||
|
||||
!ok1 .EQU FOO
|
||||
!ok2 .EQU FOO+10
|
||||
!ok3 .EQU 10+FOO
|
||||
!ok4 .EQU FOO-10
|
||||
!
|
||||
|
||||
! ok1
|
||||
FOO
|
||||
! ok2
|
||||
FOO+10
|
||||
! ok3
|
||||
FOO+10
|
||||
! ok4
|
||||
FOO+-10
|
||||
!
|
||||
|
||||
!ok5 .EQU FOO+3+4+5+6
|
||||
!ok6 .EQU FOO-BAR
|
||||
!
|
||||
|
||||
! ok5
|
||||
FOO+18
|
||||
! ok6
|
||||
FOO-FOO
|
||||
!
|
||||
|
||||
!bad1 .EQU FOO+FOO
|
||||
!bad2 .EQU FOO*2
|
||||
!bad3 .EQU FOO/2
|
||||
!bad4 .EQU FOO|2
|
||||
!bad5 .EQU FOO&2
|
||||
!bad6 .EQU FOO~2
|
||||
!bad7 .EQU FOO*2
|
||||
!
|
||||
|
||||
!; test spacing
|
||||
; test spacing
|
||||
!
|
||||
|
||||
!space1 .EQU 1 + 2 +3+FOO + 3
|
||||
!space2
|
||||
space2:
|
||||
!
|
||||
|
||||
!; from the SH manual
|
||||
; from the SH manual
|
||||
!
|
||||
|
||||
! .DATA.L 1+(2-(3+(4-5))),1
|
||||
.long 1,1
|
||||
!
|
||||
|
||||
! .DATA.L -H'fffffff1+H'000000f0*H'00000010|H'000000f0&H'0000ffff,H'00000fff
|
||||
.long 4095,4095
|
||||
!
|
||||
|
||||
! .DATA.L -~-~H'0000000f,H'00
|
||||
.long 17,0
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!
|
||||
!
|
||||
|
||||
! .END
|
@ -1,19 +0,0 @@
|
||||
.RADIX Q
|
||||
! test floats now
|
||||
.float -H'C
|
||||
.float -9.0
|
||||
.float 0.9
|
||||
.float +0.9
|
||||
.float +.9
|
||||
.float -00.0009
|
||||
.float -2.900
|
||||
.float 1.1e+10
|
||||
.float +1.1e+10
|
||||
.float +1.1e-10
|
||||
.float -1.1E+10
|
||||
.float +1.1E+1000
|
||||
.float +1.1E+0001 10
|
||||
.float 11.11E-10 10
|
||||
.float H'C.3
|
||||
.float H'C.H'C
|
||||
.END
|
@ -1,36 +0,0 @@
|
||||
!.RADIX Q
|
||||
! ! test floats now
|
||||
! test floats now
|
||||
! .float -H'C
|
||||
.float -12
|
||||
! .float -9.0
|
||||
.float -9.0
|
||||
! .float 0.9
|
||||
.float 0.9
|
||||
! .float +0.9
|
||||
.float +0.9
|
||||
! .float +.9
|
||||
.float +.9
|
||||
! .float -00.0009
|
||||
.float -00.0009
|
||||
! .float -2.900
|
||||
.float -2.900
|
||||
! .float 1.1e+10
|
||||
.float 1.1e+10
|
||||
! .float +1.1e+10
|
||||
.float +1.1e+10
|
||||
! .float +1.1e-10
|
||||
.float +1.1e-10
|
||||
! .float -1.1E+10
|
||||
.float -1.1E+10
|
||||
! .float +1.1E+1000
|
||||
.float +1.1E+1000
|
||||
! .float +1.1E+0001 10
|
||||
.float +1.1E+0001 8
|
||||
! .float 11.11E-10 10
|
||||
.float 11.11E-10 8
|
||||
! .float H'C.3
|
||||
.float 12.3
|
||||
! .float H'C.H'C
|
||||
.float 12.12
|
||||
!.END
|
@ -1,40 +0,0 @@
|
||||
# Test gasp.
|
||||
|
||||
# GASP is now deprecated (and not built by default)
|
||||
# so if it does not exist, do not test it.
|
||||
global GASP
|
||||
if {![info exists GASP] || ! [file exists $GASP] } then {
|
||||
return 1
|
||||
}
|
||||
|
||||
proc gasp_test { filename testname opt } {
|
||||
global GASP
|
||||
global srcdir
|
||||
global host_triplet
|
||||
|
||||
send_log "$srcdir/lib/run $GASP -I$srcdir/gasp -s $opt $filename.asm -o gasp.out\n"
|
||||
catch "exec $srcdir/lib/run $GASP -I$srcdir/gasp -s $opt $filename.asm -o gasp.out" errs
|
||||
catch "exec diff gasp.out $filename.out" diffs
|
||||
set diffs [prune_warnings $diffs]
|
||||
if ![string match "" $diffs] {
|
||||
send_log "$diffs\n"
|
||||
verbose $diffs
|
||||
fail $testname
|
||||
return 0
|
||||
} else {
|
||||
pass $testname
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
foreach src [ lsort [ glob $srcdir/gasp/*.asm ] ] {
|
||||
regsub -all ".asm" $src "" t
|
||||
regsub "^.*/(\[^/\]*)$" $t "gasp \\1" testname
|
||||
gasp_test $t $testname ""
|
||||
}
|
||||
|
||||
foreach src [ lsort [ glob $srcdir/gasp/mri/*.asm ] ] {
|
||||
regsub -all ".asm" $src "" t
|
||||
regsub "^.*/(\[^/\]*)$" $t "gasp MRI \\1" testname
|
||||
gasp_test $t $testname "-M"
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
HI
|
||||
.INCLUDE "INC1.H"
|
||||
THERE
|
||||
.END
|
@ -1,15 +0,0 @@
|
||||
! HI
|
||||
HI
|
||||
! .INCLUDE "INC1.H"
|
||||
!FILE 1 FIRST LINE
|
||||
FILE: 1 FIRST LINE
|
||||
! .INCLUDE "INC2.H"
|
||||
! FILE 2 FIRST LINE
|
||||
FILE 2 FIRST LINE
|
||||
! FILE 2 LAST LINE
|
||||
FILE 2 LAST LINE
|
||||
!FILE 1 LAST LINE
|
||||
FILE: 1 LAST LINE
|
||||
! THERE
|
||||
THERE
|
||||
! .END
|
@ -1,15 +0,0 @@
|
||||
|
||||
|
||||
.HEADING " ""QUOTE"" "
|
||||
.PAGE
|
||||
.PRINT LIST
|
||||
foo
|
||||
.PRINT NOLIST
|
||||
foo
|
||||
|
||||
|
||||
.FORM LIN=12
|
||||
.FORM COL=90
|
||||
.FORM LIN=123 COL=23
|
||||
|
||||
.END
|
@ -1,28 +0,0 @@
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
! .HEADING " ""QUOTE"" "
|
||||
.title " "QUOTE" "
|
||||
! .PAGE
|
||||
.eject
|
||||
! .PRINT LIST
|
||||
.list
|
||||
! foo
|
||||
foo
|
||||
! .PRINT NOLIST
|
||||
.nolist
|
||||
! foo
|
||||
foo
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
! .FORM LIN=12
|
||||
.psize 12,132
|
||||
! .FORM COL=90
|
||||
.psize 60,90
|
||||
! .FORM LIN=123 COL=23
|
||||
.psize 123,23
|
||||
!
|
||||
! .END
|
@ -1,102 +0,0 @@
|
||||
.MACRO SUM FROM=0, TO=9
|
||||
; \FROM \TO
|
||||
MOV R\FROM,R10
|
||||
COUNT .ASSIGNA \FROM+1
|
||||
.AWHILE \&COUNT LE \TO
|
||||
MOV R\&COUNT,R10
|
||||
COUNT .ASSIGNA \&COUNT+1
|
||||
.AENDW
|
||||
.ENDM
|
||||
|
||||
SUM 0,5
|
||||
SUM TO=5
|
||||
SUM FROM=2, TO=5
|
||||
|
||||
|
||||
; hi this is a comment
|
||||
.MACRO BACK_SLASH_SET
|
||||
\(MOV #"\",R0)
|
||||
.ENDM
|
||||
BACK_SLASH_SET
|
||||
.MACRO COMM
|
||||
bar ; this comment will get copied out
|
||||
foo \; this one will get dropped
|
||||
.ENDM
|
||||
COMM
|
||||
BACK_SLASH_SET
|
||||
.MACRO PLUS2
|
||||
ADD #1,R\&V1
|
||||
.SDATA "\&V'1"
|
||||
.ENDM
|
||||
V .ASSIGNC "R"
|
||||
V1 .ASSIGNA 1
|
||||
PLUS2
|
||||
.MACRO PLUS1 P,P1
|
||||
ADD #1,\P1
|
||||
.SDATA "\P'1"
|
||||
.ENDM
|
||||
PLUS1 R,R1
|
||||
|
||||
.MACRO SUM P1
|
||||
MOV R0,R10
|
||||
ADD R1,R10
|
||||
ADD R2,R10
|
||||
\P1
|
||||
ADD R3,R10
|
||||
.ENDM
|
||||
|
||||
SUM .EXITM
|
||||
|
||||
.MACRO foo bar=a default=b
|
||||
\bar
|
||||
\default
|
||||
bar
|
||||
default
|
||||
.ENDM
|
||||
foo default=dog bar=cat
|
||||
foo X Y
|
||||
foo
|
||||
foo bar=cat default=dog
|
||||
|
||||
|
||||
.MACRO foo bar
|
||||
HI
|
||||
HI \bar
|
||||
HI
|
||||
.ENDM
|
||||
|
||||
foo 1
|
||||
foo 123
|
||||
foo 1 2 3 4
|
||||
foo
|
||||
|
||||
|
||||
.MACRO PUSH Rn
|
||||
MOV.L \Rn,@-r15
|
||||
.ENDM
|
||||
PUSH R0
|
||||
PUSH R1
|
||||
|
||||
|
||||
.MACRO RES_STR STR, Rn
|
||||
MOV.L #str\@,\Rn
|
||||
BRA end_str\@
|
||||
NOP
|
||||
str\@ .SDATA "\STR"
|
||||
.ALIGN 2
|
||||
end_str\@
|
||||
.ENDM
|
||||
|
||||
RES_STR "ONE",R0
|
||||
RES_STR "TWO",R1
|
||||
RES_STR "THREE",R2
|
||||
|
||||
|
||||
|
||||
RES_STR STR=donkey Rn=R1
|
||||
RES_STR donkey,R1
|
||||
RES_STR donkey Rn=R1
|
||||
.END
|
||||
|
||||
|
||||
|
@ -1,382 +0,0 @@
|
||||
! .MACRO SUM FROM=0, TO=9
|
||||
! ; \FROM \TO
|
||||
! MOV R\FROM,R10
|
||||
!COUNT .ASSIGNA \FROM+1
|
||||
! .AWHILE \&COUNT LE \TO
|
||||
! MOV R\&COUNT,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AENDW
|
||||
! .ENDM
|
||||
!
|
||||
|
||||
! SUM 0,5
|
||||
! ; 0 5
|
||||
; 0 5
|
||||
! MOV R0,R10
|
||||
MOV R0,R10
|
||||
!COUNT .ASSIGNA 0+1
|
||||
! .AWHILE \&COUNT LE 5
|
||||
! MOV R\&COUNT,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AENDW
|
||||
! MOV R\&COUNT,R10
|
||||
MOV R1,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AWHILE \&COUNT LE 5
|
||||
! MOV R\&COUNT,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AENDW
|
||||
! MOV R\&COUNT,R10
|
||||
MOV R2,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AWHILE \&COUNT LE 5
|
||||
! MOV R\&COUNT,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AENDW
|
||||
! MOV R\&COUNT,R10
|
||||
MOV R3,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AWHILE \&COUNT LE 5
|
||||
! MOV R\&COUNT,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AENDW
|
||||
! MOV R\&COUNT,R10
|
||||
MOV R4,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AWHILE \&COUNT LE 5
|
||||
! MOV R\&COUNT,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AENDW
|
||||
! MOV R\&COUNT,R10
|
||||
MOV R5,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AWHILE \&COUNT LE 5
|
||||
! MOV R\&COUNT,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AENDW
|
||||
! SUM TO=5
|
||||
! ; 0 5
|
||||
; 0 5
|
||||
! MOV R0,R10
|
||||
MOV R0,R10
|
||||
!COUNT .ASSIGNA 0+1
|
||||
! .AWHILE \&COUNT LE 5
|
||||
! MOV R\&COUNT,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AENDW
|
||||
! MOV R\&COUNT,R10
|
||||
MOV R1,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AWHILE \&COUNT LE 5
|
||||
! MOV R\&COUNT,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AENDW
|
||||
! MOV R\&COUNT,R10
|
||||
MOV R2,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AWHILE \&COUNT LE 5
|
||||
! MOV R\&COUNT,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AENDW
|
||||
! MOV R\&COUNT,R10
|
||||
MOV R3,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AWHILE \&COUNT LE 5
|
||||
! MOV R\&COUNT,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AENDW
|
||||
! MOV R\&COUNT,R10
|
||||
MOV R4,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AWHILE \&COUNT LE 5
|
||||
! MOV R\&COUNT,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AENDW
|
||||
! MOV R\&COUNT,R10
|
||||
MOV R5,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AWHILE \&COUNT LE 5
|
||||
! MOV R\&COUNT,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AENDW
|
||||
! SUM FROM=2, TO=5
|
||||
! ; 2 5
|
||||
; 2 5
|
||||
! MOV R2,R10
|
||||
MOV R2,R10
|
||||
!COUNT .ASSIGNA 2+1
|
||||
! .AWHILE \&COUNT LE 5
|
||||
! MOV R\&COUNT,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AENDW
|
||||
! MOV R\&COUNT,R10
|
||||
MOV R3,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AWHILE \&COUNT LE 5
|
||||
! MOV R\&COUNT,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AENDW
|
||||
! MOV R\&COUNT,R10
|
||||
MOV R4,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AWHILE \&COUNT LE 5
|
||||
! MOV R\&COUNT,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AENDW
|
||||
! MOV R\&COUNT,R10
|
||||
MOV R5,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AWHILE \&COUNT LE 5
|
||||
! MOV R\&COUNT,R10
|
||||
!COUNT .ASSIGNA \&COUNT+1
|
||||
! .AENDW
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!; hi this is a comment
|
||||
; hi this is a comment
|
||||
! .MACRO BACK_SLASH_SET
|
||||
! \(MOV #"\",R0)
|
||||
! .ENDM
|
||||
! BACK_SLASH_SET
|
||||
! MOV #"\",R0
|
||||
MOV #"\",R0
|
||||
! .MACRO COMM
|
||||
! bar ; this comment will get copied out
|
||||
! foo \; this one will get dropped
|
||||
! .ENDM
|
||||
! COMM
|
||||
! bar ; this comment will get copied out
|
||||
bar ; this comment will get copied out
|
||||
! foo \; this one will get dropped
|
||||
foo \; this one will get dropped
|
||||
! BACK_SLASH_SET
|
||||
! MOV #"\",R0
|
||||
MOV #"\",R0
|
||||
! .MACRO PLUS2
|
||||
! ADD #1,R\&V1
|
||||
! .SDATA "\&V'1"
|
||||
! .ENDM
|
||||
!V .ASSIGNC "R"
|
||||
!V1 .ASSIGNA 1
|
||||
! PLUS2
|
||||
! ADD #1,R\&V1
|
||||
ADD #1,R1
|
||||
! .SDATA "\&V'1"
|
||||
.byte 82,49
|
||||
! .MACRO PLUS1 P,P1
|
||||
! ADD #1,\P1
|
||||
! .SDATA "\P'1"
|
||||
! .ENDM
|
||||
! PLUS1 R,R1
|
||||
! ADD #1,R1
|
||||
ADD #1,R1
|
||||
! .SDATA "R1"
|
||||
.byte 82,49
|
||||
!
|
||||
|
||||
! .MACRO SUM P1
|
||||
! MOV R0,R10
|
||||
! ADD R1,R10
|
||||
! ADD R2,R10
|
||||
! \P1
|
||||
! ADD R3,R10
|
||||
! .ENDM
|
||||
!
|
||||
|
||||
! SUM .EXITM
|
||||
! MOV R0,R10
|
||||
MOV R0,R10
|
||||
! ADD R1,R10
|
||||
ADD R1,R10
|
||||
! ADD R2,R10
|
||||
ADD R2,R10
|
||||
! .EXITM
|
||||
!
|
||||
|
||||
! .MACRO foo bar=a default=b
|
||||
! \bar
|
||||
! \default
|
||||
! bar
|
||||
! default
|
||||
! .ENDM
|
||||
! foo default=dog bar=cat
|
||||
! cat
|
||||
cat
|
||||
! dog
|
||||
dog
|
||||
! bar
|
||||
bar
|
||||
! default
|
||||
default
|
||||
! foo X Y
|
||||
! X
|
||||
X
|
||||
! Y
|
||||
Y
|
||||
! bar
|
||||
bar
|
||||
! default
|
||||
default
|
||||
! foo
|
||||
! a
|
||||
a
|
||||
! b
|
||||
b
|
||||
! bar
|
||||
bar
|
||||
! default
|
||||
default
|
||||
! foo bar=cat default=dog
|
||||
! cat
|
||||
cat
|
||||
! dog
|
||||
dog
|
||||
! bar
|
||||
bar
|
||||
! default
|
||||
default
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
! .MACRO foo bar
|
||||
! HI
|
||||
! HI \bar
|
||||
! HI
|
||||
! .ENDM
|
||||
!
|
||||
|
||||
! foo 1
|
||||
! HI
|
||||
HI
|
||||
! HI 1
|
||||
HI 1
|
||||
! HI
|
||||
HI
|
||||
! foo 123
|
||||
! HI
|
||||
HI
|
||||
! HI 123
|
||||
HI 123
|
||||
! HI
|
||||
HI
|
||||
! foo 1 2 3 4
|
||||
! foo
|
||||
! HI
|
||||
HI
|
||||
! HI
|
||||
HI
|
||||
! HI
|
||||
HI
|
||||
!
|
||||
|
||||
!
|
||||
! .MACRO PUSH Rn
|
||||
! MOV.L \Rn,@-r15
|
||||
! .ENDM
|
||||
! PUSH R0
|
||||
! MOV.L R0,@-r15
|
||||
MOV.L R0,@-r15
|
||||
! PUSH R1
|
||||
! MOV.L R1,@-r15
|
||||
MOV.L R1,@-r15
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
! .MACRO RES_STR STR, Rn
|
||||
! MOV.L #str\@,\Rn
|
||||
! BRA end_str\@
|
||||
! NOP
|
||||
!str\@ .SDATA "\STR"
|
||||
! .ALIGN 2
|
||||
!end_str\@
|
||||
! .ENDM
|
||||
!
|
||||
! RES_STR "ONE",R0
|
||||
! MOV.L #str18,R0
|
||||
MOV.L #str18,R0
|
||||
! BRA end_str18
|
||||
BRA end_str18
|
||||
! NOP
|
||||
NOP
|
||||
!str18 .SDATA "ONE"
|
||||
str18: .byte 79,78,69
|
||||
! .ALIGN 2
|
||||
.align 2
|
||||
!end_str18
|
||||
end_str18:
|
||||
! RES_STR "TWO",R1
|
||||
! MOV.L #str19,R1
|
||||
MOV.L #str19,R1
|
||||
! BRA end_str19
|
||||
BRA end_str19
|
||||
! NOP
|
||||
NOP
|
||||
!str19 .SDATA "TWO"
|
||||
str19: .byte 84,87,79
|
||||
! .ALIGN 2
|
||||
.align 2
|
||||
!end_str19
|
||||
end_str19:
|
||||
! RES_STR "THREE",R2
|
||||
! MOV.L #str20,R2
|
||||
MOV.L #str20,R2
|
||||
! BRA end_str20
|
||||
BRA end_str20
|
||||
! NOP
|
||||
NOP
|
||||
!str20 .SDATA "THREE"
|
||||
str20: .byte 84,72,82,69,69
|
||||
! .ALIGN 2
|
||||
.align 2
|
||||
!end_str20
|
||||
end_str20:
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
! RES_STR STR=donkey Rn=R1
|
||||
! MOV.L #str21,R1
|
||||
MOV.L #str21,R1
|
||||
! BRA end_str21
|
||||
BRA end_str21
|
||||
! NOP
|
||||
NOP
|
||||
!str21 .SDATA "donkey"
|
||||
str21: .byte 100,111,110,107,101,121
|
||||
! .ALIGN 2
|
||||
.align 2
|
||||
!end_str21
|
||||
end_str21:
|
||||
! RES_STR donkey,R1
|
||||
! MOV.L #str22,R1
|
||||
MOV.L #str22,R1
|
||||
! BRA end_str22
|
||||
BRA end_str22
|
||||
! NOP
|
||||
NOP
|
||||
!str22 .SDATA "donkey"
|
||||
str22: .byte 100,111,110,107,101,121
|
||||
! .ALIGN 2
|
||||
.align 2
|
||||
!end_str22
|
||||
end_str22:
|
||||
! RES_STR donkey Rn=R1
|
||||
! MOV.L #str23,R1
|
||||
MOV.L #str23,R1
|
||||
! BRA end_str23
|
||||
BRA end_str23
|
||||
! NOP
|
||||
NOP
|
||||
!str23 .SDATA "donkey"
|
||||
str23: .byte 100,111,110,107,101,121
|
||||
! .ALIGN 2
|
||||
.align 2
|
||||
!end_str23
|
||||
end_str23:
|
||||
! .END
|
@ -1,47 +0,0 @@
|
||||
|
||||
.MACRO HI
|
||||
A
|
||||
\! this is hidden
|
||||
B
|
||||
! this is not
|
||||
C
|
||||
.ENDM
|
||||
Hello
|
||||
HI
|
||||
Emily
|
||||
|
||||
|
||||
H'0f
|
||||
200+H'0F
|
||||
|
||||
XX .ASSIGNA Q'100
|
||||
! Definition:
|
||||
.MACRO GET X=100,Y,Z
|
||||
MOV #\X+H'0F,@B
|
||||
\Y
|
||||
\Z JMP @MAIN
|
||||
L\@ ADD #1,@HL
|
||||
MOV #0,@C \! Clear C
|
||||
ADD #2,@C
|
||||
ADD #\&XX, @C
|
||||
.ENDM
|
||||
|
||||
NOP
|
||||
|
||||
!Call:
|
||||
GET 200,"ADD #1,@B", ENTRY
|
||||
.END
|
||||
|
||||
; Definition:
|
||||
|
||||
|
||||
NOP
|
||||
|
||||
;Call:
|
||||
MOV #200+0F,@B
|
||||
ADD #1,@B
|
||||
ENTRY: JMP @MAIN
|
||||
L00000: ADD #1,@HL
|
||||
MOV #0,@C
|
||||
ADD #2,@C
|
||||
ADD #0, @C
|
@ -1,68 +0,0 @@
|
||||
!
|
||||
|
||||
! .MACRO HI
|
||||
! A
|
||||
! \! this is hidden
|
||||
! B
|
||||
! ! this is not
|
||||
! C
|
||||
! .ENDM
|
||||
! Hello
|
||||
Hello
|
||||
! HI
|
||||
! A
|
||||
A
|
||||
!
|
||||
! B
|
||||
B
|
||||
! ! this is not
|
||||
! this is not
|
||||
! C
|
||||
C
|
||||
! Emily
|
||||
Emily
|
||||
!
|
||||
!
|
||||
|
||||
! H'0f
|
||||
15
|
||||
! 200+H'0F
|
||||
200+15
|
||||
!
|
||||
|
||||
!XX .ASSIGNA Q'100
|
||||
!! Definition:
|
||||
! Definition:
|
||||
! .MACRO GET X=100,Y,Z
|
||||
! MOV #\X+H'0F,@B
|
||||
! \Y
|
||||
!\Z JMP @MAIN
|
||||
!L\@ ADD #1,@HL
|
||||
! MOV #0,@C \! Clear C
|
||||
! ADD #2,@C
|
||||
! ADD #\&XX, @C
|
||||
! .ENDM
|
||||
!
|
||||
|
||||
! NOP
|
||||
NOP
|
||||
!
|
||||
|
||||
!!Call:
|
||||
!Call:
|
||||
! GET 200,"ADD #1,@B", ENTRY
|
||||
! MOV #200+H'0F,@B
|
||||
MOV #200+15,@B
|
||||
! ADD #1,@B
|
||||
ADD #1,@B
|
||||
!ENTRY JMP @MAIN
|
||||
ENTRY: JMP @MAIN
|
||||
!L1 ADD #1,@HL
|
||||
L1: ADD #1,@HL
|
||||
! MOV #0,@C
|
||||
MOV #0,@C
|
||||
! ADD #2,@C
|
||||
ADD #2,@C
|
||||
! ADD #\&XX, @C
|
||||
ADD #64, @C
|
||||
! .END
|
@ -1,5 +0,0 @@
|
||||
embed macro label
|
||||
addr&&label dc.l label
|
||||
endm
|
||||
|
||||
embed foo
|
@ -1,9 +0,0 @@
|
||||
;embed macro label
|
||||
;addr&&label dc.l label
|
||||
; endm
|
||||
;
|
||||
|
||||
; embed foo
|
||||
;addrfoo dc.l foo
|
||||
addrfoo: dc.l foo
|
||||
;
|
@ -1,10 +0,0 @@
|
||||
exists macro arg1,arg2
|
||||
ifne ==arg2
|
||||
move arg1,arg2
|
||||
elsec
|
||||
push arg1
|
||||
endc
|
||||
endm
|
||||
|
||||
exists foo,bar
|
||||
exists foo
|
@ -1,24 +0,0 @@
|
||||
;exists macro arg1,arg2
|
||||
; ifne ==arg2
|
||||
; move arg1,arg2
|
||||
; elsec
|
||||
; push arg1
|
||||
; endc
|
||||
; endm
|
||||
;
|
||||
|
||||
; exists foo,bar
|
||||
; ifne -1
|
||||
; move foo,bar
|
||||
move foo,bar
|
||||
; elsec
|
||||
; push foo
|
||||
; endc
|
||||
; exists foo
|
||||
; ifne 0
|
||||
; move foo,
|
||||
; elsec
|
||||
; push foo
|
||||
push foo
|
||||
; endc
|
||||
;
|
@ -1,4 +0,0 @@
|
||||
irp param,arg1,arg2,arg3
|
||||
dc.l param
|
||||
endr
|
||||
end quit
|
@ -1,8 +0,0 @@
|
||||
; irp param,arg1,arg2,arg3
|
||||
; dc.l param
|
||||
; endr
|
||||
dc.l arg1
|
||||
dc.l arg2
|
||||
dc.l arg3
|
||||
; end quit
|
||||
end quit
|
@ -1,3 +0,0 @@
|
||||
irpc dummy,1234
|
||||
dc.l dummy
|
||||
endr
|
@ -1,8 +0,0 @@
|
||||
; irpc dummy,1234
|
||||
; dc.l dummy
|
||||
; endr
|
||||
dc.l 1
|
||||
dc.l 2
|
||||
dc.l 3
|
||||
dc.l 4
|
||||
;
|
@ -1,8 +0,0 @@
|
||||
get macro arg1,arg2,arg3
|
||||
dc.l arg1
|
||||
arg2
|
||||
arg3 dc.l \4
|
||||
move.\0 d0,d1
|
||||
endm
|
||||
|
||||
get.b 1,<dc.l 2>,label,four
|
@ -1,18 +0,0 @@
|
||||
;get macro arg1,arg2,arg3
|
||||
; dc.l arg1
|
||||
; arg2
|
||||
;arg3 dc.l \4
|
||||
; move.\0 d0,d1
|
||||
; endm
|
||||
;
|
||||
|
||||
; get.b 1,<dc.l 2>,label,four
|
||||
; dc.l 1
|
||||
dc.l 1
|
||||
; dc.l 2
|
||||
dc.l 2
|
||||
;label dc.l four
|
||||
label: dc.l four
|
||||
; move.b d0,d1
|
||||
move.b d0,d1
|
||||
;
|
@ -1,9 +0,0 @@
|
||||
loop macro arg1,arg2,arg3
|
||||
dc.l NARG
|
||||
ifne NARG
|
||||
dc.l arg1
|
||||
loop arg2,arg3
|
||||
endc
|
||||
endm
|
||||
|
||||
loop 1,2,3
|
@ -1,38 +0,0 @@
|
||||
;loop macro arg1,arg2,arg3
|
||||
; dc.l NARG
|
||||
; ifne NARG
|
||||
; dc.l arg1
|
||||
; loop arg2,arg3
|
||||
; endc
|
||||
; endm
|
||||
;
|
||||
|
||||
; loop 1,2,3
|
||||
; dc.l 3
|
||||
dc.l 3
|
||||
; ifne 3
|
||||
; dc.l 1
|
||||
dc.l 1
|
||||
; loop 2,3
|
||||
; dc.l 2
|
||||
dc.l 2
|
||||
; ifne 2
|
||||
; dc.l 2
|
||||
dc.l 2
|
||||
; loop 3,
|
||||
; dc.l 1
|
||||
dc.l 1
|
||||
; ifne 1
|
||||
; dc.l 3
|
||||
dc.l 3
|
||||
; loop ,
|
||||
; dc.l 0
|
||||
dc.l 0
|
||||
; ifne 0
|
||||
; dc.l
|
||||
; loop ,
|
||||
; endc
|
||||
; endc
|
||||
; endc
|
||||
; endc
|
||||
;
|
@ -1,3 +0,0 @@
|
||||
rept 3
|
||||
dc.l 1
|
||||
endr
|
@ -1,16 +0,0 @@
|
||||
; rept 3
|
||||
; dc.l 1
|
||||
; endr
|
||||
; dc.l 1
|
||||
dc.l 1
|
||||
; REPT 2
|
||||
; dc.l 1
|
||||
; ENDR
|
||||
; dc.l 1
|
||||
dc.l 1
|
||||
; REPT 1
|
||||
; dc.l 1
|
||||
; ENDR
|
||||
; dc.l 1
|
||||
dc.l 1
|
||||
;
|
@ -1,20 +0,0 @@
|
||||
|
||||
.ALTERNATE
|
||||
|
||||
alloc MACRO val1,val2
|
||||
DB val1
|
||||
DB val2
|
||||
ENDM
|
||||
|
||||
alloc "that's" 'show biz'
|
||||
alloc 0,1
|
||||
alloc 0 1
|
||||
alloc 0 1
|
||||
alloc ,1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
END missing from end of file.
|
@ -1,49 +0,0 @@
|
||||
!
|
||||
! .ALTERNATE
|
||||
!
|
||||
|
||||
!alloc MACRO val1,val2
|
||||
! DB val1
|
||||
! DB val2
|
||||
! ENDM
|
||||
!
|
||||
|
||||
! alloc "that's" 'show biz'
|
||||
! DB "that's"
|
||||
.byte 116,104,97,116,39,115
|
||||
! DB "show biz"
|
||||
.byte 115,104,111,119,32,98,105,122
|
||||
! alloc 0,1
|
||||
! DB 0
|
||||
.byte 0
|
||||
! DB 1
|
||||
.byte 1
|
||||
! alloc 0 1
|
||||
! DB 0
|
||||
.byte 0
|
||||
! DB 1
|
||||
.byte 1
|
||||
! alloc 0 1
|
||||
! DB 0
|
||||
.byte 0
|
||||
! DB 1
|
||||
.byte 1
|
||||
! alloc ,1
|
||||
! DB
|
||||
.byte
|
||||
! DB 1
|
||||
.byte 1
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!
|
@ -1,28 +0,0 @@
|
||||
|
||||
|
||||
.ALTERNATE
|
||||
|
||||
! ok
|
||||
!! also ok
|
||||
|
||||
foo MACRO
|
||||
! you can see me
|
||||
!! but not me
|
||||
! you can see me
|
||||
!! but not me
|
||||
but this "SHOULD !!BE OK"
|
||||
ENDM
|
||||
|
||||
foo
|
||||
|
||||
|
||||
define MACRO val1,val2
|
||||
DB val1 ! this comment will show up
|
||||
DB val2 !! this on won't
|
||||
ENDM
|
||||
|
||||
define 0,1
|
||||
|
||||
|
||||
END
|
||||
|
@ -1,51 +0,0 @@
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
! .ALTERNATE
|
||||
!
|
||||
|
||||
! ! ok
|
||||
! ok
|
||||
! !! also ok
|
||||
!! also ok
|
||||
!
|
||||
|
||||
!foo MACRO
|
||||
! ! you can see me
|
||||
! !! but not me
|
||||
! ! you can see me
|
||||
! !! but not me
|
||||
! but this "SHOULD !!BE OK"
|
||||
! ENDM
|
||||
!
|
||||
|
||||
! foo
|
||||
! ! you can see me
|
||||
! you can see me
|
||||
!
|
||||
! ! you can see me
|
||||
! you can see me
|
||||
!
|
||||
! but this "SHOULD !!BE OK"
|
||||
but this "SHOULD !!BE OK"
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!define MACRO val1,val2
|
||||
! DB val1 ! this comment will show up
|
||||
! DB val2 !! this on won't
|
||||
! ENDM
|
||||
!
|
||||
|
||||
! define 0,1
|
||||
! DB 0 ! this comment will show up
|
||||
.byte 0! this comment will show up
|
||||
! DB 1
|
||||
.byte 1
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
! END
|
@ -1,30 +0,0 @@
|
||||
.ALTERNATE
|
||||
|
||||
foo MACRO string
|
||||
LOCAL lab1, lab2
|
||||
lab1: DATA.L lab2
|
||||
lab2: SDATA string
|
||||
ENDM
|
||||
|
||||
foo "An example"
|
||||
foo "using LOCAL"
|
||||
|
||||
! test of LOCAL directive
|
||||
|
||||
chk_err MACRO limit
|
||||
LOCAL skip !! frob
|
||||
LOCAL zap,dog,barf
|
||||
barf: cmp ax,limit !! check value against
|
||||
!! limit
|
||||
jle skip !! skip call if OK
|
||||
skip: call error
|
||||
foo dog
|
||||
zap dog
|
||||
nop
|
||||
ENDM
|
||||
|
||||
chk_err 5
|
||||
chk_err 10
|
||||
|
||||
|
||||
END
|
@ -1,86 +0,0 @@
|
||||
! .ALTERNATE
|
||||
!
|
||||
|
||||
!foo MACRO string
|
||||
! LOCAL lab1, lab2
|
||||
!lab1: DATA.L lab2
|
||||
!lab2: SDATA string
|
||||
! ENDM
|
||||
!
|
||||
|
||||
! foo "An example"
|
||||
!
|
||||
!LL0001: DATA.L LL0002
|
||||
LL0001: .long LL0002
|
||||
!LL0002: SDATA "An example"
|
||||
LL0002: .byte 65,110,32,101,120,97,109,112,108,101
|
||||
! foo "using LOCAL"
|
||||
!
|
||||
!LL0003: DATA.L LL0004
|
||||
LL0003: .long LL0004
|
||||
!LL0004: SDATA "using LOCAL"
|
||||
LL0004: .byte 117,115,105,110,103,32,76,79,67,65,76
|
||||
!
|
||||
|
||||
!! test of LOCAL directive
|
||||
! test of LOCAL directive
|
||||
!
|
||||
|
||||
!chk_err MACRO limit
|
||||
! LOCAL skip !! frob
|
||||
! LOCAL zap,dog,barf
|
||||
!barf: cmp ax,limit !! check value against
|
||||
! !! limit
|
||||
! jle skip !! skip call if OK
|
||||
!skip: call error
|
||||
! foo dog
|
||||
! zap dog
|
||||
! nop
|
||||
! ENDM
|
||||
!
|
||||
|
||||
! chk_err 5
|
||||
!
|
||||
!
|
||||
!LL0008: cmp ax,5
|
||||
LL0008: cmp ax,5
|
||||
!
|
||||
! jle LL0005
|
||||
jle LL0005
|
||||
!LL0005: call error
|
||||
LL0005: call error
|
||||
! foo LL0007
|
||||
!
|
||||
!LL0009: DATA.L LL000a
|
||||
LL0009: .long LL000a
|
||||
!LL000a: SDATA LL0007
|
||||
LL000a: .byte 76,76,48,48,48,55
|
||||
! LL0006 LL0007
|
||||
LL0006 LL0007
|
||||
! nop
|
||||
nop
|
||||
! chk_err 10
|
||||
!
|
||||
!
|
||||
!LL000e: cmp ax,10
|
||||
LL000e: cmp ax,10
|
||||
!
|
||||
! jle LL000b
|
||||
jle LL000b
|
||||
!LL000b: call error
|
||||
LL000b: call error
|
||||
! foo LL000d
|
||||
!
|
||||
!LL000f: DATA.L LL0010
|
||||
LL000f: .long LL0010
|
||||
!LL0010: SDATA LL000d
|
||||
LL0010: .byte 76,76,48,48,48,100
|
||||
! LL000c LL000d
|
||||
LL000c LL000d
|
||||
! nop
|
||||
nop
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
! END
|
@ -1,10 +0,0 @@
|
||||
.ALTERNATE
|
||||
! test of macro substitution around &s
|
||||
|
||||
|
||||
foo MACRO a,b
|
||||
x&a&b
|
||||
ENDM
|
||||
|
||||
foo 3 2
|
||||
END
|
@ -1,16 +0,0 @@
|
||||
! .ALTERNATE
|
||||
!! test of macro substitution around &s
|
||||
! test of macro substitution around &s
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!foo MACRO a,b
|
||||
! x&a&b
|
||||
! ENDM
|
||||
!
|
||||
|
||||
! foo 3 2
|
||||
! x32
|
||||
x32
|
||||
! END
|
@ -1,15 +0,0 @@
|
||||
! test of literal text operator
|
||||
.ALTERNATE
|
||||
foop MACRO str1,str2
|
||||
SDATA "str1"
|
||||
SDATA str2
|
||||
ENDM
|
||||
|
||||
|
||||
|
||||
foop this< is a <string> with angle brackets>
|
||||
foop this< is a string with spaces>
|
||||
foop this < is a string with a !>>
|
||||
|
||||
|
||||
END
|
@ -1,32 +0,0 @@
|
||||
!! test of literal text operator
|
||||
! test of literal text operator
|
||||
! .ALTERNATE
|
||||
!foop MACRO str1,str2
|
||||
! SDATA "str1"
|
||||
! SDATA str2
|
||||
! ENDM
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!
|
||||
! foop this< is a <string> with angle brackets>
|
||||
! SDATA "this"
|
||||
.byte 116,104,105,115
|
||||
! SDATA " is a <string> with angle brackets"
|
||||
.byte 32,105,115,32,97,32,60,115,116,114,105,110,103,62,32,119,105,116,104,32,97,110,103,108,101,32,98,114,97,99,107,101,116,115
|
||||
! foop this< is a string with spaces>
|
||||
! SDATA "this"
|
||||
.byte 116,104,105,115
|
||||
! SDATA " is a string with spaces"
|
||||
.byte 32,105,115,32,97,32,115,116,114,105,110,103,32,119,105,116,104,32,115,112,97,99,101,115
|
||||
! foop this < is a string with a !>>
|
||||
! SDATA "this"
|
||||
.byte 116,104,105,115
|
||||
! SDATA " is a string with a >"
|
||||
.byte 32,105,115,32,97,32,115,116,114,105,110,103,32,119,105,116,104,32,97,32,62
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
! END
|
@ -1,21 +0,0 @@
|
||||
.ALTERNATE
|
||||
! test of expression operator
|
||||
define MACRO val, string
|
||||
SDATA val
|
||||
SDATA string
|
||||
ENDM
|
||||
define "1","99%of100" ! notice % within string
|
||||
define %1 + 2, "=3"
|
||||
|
||||
|
||||
define % 1 + 2 %3+4
|
||||
|
||||
define %3*4-2 <=10>
|
||||
|
||||
define %3*4-2 5
|
||||
|
||||
define %1 + 2,<is equal to %1 + 2, right?>
|
||||
|
||||
! has no effect
|
||||
|
||||
end
|
@ -1,54 +0,0 @@
|
||||
! .ALTERNATE
|
||||
!! test of expression operator
|
||||
! test of expression operator
|
||||
!define MACRO val, string
|
||||
! SDATA val
|
||||
! SDATA string
|
||||
! ENDM
|
||||
! define "1","99%of100" ! notice % within string
|
||||
! SDATA "1"
|
||||
.byte 49
|
||||
! SDATA "99%of100"
|
||||
.byte 57,57,37,111,102,49,48,48
|
||||
! define %1 + 2, "=3"
|
||||
! SDATA 3
|
||||
.byte 51
|
||||
! SDATA "=3"
|
||||
.byte 61,51
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
! define % 1 + 2 %3+4
|
||||
! SDATA 3
|
||||
.byte 51
|
||||
! SDATA 7
|
||||
.byte 55
|
||||
!
|
||||
|
||||
! define %3*4-2 <=10>
|
||||
! SDATA 10
|
||||
.byte 49,48
|
||||
! SDATA "=10"
|
||||
.byte 61,49,48
|
||||
!
|
||||
|
||||
! define %3*4-2 5
|
||||
! SDATA 10
|
||||
.byte 49,48
|
||||
! SDATA 5
|
||||
.byte 53
|
||||
!
|
||||
|
||||
! define %1 + 2,<is equal to %1 + 2, right?>
|
||||
! SDATA 3
|
||||
.byte 51
|
||||
! SDATA "is equal to %1 + 2, right?"
|
||||
.byte 105,115,32,101,113,117,97,108,32,116,111,32,37,49,32,43,32,50,44,32,114,105,103,104,116,63
|
||||
!
|
||||
|
||||
! ! has no effect
|
||||
! has no effect
|
||||
!
|
||||
|
||||
! end
|
@ -1,12 +0,0 @@
|
||||
.ALTERNATE
|
||||
! test of string operators
|
||||
define MACRO str1,str2
|
||||
SDATA str1
|
||||
SDATA "str2"
|
||||
ENDM
|
||||
define one" way to get "spaces,0
|
||||
define "lot's! of <special>,chars%", 0
|
||||
|
||||
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
END missing from end of file.
|
@ -1,26 +0,0 @@
|
||||
! .ALTERNATE
|
||||
!! test of string operators
|
||||
! test of string operators
|
||||
!define MACRO str1,str2
|
||||
! SDATA str1
|
||||
! SDATA "str2"
|
||||
!ENDM
|
||||
! define one" way to get "spaces,0
|
||||
! SDATA one" way to get "spaces
|
||||
.byte 111,110,101,34,32,119,97,121,32,116,111,32,103,101,116,32,34,115,112,97,99,101,115
|
||||
! SDATA "0"
|
||||
.byte 48
|
||||
! define "lot's! of <special>,chars%", 0
|
||||
! SDATA "lot's of <special>,chars%"
|
||||
.byte 108,111,116,39,115,32,111,102,32,60,115,112,101,99,105,97,108,62,44,99,104,97,114,115,37
|
||||
! SDATA "0"
|
||||
.byte 48
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!
|
@ -1,18 +0,0 @@
|
||||
|
||||
.ALTERNATE
|
||||
SDATA %1+2+3
|
||||
SDATA "5"
|
||||
|
||||
|
||||
|
||||
MACRO foo
|
||||
SDATA "HI" !! this will go
|
||||
SDATA "THERE ! this will stay
|
||||
ENDM
|
||||
|
||||
foo
|
||||
|
||||
|
||||
SDATA <!<this is <a wacky> example!>!!>
|
||||
SDATA "<this is <a wacky> example>!"
|
||||
END
|
@ -1,33 +0,0 @@
|
||||
!
|
||||
|
||||
! .ALTERNATE
|
||||
! SDATA %1+2+3
|
||||
.byte 37,49,43,50,43,51,32
|
||||
! SDATA "5"
|
||||
.byte 53
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
! MACRO foo
|
||||
! SDATA "HI" !! this will go
|
||||
! SDATA "THERE ! this will stay
|
||||
! ENDM
|
||||
!
|
||||
|
||||
! foo
|
||||
! SDATA "HI"
|
||||
.byte 72,73
|
||||
! SDATA "THERE ! this will stay
|
||||
.byte 84,72,69,82,69,9,32,116,104,105,115,32,119,105,108,108,32,115,116,97,121
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
! SDATA <!<this is <a wacky> example!>!!>
|
||||
.byte 60,116,104,105,115,32,105,115,32,60,97,32,119,97,99,107,121,62,32,101,120,97,109,112,108,101,62,33
|
||||
! SDATA "<this is <a wacky> example>!"
|
||||
.byte 60,116,104,105,115,32,105,115,32,60,97,32,119,97,99,107,121,62,32,101,120,97,109,112,108,101,62,34
|
||||
! END
|
@ -1,3 +0,0 @@
|
||||
|
||||
.sdata "v1.0000"
|
||||
.end
|
@ -1,5 +0,0 @@
|
||||
!
|
||||
|
||||
! .sdata "v1.0000"
|
||||
.byte 118,49,46,48,48,48,48
|
||||
! .end
|
@ -1,9 +0,0 @@
|
||||
|
||||
|
||||
foo .REG (r1)
|
||||
add foo,foo
|
||||
|
||||
bar .reg (r2)
|
||||
add bar,foo
|
||||
|
||||
.END
|
@ -1,15 +0,0 @@
|
||||
!
|
||||
|
||||
!
|
||||
|
||||
!foo .REG (r1)
|
||||
! add foo,foo
|
||||
add r1,r1
|
||||
!
|
||||
|
||||
!bar .reg (r2)
|
||||
! add bar,foo
|
||||
add r2,r1
|
||||
!
|
||||
|
||||
! .END
|
@ -1,13 +0,0 @@
|
||||
.AREPEAT 5
|
||||
FIVE
|
||||
.AREPEAT 2
|
||||
TWO
|
||||
.AENDR
|
||||
.AREPEAT 3
|
||||
THREE
|
||||
.AREPEAT 2
|
||||
TWO
|
||||
.AENDR
|
||||
.AENDR
|
||||
.AENDR
|
||||
.END
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user