On 2022-02-08 00:12, Dennis Boone wrote:
I don't
agree. Skips aren't really any more strange than
branches. We're talking assembler here anyway. There are bound to be
jumps all over the place always. Not really more spagetti in any
architecture compared to any other.
Oh a skip scenario is definitely spaghetti. SKIP nearly always ends up
being SKIP BRANCH or even SKIP BRANCH BRANCH, and the programmer has
less code structuring options for a SKIP than when building the sorts of
behaviors that would be coded as loops or conditional blocks in high
level code.
Wait... Why are you comparing to HLLs? That's not a meaningful
comparison. The alternative are actually conditional jumps. Which isn't
much different than conditional skips. The biggest difference is the
lack of flexible targets for the conditional skip. Which really aren't
making it any more spagetti.
But sure, compared to high level languages all assembler is spagetti.
Skips or not.
But, it _is_ more than a bit silly to try to apply
anti-spaghetti
sensibility to assembler.
Indeed, which is why I seriously questioned the claim that skips would
make code more spagetti.
The probably
more "ugly" thing in the PDP-8 is that you do self
modifying code very often.
The other pre-modern behavior in a lot of the older architectures is the
type of branch where you store the return address at the jump target
location, then start actual execution at target+1. It makes recursion
and multi-tasking difficult.
It don't really directly affect multi-tasking, but it does affect
reentrancy, which is commonly desired in multitasking, yes (but not
absolutely required).
But yes, that, and recursion isn't really possible without more proper
local storage, of which a stack is the most convenient and common form.
Johnny
--
Johnny Billquist || "I'm on a bus
|| on a psychedelic trip
email: bqt(a)softjar.se || Reading murder books
pdp is alive! || tryin' to stay hip" - B. Idol