Cleaned references to machine()
authorjtvolpe <jtvolpe@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 19 Apr 2001 03:10:46 +0000 (03:10 +0000)
committerjtvolpe <jtvolpe@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Thu, 19 Apr 2001 03:10:46 +0000 (03:10 +0000)
Cleaned up MSVC stuff
Removed unused local variable (asexpr.c)

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@738 4a8a32a2-be11-0410-ad9d-d568d2c75423

as/z80/asexpr.c
as/z80/aslex.c
as/z80/aslist.c
as/z80/asm.h
as/z80/asmain.c
as/z80/asout.c
as/z80/assubr.c
as/z80/assym.c
as/z80/z80.h

index 2e2a123e82c7f1a7ca2a5d334b0d3e2b81349288..e6fa421c69b3eda4a5102576711d2b622d1bf179 100644 (file)
 #include <setjmp.h>
 #include <string.h>
 
-//#if !defined(_MSC_VER)
-//#include <alloc.h>
-//#endif
-
 #include "asm.h"
 
 /*)Module      asexpr.c
@@ -88,7 +84,7 @@ expr(esp, n)
 register struct expr *esp;
 int n;
 {
-        register int c, d, p;
+        register int c, p;
         struct area *ap;
         struct expr re;
 
@@ -299,7 +295,7 @@ register struct expr *esp;
         if (c == '-') {
                 expr(esp, 100);
                 abscheck(esp);
-                esp->e_addr = -esp->e_addr;
+                esp->e_addr = 0 - esp->e_addr;
                 return;
         }
         if (c == '~') {
index 2713ff8df26d262c9863ca13b05aade9c5cf13da..9eab59a49bdc0156f6b10dd4348f3279d0bd0a16 100644 (file)
 #include <setjmp.h>
 #include <string.h>
 
-//#if !defined(_MSC_VER)
-//#include <alloc.h>
-//#endif
-
 #include "asm.h"
 
 /*)Module      aslex.c
index e3a12b3e1192ed1a4515b1abadf2ead2e09b5a47..1f57b8903e2f21f87cff52a0bf7febb1ee10a412 100644 (file)
 #include <string.h>
 #include <malloc.h>
 
-//#include "newalloc.h"
-//#if defined(_MSC_VER)
-//#include <malloc.h>
-//#else
-//#include <alloc.h>
-//#endif
-
 #include "asm.h"
 
 /*)Module      aslist.c
index 734aaa20c1fef04a86ca311f734cd6fdf650a7c7..7d9ea7a996414ae5fb641efaf3795c8434853aea 100644 (file)
@@ -594,6 +594,5 @@ extern      struct  mne     mne[];
 
 /* Machine dependent functions */
 
-extern VOID            machin();
 extern VOID            minit();
 
index 5f6d6a1ca399b4c002755d479e7d7766af95af92..9096bbf7f28bc794f0fd5bd339b2125428c00e19 100644 (file)
 #include <setjmp.h>
 #include <string.h>
 
-//#if !defined(_MSC_VER)
-//#include <alloc.h>
-//#endif
-
 #ifdef SDK
 #include <stdlib.h>
 #include <math.h>
 #undef HUGE
 #endif
 #include "asm.h"
+#include "z80.h"
 
 /*)Module      asmain.c
  *
@@ -446,7 +443,7 @@ int i;
  *             char    getnb()         aslex.c
  *             VOID    getst()         aslex.c
  *             sym *   lookup()        assym.c
- *             VOID    machin()        ___mch.c
+ *             VOID    machine()       ___mch.c
  *             mne *   mlookup()       assym.c
  *             int     more()          aslex.c
  *             VOID *  new()           assym.c
@@ -759,9 +756,9 @@ loop:
                          {
                                  
                                  f2 = floor(log(fabs(f1))/log(2))+1;
-                                 mantissa = (0x1000000*fabs(f1))/exp(f2*log(2));
+                                 mantissa = (unsigned int) ((0x1000000*fabs(f1))/exp(f2*log(2))) ;
                                  mantissa &=0xffffff;
-                                 exponent = f2 + 0x40;
+                                 exponent = (unsigned int) (f2 + 0x40) ;
                                  if (f1<0)
                                      exponent |=0x80;
                          }
index 51b6bb9ad2d29d2f6256a8170ad74b0bf6605091..5396de3ec7278d23b0d763d01599413f8e847bf9 100644 (file)
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
-
-//#if !defined(_MSC_VER)
-//#include <alloc.h>
-//#endif
-
 #include "asm.h"
 
 
index 2150cb45ad5f580d2cc1abdb0046ed08e88f32bb..6423d9fdc01bdf6c7da852b1146e577972b0bf88 100644 (file)
 #include <stdio.h>
 #include <setjmp.h>
 #include <string.h>
-
-//#if !defined(_MSC_VER)
-//#include <alloc.h>
-//#endif
-
 #include "asm.h"
 
 /*)Module      assubr.c
index 3285265f813665a52cde841150f9795cb5e3ee4b..f57f5f994519c5ef33c51b556b5003b57bc3ed4f 100644 (file)
 #include <setjmp.h>
 #include <string.h>
 #include <malloc.h>
-
-//#if defined(_MSC_VER)
-//#include <malloc.h>
-//#else
-//#include <alloc.h>
-//#endif
-
 #include "asm.h"
 
 /*)Module      assym.c
index da163f8d38ee023f2e4612a9b86c785a5c30adb9..82cf3177ac8eb0f6ce81392e35cc72e00fa36373 100644 (file)
@@ -187,6 +187,5 @@ extern      int             srch();
 extern int             comma();
 extern int             genop();
 extern int             gixiy();
-extern VOID            machin();
 extern VOID            minit();
-
+extern VOID            machine(struct mne *mp) ;