BBC BASIC for Windows
« Compiling ASM program containing array labels »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:32pm



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: Compiling ASM program containing array labels  (Read 2284 times)
admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Compiling ASM program containing array labels
« Reply #6 on: Jun 2nd, 2009, 08:34am »

Quote:
I used a two-dimensional array

OK. Personally I'm not keen on that approach, partly because it runs somewhat contrary to the principle of 'information hiding' (having a data structure shared between more than one routine that needn't be) and partly because it makes the labels so 'anonymous' (all called 'label' something!).

I think my preferred approach (had it worked!) would have been to use a separate array for each routine, perhaps with the same name as the routine itself. So the routine GFXLIB_Plot would have had labels GFXLIB_Plot(0), GFXLIB_Plot(1) etc.

If I was faced with converting what you've got to a structure-member approach (which again I'd want to be self-contained to each routine) I'd write a little utility in BASIC to do it!

Richard.
User IP Logged

David Williams
Developer

member is offline

Avatar

meh


PM

Gender: Male
Posts: 452
xx Re: Compiling ASM program containing array labels
« Reply #7 on: Jun 2nd, 2009, 10:04am »

on Jun 2nd, 2009, 08:34am, Richard Russell wrote:
OK. Personally I'm not keen on that approach, partly because it runs somewhat contrary to the principle of 'information hiding' (having a data structure shared between more than one routine that needn't be) and partly because it makes the labels so 'anonymous' (all called 'label' something!).

You've probably noticed that I tend to comment my code verbosely! So, for me personally,
the 'anonymous' label names aren't a problem because I always include an informative comment
on the same line:

Code:
.label%(37,3)              ; .GFXLIB_AlphaBlend__skip

jmp label%(37,5)           ; GFXLIB_AlphaBlend__exit

etc. 



on Jun 2nd, 2009, 08:34am, Richard Russell wrote:
If I was faced with converting what you've got to a structure-member approach (which again I'd want to be self-contained to each routine) I'd write a little utility in BASIC to do it!

Well, again, thanks for another excellent suggestion, but I best channel my energy into
improving the efficiency of existing routines, developing new ones, writing more examples,
and finishing the currently very poor documentation.


David.
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