Started by Donald Darden, May 21, 2007, 11:43:53 PM
0 Members and 1 Guest are viewing this topic.
QuoteUnfortunately, when you use REGISTER, you can designate which variable to assign to an available register, but you are not able to designate which register to use.
Quote from: Donald Darden on May 21, 2007, 11:43:53 PMI noted that when using Assembler in PowerBasic, that you can possibly run into a conflict situation.
Quoteyou may need to use #REGISTER NONE in a function that makes uses of byref variants because register variables can be used and will give an error.
QuoteIf you permit PowerBasic to use registers for some variables, using the #REGISTER ALL, #REGISTER DEFAULT, or REGISTER directives and statement.
QuoteThat is, if PowerBasic assigns a variable to a register for faster processing, and you attempt to access that variable from memory using some assembler instructions, you will bypass and defeat the efforts of the compiler to perform optimization there.
QuoteSo the problem is, if you want to improve performance by writing some assembler code, you may have to use #REGISTER NONE so as to avoid possible conflicts with the compiler's allocation scheme for variables, and that reduces the amount of optimization that the compiler will attempt.
QuoteOften, you see people defining LOCAL variables inside a Sub or Function, then assigning a passed parameter to a given local variable before trying to use it with assembler code.
QuoteJust try to give PowerBasic back what it had prior to your changes. and you should have few problems.
Page created in 0.156 seconds with 22 queries.