Does anyone else miss conditional returns?

27 views
Skip to first unread message

Bruce Mardle

unread,
Nov 1, 2015, 10:19:56 AM11/1/15
to
No, thought not :-)
(I reverse-engineered a Lisp interpreter for the ZX Spectrum (Z80) in the early '80s, out of curiosity. The code for (and ...) and that for (or ...) had about 50 bytes in common... except for 1 bit: (and) had a RET Z, and (or) had a RET NZ.)

Mux

unread,
Nov 6, 2015, 5:18:12 PM11/6/15
to
On Sunday, November 1, 2015 at 7:19:56 AM UTC-8, Bruce Mardle wrote:
> No, thought not :-)
> (I reverse-engineered a Lisp interpreter for the ZX Spectrum (Z80) in the early '80s, out of curiosity. The code for (and ...) and that for (or ...) had about 50 bytes in common... except for 1 bit: (and) had a RET Z, and (or) had a RET NZ.)

I liked conditional returns. Did reduce your code quite a bit when you had lots of early out branches. ARM to a certain degree used this when they did conditional instruction execution IMO.

-Y
Reply all
Reply to author
Forward
0 new messages