why can't I set value of M > 1?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

why can't I set value of M > 1?

gauze
if I do

@a
M=2

I get "expression expected" error, 0 or 1 are fine, 2 doesn't work, 10 doesn't work, are you really limited to a single bit or is there something I am totally and completely missing here? I have read up to 4.2 in the book over and over and I seriously have no idea what this error is about. As I understand it in C this would be:

RAM[a]=2;

please any help is appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: why can't I set value of M > 1?

cadet1620
Administrator
Yes, the only constants that can be directly set to RAM are 0, 1, and -1.

This is because "M=..." is a C-instruction (4.2.3) and the only computations allowed are those in figure 4.3. To set any other value into RAM, you need to first set it into D so that you can use "M=D".

--Mark