From ccd653ddb91b2ddb1a4985aff7d88f51e71b4a25 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Fri, 14 Jul 2017 19:45:40 -0500 Subject: [PATCH] Move some more code out of the blank segment to make space for static data. --- CGC.asm | 7 ++++--- CGC.pas | 2 +- CGI.pas | 2 +- DAG.pas | 2 +- Header.pas | 2 +- MM.asm | 8 ++++---- MM.pas | 2 ++ Native.asm | 3 ++- Native.pas | 2 +- ObjOut.asm | 15 ++++++++------- ObjOut.pas | 2 +- Scanner.asm | 5 +++-- Scanner.pas | 2 +- 13 files changed, 30 insertions(+), 24 deletions(-) diff --git a/CGC.asm b/CGC.asm index 851bfe6..49a01ef 100644 --- a/CGC.asm +++ b/CGC.asm @@ -8,7 +8,7 @@ * **************************************************************** * -CnvSX start +CnvSX start cg rec equ 4 record containing values rec_real equ 0 disp to real value rec_ext equ 8 disp to extended (SANE) value @@ -42,7 +42,7 @@ rec_ext equ 8 disp to extended (SANE) value * **************************************************************** * -CnvSC start +CnvSC start cg rec equ 4 record containing values rec_real equ 0 disp to real value rec_ext equ 8 disp to extended (SANE) value @@ -85,6 +85,7 @@ rec_cmp equ 18 disp to comp (SANE) value rtl end + datachk off **************************************************************** * * InitLabels - initialize the labels array @@ -95,7 +96,7 @@ rec_cmp equ 18 disp to comp (SANE) value * **************************************************************** * -InitLabels start +InitLabels start cg maxLabel equ 3200 ! with labelTab[0] do begin diff --git a/CGC.pas b/CGC.pas index 8945741..3dd33d9 100644 --- a/CGC.pas +++ b/CGC.pas @@ -26,7 +26,7 @@ interface uses CCommon, CGI; -{$segment 'cg'} +{$segment 'CG'} type {pcode code generation} diff --git a/CGI.pas b/CGI.pas index 38dc26d..31d35c9 100644 --- a/CGI.pas +++ b/CGI.pas @@ -18,7 +18,7 @@ unit CodeGeneratorInterface; interface -{$segment 'cg'} +{$segment 'CG'} {$LibPrefix '0/obj/'} diff --git a/DAG.pas b/DAG.pas index 7f41db6..e97586c 100644 --- a/DAG.pas +++ b/DAG.pas @@ -11,7 +11,7 @@ unit DAG; interface -{$segment 'cg'} +{$segment 'CG'} {$LibPrefix '0/obj/'} diff --git a/Header.pas b/Header.pas index 256ed9f..562fd28 100644 --- a/Header.pas +++ b/Header.pas @@ -15,7 +15,7 @@ interface uses CCommon, MM, Scanner, Symbol, CGI; -{$segment 'scanner'} +{$segment 'SCANNER'} var inhibitHeader: boolean; {should .sym includes be blocked?} diff --git a/MM.asm b/MM.asm index 7250e10..f986269 100644 --- a/MM.asm +++ b/MM.asm @@ -13,7 +13,7 @@ * **************************************************************** * -Calloc start +Calloc start cc ptr equ 0 pointer to reserved memory @@ -59,7 +59,7 @@ lb4 return 4:ptr return the pointer * **************************************************************** * -GCalloc start +GCalloc start cc ptr equ 0 pointer to reserved memory @@ -107,9 +107,9 @@ lb4 return 4:ptr return the pointer * **************************************************************** * -Malloc start +Malloc start cc - lda useGlobalPool + lda |useGlobalPool jne GMalloc jmp LMalloc end diff --git a/MM.pas b/MM.pas index 9cbd6d0..f057fc0 100644 --- a/MM.pas +++ b/MM.pas @@ -39,6 +39,8 @@ interface uses CCommon; +{$segment 'CC'} + var localID,globalID: integer; {user ID's for the local & global pools} diff --git a/Native.asm b/Native.asm index 9c8fd36..080f182 100644 --- a/Native.asm +++ b/Native.asm @@ -1,4 +1,5 @@ mcopy native.macros + datachk off **************************************************************** * * Remove - remove an instruction from the peephole array @@ -8,7 +9,7 @@ * **************************************************************** * -Remove start +Remove start CodeGen elSize equ 12 size of an element nPeepSize equ 128 size of array ns equ 4 array element diff --git a/Native.pas b/Native.pas index 3f49456..b033cd2 100644 --- a/Native.pas +++ b/Native.pas @@ -30,7 +30,7 @@ interface uses CCommon, CGI, CGC, ObjOut; -{$segment 'CodeGen'} +{$segment 'CODEGEN'} type labelptr = ^labelentry; {pointer to a forward ref node} diff --git a/ObjOut.asm b/ObjOut.asm index 79a213e..d62aab2 100644 --- a/ObjOut.asm +++ b/ObjOut.asm @@ -1,4 +1,5 @@ mcopy objout.macros + datachk off **************************************************************** * * CnOut - write a byte to the constant buffer @@ -8,7 +9,7 @@ * **************************************************************** * -CnOut start +CnOut start CodeGen maxCBuffLen equ 191 max index into the constant buffer lda cBuffLen if cBuffLen = maxCBuffLen then @@ -39,7 +40,7 @@ lb1 phb cBuff[cBuffLen] := i; * **************************************************************** * -CnOut2 start +CnOut2 start CodeGen maxCBuffLen equ 191 max index into the constant buffer lda cBuffLen if cBuffLen+1 >= maxCBuffLen then @@ -71,7 +72,7 @@ lb1 phb cBuff[cBuffLen] := i; * **************************************************************** * -COut start +COut start CodeGen phb OutByte(b); pla @@ -95,7 +96,7 @@ COut start * **************************************************************** * -Out2 start +Out2 start CodeGen phb OutWord(w); pla @@ -118,7 +119,7 @@ Out2 start * **************************************************************** * -Out start +Out start CodeGen phb OutByte(b); pla @@ -141,7 +142,7 @@ Out start * **************************************************************** * -OutByte private +OutByte private CodeGen lda objLen if objLen+segDisp = buffSize then clc @@ -200,7 +201,7 @@ lb2a lda #$8000 handle a segment overflow * **************************************************************** * -OutWord private +OutWord private CodeGen lda objLen if objLen+segDisp+1 = buffSize then sec diff --git a/ObjOut.pas b/ObjOut.pas index f9b886f..d17086d 100644 --- a/ObjOut.pas +++ b/ObjOut.pas @@ -34,7 +34,7 @@ interface uses CCommon, CGI, CGC; -{$segment 'CodeGen'} +{$segment 'CODEGEN'} procedure CloseObj; diff --git a/Scanner.asm b/Scanner.asm index 2c68237..b366bf3 100644 --- a/Scanner.asm +++ b/Scanner.asm @@ -1,4 +1,5 @@ mcopy scanner.macros + datachk off **************************************************************** * * Convertsl - Convert a string to a long integer @@ -14,7 +15,7 @@ * **************************************************************** * -Convertsl start +Convertsl start scanner val equ 0 return value @@ -100,7 +101,7 @@ rkModifiers ds 2 * **************************************************************** * -NextCh start +NextCh start scanner eofChar equ 0 end of file character eolChar equ 13 end of line character diff --git a/Scanner.pas b/Scanner.pas index 7da3f76..4d6de16 100644 --- a/Scanner.pas +++ b/Scanner.pas @@ -31,7 +31,7 @@ interface uses CCommon, Table, CGI, MM; -{$segment 'scanner'} +{$segment 'SCANNER'} type pragmas = {kinds of pragmas}