As mentioned by another commenter, they were probably targeting the Keil C51 compiler which stores local function arguments in fixed memory locations: https://news.ycombinator.com/item?id=17399633
Unless the book states this explicitly and explains that their examples are only good with that compiler and are not actually valid C, that doesn’t really help.
Why would you assume the book author (if he indeed used Keil C51) would be aware of more dialects and their intricacies? Do you really think that in the early 90s there was a wide-spread rigor in software books? There was no Internet, whatever software one could get was the one that was their "standard", there was very limited knowledge exchange between academia and practitioners etc.
I’d assume that because he wrote a book about “C”, not about “C targeted for the Keil C51 compiler.”
I read plenty of programming books around that time. They were almost always specific to some platform, but they always said so. I never saw, say, a “Pascal” book that turned out to be completely specific to ORCA/Pascal. It would say what it was for.
In the 90's there was at least one good software book: 'The C Programming Language' by messrs. Kernighan and Ritchie - you may have heard of it? It correctly told you, among other things, everything you really need to know about using pointers in C. It is still available.
I was a kid back then; K&R was pretty hard to find in my area and it was quite outdated anyway, most people were happy to use whatever resources they could get; the best in mid-to-late 90s ended up things like what DJ Delorie wrote, stuff from John Carmack, Dave Eberly etc. that were pretty low on rigor but very high on practical value.
Where do you see me defending that book? I haven't ever read it. I am making fun of looking back 3 decades and judging it with our current knowledge. What you can do in 10s for $0.001 now took often half a year and millions of $ to accomplish back then, if ever. It's just ridiculous to get offended by some book that didn't get it perfectly right and was likely used by smart readers as an exercise of recognizing incorrect approaches. Do you really think there was some central authority giving approvals to computing books?
Do you often make fun of ridiculous movies from 30s?
We could begin from your post starting this thread, where your implication that its errors are just optimizations suggests that you did not understand what's actually, indisputably wrong with the code from the book. Your comment here about current knowledge strongly suggests that you still do not. There are several posts here that explain exactly why it was simply wrong the instant it was written.
Frankly, it's really difficult to talk to people that always run syntactic analyzers on everything written and aren't open to absorb the full context. Do I need to go step by step to talk what was wrong with the code? You are mistaking generosity (i.e. it has faults, but it was in a different age) with stupidity (I have no clue what I am talking about; despite writing my own compilers, writing self-modifying code in assembly language, using super duper optimizations in C++ that crashed compilers because nobody expected them etc.). Thank you very much and good luck with your literal approach!
Actually, reading that code was fun for me. I wish I could go so low level these days in the mainstream...