BBC BASIC for Windows
« Using REM!Fast for alignment »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 9:59pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: Using REM!Fast for alignment  (Read 426 times)
rtr2
Guest
xx Using REM!Fast for alignment
« Thread started on: May 23rd, 2015, 11:55am »

One of the effects of REM!Fast is to align the specified scalar variable(s) - but not arrays - onto a DWORD boundary, i.e. an address which is an exact multiple of 4. This can contribute to a speed improvement but may also be useful in its own right.

For example if a variable is accessed from assembler code the primary effect of REM!Fast is irrelevant (the variable is accessed by name only when the code is assembled, so there is no benefit in speeding up this access) however aligning the variable may nevertheless have an advantage, such as guaranteeing atomicity.

Of course in a situation when a variable must be aligned then REM!Fast is not usually a good method, because it means the program cannot be tested in the IDE. Using a conventional method of achieving alignment (e.g. putting the variable in a structure) is normally more appropriate.

Richard.
« Last Edit: May 23rd, 2015, 2:46pm by rtr2 » User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls