SweetCX16
Posted: Fri Jan 14, 2022 5:53 am
On 1/13/2022 at 10:34 PM, codewar65 said:
If the 6809 sold at the same price or less than a 6502, would Sweet16 even exist?
Probably, since Apple 2 predated 6809.
On 1/13/2022 at 10:34 PM, codewar65 said:
If the 6809 sold at the same price or less than a 6502, would Sweet16 even exist?
On 1/13/2022 at 10:43 PM, codewar65 said:
The 6809 was a wonderful processor that I have worked with. With the (indirectly with the SuperPet SP9000) and with coding the chip directly. I wish it took off. Really.
On 1/13/2022 at 10:43 PM, codewar65 said:
the school (as did many) ate the Apple.
On 1/14/2022 at 12:10 AM, codewar65 said:
Waterloo on the SuperPET. *warm fuzzies* BASIC, Pascal, and FORTRAN. They never offered APL at my college. I did take up COBOL at university and ended up do stupid Y2K stuff at a job decades later...
On 1/14/2022 at 12:34 AM, codewar65 said:
If the 6809 sold at the same price or less than a 6502, would Sweet16 even exist?
Quote
However, even with a different dispatch model, if trying to squeeze object size in a "Sweet 16 replacement", rather than optimizing for speed, I could imagine have a single indirect load and a single indirect store routine, which works out from the bits of the opcode and the status of the carry flag whether it is pre-decrement or post-increment and whether it is a single or double byte operation, covering 7 operations in two routines. Direct register moves could be handled by putting source in Y and destination in X, at the cost of using absolute rather than direct addressing for the Y-indexed operation, giving one routine the two direct ones. One could imagine the immediate register load being run by the two-byte accumulator load, setting the indirect source register to R15, the PC register, and using Y-indexed store, so the immediate load is taken over by the single indirect load routine as well.
Then at the cost of three more zero page bytes ... two more bytes in a dedicated "register 17" initialized to $0001, and one set to either $80 or $00 based on whether adding or subtracting, setting up the correct target and operand index in X and Y would all allow all five arithmetic operations to be done in a single routine. If that was done by shifting the instruction one bit to the left and using the carry flag and sign flag to split the code set into quarters, you might restrict the jump table to the $0n instructions, making it only 26-32 bytes long
On 1/14/2022 at 11:46 PM, rje said:
Yep, I was messing with those opcodes, grouping them one way and another, thinking "surely a little decode can reduce size". I'm sure Woz didn't decode because 300 bytes was the golden compromise for him.