1 hour ago, svenvandevelde said:
What is a CLI?
Sorry about that -- yeah a "command line".
I have to do the hard work and get the opcodes all working properly... then I can put the arena / core into banked RAM.
1 hour ago, svenvandevelde said:
What is a CLI?
1 hour ago, rje said:
So I'll ask for the sake of asking. What's the best use for that banked RAM?
I'm just assuming that the "arena" is the best place for it, because that way I can have enough memory for an 8000 location arena, which will need 40k to 48k RAM, depending on what the location record stores.
The downside is that fetching data from the arena becomes a function call, or a macro, instead of directly accessing an array. I mean, array access is WONDERFUL and easy.
But... suppose I only need the current 16K RAM for the 4K arena. Maybe I can get by with that... I still have 6K "golden RAM" free, and I can shove things like the help text (for example) into a single RAM bank.
I'm just asking for the sake of asking. I always feel the need to use up all that free RAM, but that doesn't mean I ought to.
7 hours ago, rje said:
So I'll ask for the sake of asking. What's the best use for that banked RAM?
I'm just assuming that the "arena" is the best place for it, because that way I can have enough memory for an 8000 location arena, which will need 40k to 48k RAM, depending on what the location record stores.
The downside is that fetching data from the arena becomes a function call, or a macro, instead of directly accessing an array. I mean, array access is WONDERFUL and easy.
But... suppose I only need the current 16K RAM for the 4K arena. Maybe I can get by with that... I still have 6K "golden RAM" free, and I can shove things like the help text (for example) into a single RAM bank.
I'm just asking for the sake of asking. I always feel the need to use up all that free RAM, but that doesn't mean I ought to.
Quote
LONGCALL: LDA RAMBANK : PHA : STY RAMBANK : JSR + : PLA : STA RAMBANK : RTS
+ JMP ($BF00,X)
LONGCALL: STY RAMBANK : JSR + : LDA COREBANK : STA RAMBANK : RTS
+ JMP ($BF00,X)
unsigned char opcode: 4;
unsigned char aMode: 2; // immediate, direct, indirect, predecrement indirect
unsigned char bMode: 2; // same modes as above
unsigned char A: 12; // i.e. the size of the arena
unsigned char B: 12; // again, arena size
// = 32 bits.
//
// If the arena size grows to, say, 8000 locations, then:
//
unsigned char opcode: 4;
unsigned char aMode: 2; // immediate, direct, indirect, predecrement indirect
unsigned char bMode: 2; // same modes as above
unsigned char A: 13; // i.e. the size of the arena
unsigned char B: 13; // arena size
// = 34 bits... e.g. 5 bytes.
X1A #nnn #nnn
X1B #nnn nnn
X1C #nnn @nnn
X2A nnn #nnn
X2B nnn nnn
X2C nnn @nnn
X3A @nnn #nnn
X3B @nnn nnn
X3C @nnn @nnn
0 HCF
(Used for holding data; remove the process from the system ("Halt and Catch Fire"))
1 MOV
2 ADD
3 SUB
(Funnily enough, it turns out that SUB is not simply a negated ADD.
I was sad when I figured this out.)
4 JMP: unconditional jump
5 JMN: jump if A != 0
6 JMZ: jump if A == 0
7 SEQ: ++ip if A == B ("CMP" = skip if equal)
8 SLT: ++ip if A < B (skip if less than)
9 SNE: ++ip if A != B
10 FLP: ++ip if an essentially random system status word < B
11 reserved
12 reserved
13 reserved
14 XCH: exchange operands
15 SPL: push to process queue
char* label[ MAX_NO_OF_LINES ];