Page 1 of 1

S3C8 Registers

Posted: Sun Aug 22, 2010 9:09 am
by vickyg2003
I was revisiting the S3C8 language and I need a crash course in registers. Obviously I knew something about this at one time, I think Bill explained it to me, but I've forgotten everything.

Does W0 have something to do with RC0?

If I have memory aids, like mneumonics, perhaps I could remember what is what.

Posted: Sun Aug 22, 2010 9:31 am
by The Robman
W0 is a pseudonym for RC0, they are exactly the same register.

You can always refer to the scratch registers using their full names (ie, RC0, RC1, etc) but the instructions typically use more bytes of memory than the equivalent instructions (when available) that use the short names.

Posted: Sun Aug 22, 2010 3:17 pm
by mr_d_p_gumby
In PB, W0 and RC0 are treated as equivalent and the assembly will use the shorter instructions in either case. W0 thru WF are the same as RC0 thru RCF, respectively.

Actually, this can be changed, but I have never seen the remote firmware do it (outside of an extender), so you can assume the above to be true.