Article View: comp.arch
Article #202Almost Ready to Repeat the Cycle
From: John Savard
Date: Sun, 18 Oct 2026 18:39
Date: Sun, 18 Oct 2026 18:39
48 lines
3356 bytes
3356 bytes
I was thinking that this iteration of Concertina II was nearly perfect... and so I wanted to just add one more thing that would bring it all crashing down! However, after some thought, I determined that what I wanted to do was genuinely impossible, and so I ended up leaving well enough alone. My intent was to come up with a slightly changed version of the instruction set in which many instructions were just one bit shorter. And associate it with a new header type that used... modified addresses. What's a modified address? Well, if a block contains a 32-bit header, then it has seven 32-bit instruction slots left. If those instructions are to "think" that they aren't interrupted by headers - because the idea is to emulate another architecture on my dumb CPU which can't handle variable-length instructions without being told where they start - I need to map their internal addresses to physical addresses... by multiplying them by 1 1/7. But I can't multiply by 1 1/7 without dividing by 7, which takes too long! So I came up with this scheme: Multiply by the binary number 1.00100101, which will produce a cycle which repeats for every 256 entries. Since 1/7 in binary is 0.001001001001... going on forever, 0.00100101 is just a little bit more than 1/7, and so the header can always be skipped with just a modest amount of additional wasted space. So if I couldn't figure out a simple way of trivially modifying my ISA to make it closer to isomorphic with the target architecture, I could just literally emulate, using actual 360 instructions! Those occasional skipped 16-bit spots would mean that self-modifying code would break. No instruction can start in a 16-bit spot the address of which is skipped, but instructions longer than 16 bits are contiguous, so the skipped 16 bits are shifted to the end of the instruction if it happens to just precede a 16 bit slot with a skipped address. No problem, self-modifying code is really rare. However, lots of 360 programs just put their variables and constants immediately following the program code under the purview of the same base register. Suddenly, telling the computer when to modify addresses to skip the headers, and when to use plain addresses so data accesses work stops being possible! John Savard
Technical Details
Message-ID:
<6ad51222.27689359@news.eternal-september.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: quadibloc@invalid.com (John Savard) Newsgroups: comp.arch Subject: Almost Ready to Repeat the Cycle Date: Sun, 18 Oct 2026 18:39:03 GMT Organization: A noiseless patient Spider Lines: 48 Message-ID: <6ad51222.27689359@news.eternal-september.org> Injection-Date: Sun, 18 Oct 2026 18:39:04 +0000 (UTC) Injection-Info: dont-email.me; logging-data="1478058"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19pKrQXlo1uK0FvyGNEHGDOBWkky0f9F24="; posting-host="584f8e7bd31424a3f7a4c51a74e77f13" Cancel-Lock: sha1:vvP6rcodtwv2hJlEHHxT7x8zn6g= sha256:xUBcAJu7elZZRdVih79JzxfALwdgRqkW3GPjFljC1Tk= sha1:ZPB/AOfY9wGbSYAe2+wVxTY+eWQ= sha256:X+HAqd60eB2EyLxd2zqRsTgELW2HmtL1Mt/zdi6BUOk= X-Newsreader: Forte Free Agent 1.1/32.230