I have decided what I shall do to combine the knowledge of all the assembly languages I know -- making an assembly-like language that is less specific than direct assembly and less generic than low-level C -- basically a notation language to carry out certain processes on different processors that compiles to 99% optimized assembly code on each platform! Such as an example of Cor0x code:
Code:
Would be something like this in z80:
Code:
And in something like 68K or SH3 the same thing, while trying to stick to the model as close as possible.
Of course, the idea would not to be coding something for x86 and z180 at the same time, but maybe something like SH3 and ARM or x86 and a3 at the same time.
I know what I posted is described poorly, but I hope you get what I am meaning
This will be a lot more work than making a normal compiler -- this will require a lot more attention at the tables and acceptable conversion methods -- and a really tough syntax to the coder. However, it would be more than work it
Code:
LOAD[reg1(16),$80]
PUSH[regSP(16),reg1(16),INC [regSP(16),2]]
RETURN[POP,regPC(16),regSP(16),2]
Would be something like this in z80:
Code:
ld hl,$80
push hl
ret
And in something like 68K or SH3 the same thing, while trying to stick to the model as close as possible.
Of course, the idea would not to be coding something for x86 and z180 at the same time, but maybe something like SH3 and ARM or x86 and a3 at the same time.
I know what I posted is described poorly, but I hope you get what I am meaning
This will be a lot more work than making a normal compiler -- this will require a lot more attention at the tables and acceptable conversion methods -- and a really tough syntax to the coder. However, it would be more than work it