From 3b431d9fa3ca4110c23623887338685117b2bec6 Mon Sep 17 00:00:00 2001 From: Rutger van Bergen Date: Mon, 19 Sep 2022 23:57:26 +0200 Subject: [PATCH] Remove trailing whitespace --- asminc/kim1.inc | 2 +- doc/kim1.sgml | 12 ++++++------ samples/kim1/kimHello.c | 4 ++-- samples/kim1/kimSieve.c | 10 +++++----- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/asminc/kim1.inc b/asminc/kim1.inc index b1046b01c..68f059490 100644 --- a/asminc/kim1.inc +++ b/asminc/kim1.inc @@ -1,6 +1,6 @@ ; --------------------------------------------------------------------------- ; -; KIM-1 definitions +; KIM-1 definitions ; ; --------------------------------------------------------------------------- diff --git a/doc/kim1.sgml b/doc/kim1.sgml index 6db9fc908..c3494b9b9 100644 --- a/doc/kim1.sgml +++ b/doc/kim1.sgml @@ -27,10 +27,10 @@ function reference for more information. Binary format

The output format generated by the linker for the KIM-1 target is a raw binary BIN file, which -is essentially a memory image. You can convert this to a papertape format file using -Convert8bithexformat or KIMPaper, which are open-source conversion utility programs. -A papertape format files can be transferred to the KIM-1 using the RS-232 terminal port (TTY), -just as if the machine-code was entered by hand. Enter 'L' in the TTY and start the paper tape file +is essentially a memory image. You can convert this to a papertape format file using +Convert8bithexformat or KIMPaper, which are open-source conversion utility programs. +A papertape format files can be transferred to the KIM-1 using the RS-232 terminal port (TTY), +just as if the machine-code was entered by hand. Enter 'L' in the TTY and start the paper tape file transfer.

@@ -45,8 +45,8 @@ system configuration before compiling and linking user programs. The ROMs and I/O areas are defined in the configuration files, as are most of the entry points for useful subroutines in the KIM-1 monitor ROM. cc65 generated programs compiled and linked using 4k config run in the memory range of $200 - $0FFF. The 60k config expands -this range to $DFFF. The starting memory location and entry point for running the program is -$200, so when the program is transferred to the KIM-1, it is executed by typing '200 G'. +this range to $DFFF. The starting memory location and entry point for running the program is +$200, so when the program is transferred to the KIM-1, it is executed by typing '200 G'. Special locations: diff --git a/samples/kim1/kimHello.c b/samples/kim1/kimHello.c index 0dca1345f..9e5ca8ab6 100644 --- a/samples/kim1/kimHello.c +++ b/samples/kim1/kimHello.c @@ -9,14 +9,14 @@ #include #include -int main (void) +int main (void) { char str[100]; char c = 0x00; printf ("\nHello World!\n\n"); printf ("Type a line and press ENTER, please.\n\n"); - + gets( str ); printf ("\n\nThanks: %s\n\n", str); diff --git a/samples/kim1/kimSieve.c b/samples/kim1/kimSieve.c index 29cd7c7e9..d13f776ea 100644 --- a/samples/kim1/kimSieve.c +++ b/samples/kim1/kimSieve.c @@ -8,11 +8,11 @@ typedef unsigned long int ulong; #define LIMIT 100000L // BITARRAY -// +// // My bit-access macros pre-divide by two on the presumption that you'll never // try try access both odd and even bits! -#define GETBIT(array, bit) (array[bit >> 4] & (1 << ((bit >> 1) & 7))) +#define GETBIT(array, bit) (array[bit >> 4] & (1 << ((bit >> 1) & 7))) #define SETBIT(array, bit) (array[bit >> 4] |= (1 << ((bit >> 1) & 7))) #define CLRBIT(array, bit) (array[bit >> 4] &= ~(1 << ((bit >> 1) & 7))) @@ -65,7 +65,7 @@ int main(void) RepeatChar('*', 70); puts("\r\n** Prime Number Sieve - Dave Plummer 2022 **"); RepeatChar('*', 70); - + printf("\r\n\r\nCalculating primes to %ld using a sqrt of %ld...\r\n", LIMIT, rootOfLimit); // Calculate how much memory should be allocated @@ -80,7 +80,7 @@ int main(void) else { printf("Allocated %ld bytes for %ld slots\r\n", numBytesAllocated, LIMIT); - + // Preset all the bits to true for (iNumber = 0; iNumber < numBytesAllocated; iNumber++) @@ -102,7 +102,7 @@ int main(void) break; } } - + for (n = (ulong) currentFactor * currentFactor; n <= LIMIT; n += currentFactor * 2) CLRBIT(array, n);