For a counterpoint, see David R. Hanson's "Is block structure necessary?" (1981) [0] — back in those days, "block structure" meant nested routines with nested scopes — which argues that having instead a proper module system, with explicit control over what's being exported from a module, not only gives a better modularity, decomposition, and encapsulation, but also simplifies both the language's implementation, and the run-time structures it needs (remember displays, and the hardware support for them e.g. x86's ENTER?).
Block structure is traditionally considered an a priori requirement for algorithmic program-
ming languages. Most new languages since Algol-60 have block structure. Reasons exist,
however, to omit the general form of block structure — nested procedure definitions in which
references to identifiers defined in outer procedures are permitted — from programming
languages, especially those intended for systems programming applications. This paper
reviews the concept of block structure and considers its advantages and disadvantages. It
concludes that, in many cases, a module facility is superior to block structure and should be
considered in lieu of block structure in future languages.
The traditional way of doing this in C is simply static functions. Every .c file has exactly one non-static function and all the other helper functions are static.
>> And that's part of the reason why in 2002, Switzerland's government reduced the Sonnenberg bunker capacity from 20,000 to just 2,000. Its floors filled with bunk beds, a prison and hospital, all deep underground, have been repurposed over the years as overflow housing for refugees, asylum seekers and the homeless.
It's a use that has been criticized by organizations that help these populations. Some asylum seekers have protested against being housed here.
It has never been used for its original intent: to protect people from nuclear fallout. But the Swiss government continues to spend tens of millions of dollars a year to maintain it and hundreds of thousands of other bunkers throughout the country — just in case.
You might also want to checkout the Assembly books by Larry Pyeatt (ARM only) and Daniel Kusswurm (x86 + ARM).
Another excellent classic which you should checkout if you are interested in all things ARM is ARM System Developer's Guide: Designing and Optimizing System Software by Sloss, Symes and Wright. It is old and so does not cover newer ARM architectures but will give you a solid foundation for system programming.
Assembly is add R1 R2. Forth takes the 2 numbers from the TOS and puts it in those registers. That wasn't obvious what was happening in the post, I wonder if student me would have wondered.
You could make the case for going all the way down to the silicon.
We teach English, maths, science to give a rounded understanding, not to make student productive or give them information that will be immediately useful. IT/computing in secondary school should be doing a similar thing. It should remove the mystery of what a computer is. That it is programmable. Hopefully it's improved since I was young and we were basically shown how to use Excel.
Pascal supports it (at least Turbo Pascal, no idea about ISO Pascal).