Browse Source

+ added segment _null, belonging to group dgroup and class BEGDATA with the
hexadecimal pattern 01 in order to help catch storing data at location 0
(this is compatible with Open Watcom's C library)

git-svn-id: trunk@26866 -

nickysn 11 years ago
parent
commit
2fd09437e9
1 changed files with 10 additions and 1 deletions
  1. 10 1
      rtl/msdos/prt0stm.asm

+ 10 - 1
rtl/msdos/prt0stm.asm

@@ -370,6 +370,15 @@ not_enough_mem_msg:
         segment bss class=bss
         segment bss class=bss
 
 
 %ifndef __TINY__
 %ifndef __TINY__
+        segment _NULL class=BEGDATA
+        global __nullarea
+__nullarea:
+        dd 01010101h, 01010101h, 01010101h, 01010101h
+        dd 01010101h, 01010101h, 01010101h, 01010101h
+
+        segment _AFTERNULL class=BEGDATA
+        dw 0
+
         segment stack stack class=stack
         segment stack stack class=stack
         resb 256
         resb 256
         stacktop:
         stacktop:
@@ -378,5 +387,5 @@ not_enough_mem_msg:
 %ifdef __TINY__
 %ifdef __TINY__
         group dgroup text data bss
         group dgroup text data bss
 %else
 %else
-        group dgroup data bss stack
+        group dgroup _NULL _AFTERNULL data bss stack
 %endif
 %endif