Too Long ?

A project log for Trinity Core and Net

A 32 Bit Variable Length Instruction Set Core and Transputer Like Comms Network

andre-powellAndre Powell 05/10/2020 at 16:220 Comments

Putting a program together I appear to have discovered a limitation.
The Assembler would build up a long string of '1's and '0's using concatenation. This would then be chopped into 32 bits and put into a .mif file.

I had a test program which when ran came up with a non decodable instruction Exception.
This was a PushF instruction that I've used before many times.

Debugging eventually came to a print of the line before and after the concatenation. Low and behold the leading bit of the instruction appeared to disappear.

This means that something somewhere is going wrong in the way that the concatenation operator is working within Perl.

I don't think GAS has the ability to select an instruction depending upon it's possible registers, a smaller instruction could be used if r0 -> r15 is used in comparison to r0 -> r31.

Might need to be a different approach to creating the .mif file.