Article View: comp.lang.misc
Article #5177Re: Languages and learning (was: Philosophy of C)
From: Rahul Dhesi
Date: Sat, 20 Feb 1988 03:10
Date: Sat, 20 Feb 1988 03:10
34 lines
2002 bytes
2002 bytes
In article <3755@ihlpf.ATT.COM> nevin1@ihlpf.UUCP (00704a-Liber,N.J.) writes:
[admiring the authors of the TRS-80 12K ROM]
>They had to fit all of BASIC in a 12K ROM, and every trick in the book had to
>be used to conserve memory (if I remember correctly, on the original release
>they did it with 8 bytes to spare). They had to be excellent assembly language
>programmers to find tricks like this! I take my hat off to these coders (as
>well as the original Apple ROM writers); they did some of the most impressive
>assembly work that I have ever seen!
No, not every trick.
The Z80 has duplicate sets of registers, the alternates being accessed
by one-machine-cycle instructions. Yet not once did the 12K ROM use
the alternate set.
You would also see sequences similar to
PUSH HL ;save HL
LD HL,(ADDRESS) ;load HL from memory
LD DE,HL ;transfer to DE
POP HL ;restore HL
when a simple
LD DE,(ADDRESS) ;load DE from memory
would have sufficed. And so far as I could tell from disassembled
listings, the BASIC interpreter part of the ROM (as opposed to the 2K
that did the I/O) seldom or never used the index registers, which
I consider to be a very powerful feature of the processor.
Much of the power of the Z80 was wasted in the TRS-80 ROM.
--
Rahul Dhesi UUCP: <backbones>!{iuvax,pur-ee,uunet}!bsu-cs!dhesi
Technical Details
Message-ID:
<2164@bsu-cs.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!umd5!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!iuvax!bsu-cs!dhesiReferences:
<11348@brl-adm.ARPA> <3473@ihlpf.ATT.COM> <3487@ihlpf.ATT.COM> <903@micomvax.UUCP> <3755@ihlpf.ATT.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!umd5!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.UUCP (Rahul Dhesi) Newsgroups: comp.lang.misc Subject: Re: Languages and learning (was: Philosophy of C) Message-ID: <2164@bsu-cs.UUCP> Date: 20 Feb 88 03:10:40 GMT References: <11348@brl-adm.ARPA> <3473@ihlpf.ATT.COM> <3487@ihlpf.ATT.COM> <903@micomvax.UUCP> <3755@ihlpf.ATT.COM> Reply-To: dhesi@bsu-cs.UUCP (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 33