From 1c5c8d0d0e28c9f79c16c855efc71745aa67d2af Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 20 Sep 2017 13:59:02 +0100 Subject: [PATCH] code6801: use the standard routines for code/data switching This will matter big time with the literal changes --- Applications/SmallC/code6801.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/Applications/SmallC/code6801.c b/Applications/SmallC/code6801.c index ff0b156c..15e9100e 100644 --- a/Applications/SmallC/code6801.c +++ b/Applications/SmallC/code6801.c @@ -34,7 +34,7 @@ void header (void) { newline (); output_line ("\t;program area SMALLC_GENERATED is RELOCATABLE"); output_line ("\t.module SMALLC_GENERATED"); - gen_code(); + code_segment_gtext(); } /** @@ -85,6 +85,7 @@ void trailer(void) { */ void code_segment_gtext(void) { output_line ("\t.text"); + indata = 0; } /** @@ -92,6 +93,7 @@ void code_segment_gtext(void) { */ void data_segment_gdata(void) { output_line ("\t.data"); + indata = 1; } /** @@ -907,14 +909,3 @@ void gen_statement_end(void) output_line(";end"); } -void gen_data(void) -{ - indata = 1; - output_line(".data"); -} - -void gen_code(void) -{ - indata = 0; - output_line(".code"); -} -- 2.34.1