Close

Memory block transfers

A project log for Lion FPGA CPU/Computer

A 16-bit (and a 32bit) FPGA CPU I call Lion CPU and a computer, the Lion computer. Everything built from scratch.

leonLeon 07/06/2019 at 14:520 Comments

I keep adding instructions that i think are useful or add speed as long as unused opcodes are available.

I added ram block transfer commands. The IDX register that was used as a loop counter and index, is used by the transfer instructions to hold the number of words to be moved.
Instructions MTOM, MTOI, ITOM, ITOI with two arguments An1,An2 move fast blocks of words starting from memory or IO address An2 to memory or IO address An1.

Instructions NTOM, NTOI with arguments An1,N or An1,An2 fill the block pointed by An1 of size IDX+1 with the 16 bit value N (or An2).

    MOV A1,buffer1
    MOV A2,buffer2
    SETX 99
    MTOM A1,A2  ;copy the 100 words block starting at buffer2 to buffer1
    SETX 99
    NTOM A2,0   ;fill buffer2 with zeros

These new instructions drastically improved scrolling routines speed

Discussions