diff -ur .\old\compiler\i386/ag386nsm.pas .\new\compiler\i386/ag386nsm.pas
--- .\old\compiler\i386/ag386nsm.pas	Tue Jun 12 18:15:58 2007
+++ .\new\compiler\i386/ag386nsm.pas	Wed Jun 13 10:57:50 2007
@@ -458,7 +458,8 @@
         secnames : array[TAsmSectiontype] of string[17] = ('',
           '.text',
           '.data',
-          '.rodata',
+{$warning TODO .rodata not yet working}
+          '.data',
           '.bss',
           '.tbss',
           '.pdata',
@@ -602,8 +603,9 @@
            ait_section :
              begin
                if tai_section(hp).sectype<>sec_none then
-                 WriteSection(tai_section(hp).sectype,tai_section(hp).name^);
-               LasTSecType:=tai_section(hp).sectype;
+                 WriteSection(tai_section(hp).sectype,tai_section(hp).name^)
+               { also assigned in WriteSection }
+               else LasTSecType:=sec_none;
              end;
 
            ait_align :
@@ -799,6 +801,8 @@
                lines := tai_string(hp).len div line_length;
              { separate lines in different parts }
                if tai_string(hp).len > 0 then
+             { such workaround in a so deep component is problematic }
+(*
                 Begin
                   for j := 0 to lines-1 do
                    begin
@@ -834,12 +838,19 @@
                        AsmWrite(target_info.newline);
                      inc(counter,line_length);
                   end; { end for j:=0 ... }
+*)
                 { do last line of lines }
                 if counter<tai_string(hp).len then
                   AsmWrite(#9#9'DB'#9);
                 quoted:=false;
                 for i:=counter to tai_string(hp).len-1 do
                   begin
+                    if i=counter then
+                        begin
+                          AsmWrite(tostr(ord(tai_string(hp).str[i]))+',"');
+                          quoted:=true;
+                        end
+                    else
                     { it is an ascii character. }
                     if (ord(tai_string(hp).str[i])>31) and
                        (ord(tai_string(hp).str[i])<128) and
@@ -873,7 +884,15 @@
            ait_label :
              begin
                if tai_label(hp).labsym.is_used then
-                AsmWriteLn(tai_label(hp).labsym.name+':');
+                begin
+                  { always be global for read-only section }
+                  if lastsectype=sec_rodata then
+                   begin
+                     AsmWrite(#9'GLOBAL ');
+                     AsmWriteLn(tai_label(hp).labsym.name);
+                   end;
+                  AsmWriteLn(tai_label(hp).labsym.name+':');
+                end;
                if SmartAsm then
                  AddSymbol(tai_label(hp).labsym.name,true);
              end;
