From: Alan Cox Date: Sat, 3 Dec 2016 20:19:41 +0000 (+0000) Subject: bcpl: remove a stdio usage and a pointless indirection X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f7288ae0bee6567264a4a7b82a71d47799b2b6da;p=FUZIX.git bcpl: remove a stdio usage and a pointless indirection Faster faster.. --- diff --git a/Applications/BCPL/blib.c b/Applications/BCPL/blib.c index ad96e30b..79aac811 100644 --- a/Applications/BCPL/blib.c +++ b/Applications/BCPL/blib.c @@ -22,7 +22,7 @@ uint16_t rdM(uint16_t addr); #else -extern uint16_t *M; +extern uint16_t M[]; #define wrM(address, data) M[address]=data #define rdM(address) M[address] #endif @@ -171,5 +171,5 @@ void endwrite(void) void mapstore(void) { - fprintf(stderr, "\nMAPSTORE NOT IMPLEMENTED\n"); + write(2, "\nMAPSTORE NOT IMPLEMENTED\n", 26); } diff --git a/Applications/BCPL/icint.c b/Applications/BCPL/icint.c index c4a31328..6c43494a 100644 --- a/Applications/BCPL/icint.c +++ b/Applications/BCPL/icint.c @@ -97,7 +97,7 @@ #endif -uint16_t *M; +uint16_t M[PSIZE]; int fp; static uint16_t G; @@ -562,8 +562,6 @@ fetch: } } -uint16_t pgvec[PSIZE]; - int main(int argc, char *argv[]) { if (argc != 2) { @@ -606,7 +604,6 @@ int main(int argc, char *argv[]) } #endif - M = pgvec; G = MGLOB; P = MPROG; wrM(P++, LIG1);