Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Pekka422

Pages: [1]
Introduce Yourself! / Foreigner in a foreing forum
« on: March 30, 2013, 02:24:42 pm »
Well... please don't flame me, but actually I don't own a single TI calculator, even though I have something like 5 HPs.

Anyway, my reason being here is that I have a home brew Z180 computer (with BASIC interpreter orginally "borrowed" from the swedish ABC-80), and even though I have been working with it (or its predecessors) something like 30 years, I still found out that I occasionally need some help from the web.

I really like writing assembly for my hobby Z80 (actually, currently Z180) and have done that for a while; I have something like 40000 lines of ASM code in my system. And yes, I also have wondered what kind of added instructions would be most benficial, for ASM-coding and for compiler (another language I'm using is BASIC, and of course I have implemented a compiler for it).

So, here some of the instructions, which are appearing all the time in my existing code, or which I would consider usefull implemented as single byte opcodes (there are something like 7 to 11 single byte opcodes, which no-one or at least I am not using)

LD    rr,(HL)      where rr=BC, DE, HL
LD    (HL),ss     where ss=BC or DE
INC2  HL          same as INC HL two times

These are appearing so often, that in my assembler I have created pseudo-opcodes like LD DE,(HL)++  or LD HL,(HL).

For the compiler I would like to have following two single byte opcodes:

LD    DE,(nn)     where nn is 16 bit memory address
LD    HL,SP+s    i.e. HL gets the sum of SP and an 8-bit signed constanst; usefull not only for allocating/deallocating space from stack, but also building a reference to a variable in stack.

And what Z80 is really missing, is couple of indexing registers besides the IX and IY; so I would allocate two of the available single byte opcodes to prefixes for handling these new registers.

Another area where Z80 is lacking, is 16-bit operations. I really would like to have instructions like LD DE,(IX+n) implemented with just 3 bytes, instead of the current 6 bytes (I have also these pseudo-opcodes in my assembler, however, the saving in memory usage would really be wellcome). And yeah, there are a few other opcodes, which would be rather useful...

Pages: [1]