Hi,
I am struggling with the lburg syntax. I can get it to emit the most basic instructions but don't fully grasp how to do certain things. The book is not helping either.
I have an instruction that loads a memory word into a reg using a base and offset, each in a reg:
ldw.i tgt-reg, (offset, base)
I can't figure out how to describe this addressing mode in my lburg file. How do I tell it, it should load atlas a base into a reg first?
Any pointers in the right direction would be appreciated.
Erwin
is this, for example loading a local from the stack frame?
I handle something a bit similar with a macro where LCC emits ld2 tgt-reg,base-reg,offset-constant and a macro does the loading of base plus offset into a register and then loading the value. Could you do that?
On Sunday, March 12, 2017 at 6:56:17 AM UTC-4, erwin.ma...@gmail.com wrote:
Hi,
I am struggling with the lburg syntax. I can get it to emit the most basic instructions but don't fully grasp how to do certain things. The book is not helping either.
I have an instruction that loads a memory word into a reg using a base and offset, each in a reg:
ldw.i tgt-reg, (offset, base)
I can't figure out how to describe this addressing mode in my lburg file. How do I tell it, it should load atlas a base into a reg first?
Any pointers in the right direction would be appreciated.
Erwin
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 185 |
Nodes: | 16 (1 / 15) |
Uptime: | 58:03:00 |
Calls: | 3,747 |
Files: | 11,167 |
Messages: | 3,458,171 |