BBC BASIC for Windows
« Modularising programs »

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



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: Modularising programs  (Read 499 times)
PaoloR
New Member
Image


member is offline

Avatar




PM


Posts: 4
xx Re: Modularising programs
« Reply #2 on: Oct 3rd, 2012, 03:02am »

Richard: thanks for the clarification.

Quote:
Whereas a module loaded using INSTALL should contain only FNs and PROCs, a module executed using CALL should contain only in-line code and no FNs or PROCs.


As I'm new to BBC Basic what exactly is in-line code? I understand the concept of in-line assembler but I presume you are referring to Basic with this comment. Presumably just a series of Basic statements in, ahem, unstructured fashion?

Also, I assume that INSTALLing files loads them into memory at program commencement and leaves them there for the duration of the program run. Would this be a correct assumption?

TIA
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: Modularising programs
« Reply #3 on: Oct 3rd, 2012, 3:40pm »

on Oct 3rd, 2012, 03:02am, PaoloR wrote:
Presumably just a series of Basic statements in, ahem, unstructured fashion?

Yes, that's what I mean. The sort of thing CALL filename is useful for is executing a file containing constant declarations, or structure declarations, or the like. That way it saves some memory since once the declarations have been made there's no need for the code to be 'resident' any more.

Quote:
Also, I assume that INSTALLing files loads them into memory at program commencement and leaves them there for the duration of the program run. Would this be a correct assumption?

Yes. The libraries are loaded above HIMEM, and if there is (unusually) a requirement to discard them you can do it using this trick:

Code:
      HIMEM = HIMEM + 1
      HIMEM = HIMEM - 1
      CLEAR 

Otherwise they remain resident until the program is next run.

Richard.
User IP Logged

PaoloR
New Member
Image


member is offline

Avatar




PM


Posts: 4
xx Re: Modularising programs
« Reply #4 on: Oct 3rd, 2012, 9:02pm »

Richard: thanks for the clarification.
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