Post #2317353
2026-05-10 02:26 UTC
A cursed feature of C in 1972: Labels and functions were reassignable (i.e., lvalues)!
For example, this is a clever way to initialize once:
goto init;
init:
ouptr = oubuf;
init = init1;
init1:
which is compiled to:
jmp *4120
mov 4136,4144
mov 4122,4120
Note the indirect jump and assignment to that address. This would have also worked with functions.
#c #unix #retrocomputing #vintagecomputing
Replies (0)
No replies.