# HG changeset patch # User lost@l-w.ca # Date 1281332836 21600 # Node ID acaafc70044b2730a319cef458c9fd363453a2bc # Parent cba03436c7207445e48fdc38f9189a671e53f1df Fixed "=" pseudo op to work correctly diff -r cba03436c720 -r acaafc70044b extra/README --- a/extra/README Mon Aug 02 18:07:04 2010 -0600 +++ b/extra/README Sun Aug 08 23:47:16 2010 -0600 @@ -28,16 +28,12 @@ You should probably name them m6809-unknown-none-{ar,as,ld} or similar depending on your gcc build target. Then you'll want to get the gcc6809 -patch and patch the correct gcc source code. Then use a configure line -similar to the following: +patch and patch the correct gcc source code. You probably want to add +m6809-unknown-none-ranlib as a symblink to /bin/true, too. -configure --enable-languages=c --target=m6809-coco ---program-prefix=m6809-coco-lwos- --enable-obsolete ---srcdir=/home/lost/gcc6809/src/gcc-4.3.3 --disable-threads --disable-nls ---disable-libssp --prefix=/usr/local/coco --with-as=/usr/local/coco/bin/as ---with-ld=/usr/local/coco/bin/ld --with-sysroot=/usr/local/coco - -Obviously adjust various paths to match what you're doing. +Then, you can skip the bits in the install instructions that install +"binutils" and so on. A simple "make" in the "build-6809" directory should +do. At least it does with gcc6809-4.3.4-3. The exact mechanics of configuring and getting gcc to install correctly is -left as an exercise to the dedicated masochist. +left as an exercise to the dedicated masochist. \ No newline at end of file diff -r cba03436c720 -r acaafc70044b lwasm/pass1.c --- a/lwasm/pass1.c Mon Aug 02 18:07:04 2010 -0600 +++ b/lwasm/pass1.c Sun Aug 08 23:47:16 2010 -0600 @@ -185,10 +185,10 @@ } // find the end of the first token - for (tok = p1; *p1 && !isspace(*p1) && *p1 != ':'; p1++) + for (tok = p1; *p1 && !isspace(*p1) && *p1 != ':' && *p1 != '='; p1++) /* do nothing */ ; - if (*p1 == ':' || stspace == 0) + if (*p1 == ':' || *p1 == '=' || stspace == 0) { // have a symbol here sym = lw_strndup(tok, p1 - tok); @@ -197,8 +197,15 @@ for (; *p1 && isspace(*p1); p1++) /* do nothing */ ; - for (tok = p1; *p1 && !isspace(*p1); p1++) - /* do nothing */ ; + if (*p1 == '=') + { + tok = p1++; + } + else + { + for (tok = p1; *p1 && !isspace(*p1); p1++) + /* do nothing */ ; + } } if (sym) cl -> sym = lw_strdup(sym);