From Newsgroup: comp.arch
(People reading this may find it sufficiently off the wall as to wonder
if an LLM wrote it, but I assure you that I wrote it entirely with my
organic brain, and Emacs, looking stuff up with Firefox. I write the em
dashes with the Compose key.)
jayjwa <
jayjwa@atr2.ath.cx.invalid> writes:
It's easier, at least for me, to make a rCLmental maprCY of where things are when they have names rather than numbers, even if those names are
short. It's easier to recall rCLwatermellonrCY, rCLapplerCY, rCLgraperCY than 39,
23, 5 even though both sets are decending in magnitude. [...]
In English, Hebrew, Greek, etc., the obvious alternative to numbers is
to use letters of the alphabet: register A, register B, register C, etc.
In Chinese, of course, there is no alphabet, but, as I understand it (my Chinese is mostly limited to reading datasheets), the Ten Heavenly Stems <
https://en.wikipedia.org/wiki/Heavenly_Stems> and Twelve Earthly
Branches <
https://en.wikipedia.org/wiki/Earthly_Branches> are used in
much the same way. This may not be adequate for a processor with many architectural registers like RISC-VrCOs 32 (or 31) or MMIXrCOs 256, but itrCOs close enough.
The Ten Heavenly Stems have mostly lost their original meanings over the
last 3000 years and been relegated to mostly only this use. I have
listed them here with their origins; where they have other current uses,
I have put them in parentheses:
1. to# turtle shell (methyl, rCLarmorrCY)
2. E|O fish guts (ethyl, rCLtwistrCY)
3. E+O fish tail
4. E+U nail
5. uee halberd (FirefoxrCOs translation neural network translates it as rCLErCY)
6. o+# thread on a loom (rCLselfrCY)
7. o|U evening star (rCLagerCY)
8. *+c to offend superiors (rCLspicyrCY)
9. ou4 burden
10. tO+ four-handled plow
I am amused at the idea of moving a 36-bit quantity from register
Eveningstar to register Fishtail, but I think that might be a bit of a
hard sell. Of course, in Chinese, the names are just one syllable.
The Twelve Earthly Branches are used, among other things, for two-hour
periods of the day, and they have a conventional correspondence with the Chinese 12-year zodiac symbols, which I have placed in square brackets.
They were used to name the days of a 12-day week 3000 years ago. The
zodiac symbols are not the meanings of the characters, which, as with
the Heavenly Stems, have largely lost their meaning over the last few millennia.
1. o!E child [rat]
2. E+a ugly, clown [ox]
3. o>a [tiger]
4. oi> [rabbit]
5. *+# day [dragon]
6. o+| [snake]
7. oie noon [horse]
8. uL- not yet [goat]
9. to| to state or explain [monkey]
10. oae unitary [rooster]
11. uei army [dog]
12. E|N [pig]
The zodiac symbols seem like they would greatly improve the memorability
of onerCOs assembly code and calling conventionsrCerCorCeit would be much easier
to learn that the stack pointer was the Pig register and the link
register was the Dragon register than to learn which one was r14 and
which one was r15.
Kragen
--- Synchronet 3.22a-Linux NewsLink 1.2