Page 1 of 1

Assembler - SCON.

Posted: Sat Sep 13, 2014 10:32 pm
by Aardhya D
Hi

I wanted to know about data-type SCONs like VCONs and ACONs. Can anyone give some information. i am not yet clear about it.

Thanks

Re: Assembler - SCON.

Posted: Sat Sep 13, 2014 11:18 pm
by Robert Sample
A memory location contains data. The data that an address constant (VCON or ACON, for example) contains is a reference to another memory location. This is done because when a program is assembled, there is no way to know in advance where in memory it will be loaded to execute, so absolute addresses are not possible at that time. When the program is loaded into memory to execute, the address constants are resolved to absolute addresses. Example: location 2000-2003 contain 'ABCD'. Location 1000 contains the address constant 2000. You could load address 1000 into register 3, then load register 4 from the address in register 3 -- this would put 'ABCD' into register 4.

This is an extreme simplification of the process, and ignores many of the details, but hopefully you can understand address constants better. Note that the difference between a VCON and ACON is location -- VCON is outside the CSECT while ACON is inside.

Re: Assembler - SCON.

Posted: Mon Sep 15, 2014 1:48 pm
by Aardhya D
Thanks for the great and simple explnation Robert. :)