One thing I like about assembly programming is the reuse of routine bodies, not returning from a routine and falling through to the next one when needing to append something before a routine.
One thing I like about assembly programming is the reuse of routine bodies, not returning from a routine and falling through to the next one when needing to append something before a routine. 5 comments
@wim_v12e I've been looking for a name for those since for ever! Thank you thank you @neauoire It's interesting how, depending on the sort of programmer you ask, one will say it's wonderful and another will say it's a terrible idea. 😈 @neauoire Possibly also different priorities! Modern "software engineering" highly values code as a commodity that is very predictable, uniform, and has as little chance as possible of "biting" you or others. |
@neauoire Good old Fortran has that as well, it's called multi-entry subroutines.
For my C compiler I simply rewrite it as
;draw-dec JMP2
@draw-dec
so the fall-through becomes a tail call.