In Marie assembly, how can I declare a specific address as a variable?
x should have a value of hex 2c and value should be at address 0015
Currently, I have code:
load x
add x \ 2x
store x
halt
x, hex 2c
I could load 2c to the accumulator, and store it at address 0015, but is there any other way?
Apparently proper command is
org hhhwherehhhare hex digits, and there must be 3 of them — so, for 1516 need to useorg 015, or for 1510 thenorg 00F.I have tested this on marie.js; it gives the error
unknown operator orgif 3 digits are not supplied.Sadly, fyi, I'm having trouble using
orgin any position except first, i.e. in front of all the code & data. So, if you want to put the code ahead of the data, that's going to be difficult without counting lines of code. The followingorgusage will placexat 0x015.Alternately, you might do the following:
Though this will place the code after the data, it involves only counting one line of code, i.e. the
jump start.Note: marie.js will load the initial PC with the org location, so you can relocate code & data to anywhere and it will still start the simulation at the beginning of that code & data.