Skip to contentSkip to conversation

Bcc: Force initial .text directive

PATCH New MFLD 1 participant 1 message Apr 11, 2015

lore
Share & tools
lore

MFLD

author
#0 lore raw

PATCH 1/1 Bcc: Force initial .text directive

Hello,

Here is a patch proposal to force the insertion of a .text directive at the beginning of the bcc-cc1 output file. This is because Bcc makes the assumption that the as86 assembler starts with the code segment. This patch prevents the compilation to fail if migrating to another assembler with a different assumption.

MFLD

bcc/codefrag.c +2 -1
index d796810..80bab18 100644
@@ -592,7 +592,8 @@
 
 typedef fastin_t seg_t;        /* range 0..3 */
 
-PRIVATE seg_t segment;        /* current seg, depends on init to CSEG = 0 */
+/* Initialize to -1 to force initial segment directive */
+PRIVATE seg_t segment = -1;        /* current segment */
 
 /* add carry resulting from char addition */