From f7288ae0bee6567264a4a7b82a71d47799b2b6da Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sat, 3 Dec 2016 20:19:41 +0000 Subject: [PATCH] bcpl: remove a stdio usage and a pointless indirection Faster faster.. --- Applications/BCPL/blib.c | 4 ++-- Applications/BCPL/icint.c | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) 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); -- 2.34.1