Recursion Until Death!

When I first learned Assembly Language, I had a fear of blowing up the stack. Remember, back in the 8-bit microcomputer era that memory space was tight, maybe only part of 64K. A stack would have 1K of storage, if that. I think the stack size on my TRS-80 was 256 bytes. (An address was only two bytes wide.) This limitation meant that pushing too much data on the stack would blow up the computer.
Continue reading

Happy 250th, USA!

US Flag in ASCII, color characters, red, white, and blue
Today is Independence Day in the USA. Two hundred and fifty years ago, this nation’s founding fathers signed the Declaration of Independence. While I’ve had posts dated July 4 previously on this blog, today is a special anniversary. It necessitates a specific C language program.
Continue reading

Ctype Functions: toupper() and tolower()


The easiest way to mess with characters in C is to employ the ctype functions. I name this category of library functions after the ctype.h header file that defines them. Some are true functions, some are macros. Each function can be replicated with standard C code, though it’s quicker to use an established function than to code your own. But that’s not the point of learning to program!
Continue reading