Closed douggilliland closed 5 years ago
@mjgpy3 I figured out part of it and updated the Assembler wiki. The _dat file needs to be in the .HEX format just like the _ins file. It gets loaded the same.
There's some wrong stuff in there too. See the C021 example I checked in.
https://github.com/douggilliland/R32V2020/tree/master/VHDL/Programs/C021-Data_RAM_Init_Vals
@mjgpy3
Here is what .string 'Hello, World' looks like (manually created):
:0400000048656C6C77 :040001006F2C2057E9 :040002006F726C6449 :0400030000000000F9 :00000001FF
C029... code
@mjgpy3 I can't remember what the data representation is in the assembler.
Can you write a short section in the Assembler Wiki? Maybe in this section that I started. https://github.com/douggilliland/R32V2020/wiki/Assembler#Data_File_Format
I think we had
label: .string "This is a string" label2: .long 0x12345678
Is that the format?
This will need some work for the opcodes to pick up the label. Maybe we need something like:
lil r8,label.LOWER liu r8, label.UPPER
The label is at a 32-bit address and the only way we have to get the address is in two parts.
What do you think?