* sim/ucsim/cmd.src/newcmd.cc: #include <ctype.h>
[fw/sdcc] / src / asm.c
index 6fc273a5f773ee8b79fe9f881450978cc522da37..9b75aac1cc05089de88e8f7a93a642bf2875da19 100644 (file)
--- a/src/asm.c
+++ b/src/asm.c
@@ -259,6 +259,7 @@ printILine (iCode *ic)
   static char verbalICode[1024];
   FILE *tmpFile;
   iCodeTable *icTab=getTableEntry(ic->op);
+  int ret;
 
   if (INLINEASM == ic->op)
     return "inline";
@@ -281,7 +282,8 @@ printILine (iCode *ic)
    * Actually the temporary file is only closed. It will be
    * removed by rm_tmpfiles().
    */
-  assert(!fclose(tmpFile));
+  ret = fclose(tmpFile);
+  assert(!ret);
   deleteSetItem(&tmpfileSet, tmpFile);
 
   /* kill the trailing NL */
@@ -388,6 +390,7 @@ static const ASM_MAPPING _asxxxx_mapping[] =
   {"hihil","(%05d$ >> 16)"},
   {"hihihil","(%05d$ >> 24)"},
   {"equ","="},
+  {"org", ".org 0x%04X"},
   {NULL, NULL}
 };
 
@@ -480,6 +483,7 @@ static const ASM_MAPPING _a390_mapping[] =
   {"hihil","((L%05d / 65536) & 0FFh)"},
   {"hihihil","((L%09d / 16777216) & 0FFh)"},
   {"equ"," equ"},
+  {"org", ".org 0x%04X"},
   {NULL, NULL}
 };