Executing FOCAL programs from ROM vs. RAM
|
04-11-2019, 12:22 PM
Post: #5
|
|||
|
|||
RE: Executing FOCAL programs from ROM vs. RAM
Thanks guys.
I'll call the pointer to the next FOCAL instruction the interpreter pointer (IP) to distinguish it from the CPU's program counter (PC). I'd argue that the IP is 16 bits where the top 4 bits indicate whether the program is in RAM or ROM. The fact that the CPU uses flag 10 to indicate whether those bits are 0 is an optimization. I see that I wrote incorrectly about the RAM addresses. The max address is 0x3ff which is 10 bits, not 12. But it sounds like FOCAL programs must reside within the bottom half of the address space (0x000-0x1ff). That's because when executing from RAM there are only 12 bits available to specify a byte. 3 are used to indicate the byte within a register, leaving 9 to select a register within RAM. So if I understand right, it gets the next byte in the FOCAL program like this C pseudo-code: Code: if (flag10) { // flag10 true of top 4 bits of IP are non-zero |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Executing FOCAL programs from ROM vs. RAM - David Hayden - 04-10-2019, 10:09 PM
RE: Executing FOCAL programs from ROM vs. RAM - hth - 04-11-2019, 04:41 AM
RE: Executing FOCAL programs from ROM vs. RAM - Ángel Martin - 04-11-2019, 05:15 AM
RE: Executing FOCAL programs from ROM vs. RAM - hth - 04-11-2019, 06:53 AM
RE: Executing FOCAL programs from ROM vs. RAM - David Hayden - 04-11-2019 12:22 PM
RE: Executing FOCAL programs from ROM vs. RAM - hth - 04-11-2019, 04:14 PM
|
User(s) browsing this thread: 1 Guest(s)