Author |
Topic: Customizing the IDE (Read 1404 times) |
|
DavidS
New Member
member is offline


Posts: 6
|
 |
Re: Customizing the IDE
« Reply #4 on: Sep 17th, 2013, 1:00pm » |
|
Pity, as I was hoping it would produce stand alone exes and dlls. I assumed it did as your MSF utility is a single exe which I thought you compiled using BBC Basic.
|
| « Last Edit: Sep 17th, 2013, 1:03pm by DavidS » |
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: Customizing the IDE
« Reply #5 on: Sep 17th, 2013, 3:51pm » |
|
on Sep 17th, 2013, 1:00pm, DavidS wrote:| Pity, as I was hoping it would produce stand alone exes and dlls. |
|
It does (of course) produce standalone EXEs, but not DLLs.
Quote:| I assumed it did as your MSF utility is a single exe which I thought you compiled using BBC Basic. |
|
There is no reason why an interpreted language shouldn't create a standalone EXE; BBC BASIC for Windows is one of many that do. Indeed these days using a run-time engine is probably a more common technique than 'conventional' compiling/linking (think Java and .NET for example).
You could even argue that modern CPUs are optimised for this technique, since the Instruction Cache is often just about large enough to contain the entire run-time engine, which therefore executes very quickly (the 'program' is treated as data, which is contained in a typically much larger cache). A traditional compiled-to-machine-code program will in contrast typically be much larger than the instruction cache, so may result in 'cache thrashing' during execution.
Richard.
|
| « Last Edit: Sep 17th, 2013, 4:06pm by admin » |
Logged
|
|
|
|
DavidS
New Member
member is offline


Posts: 6
|
 |
Re: Customizing the IDE
« Reply #6 on: Sep 17th, 2013, 4:43pm » |
|
on Sep 17th, 2013, 3:51pm, Richard Russell wrote:It does (of course) produce standalone EXEs, but not DLLs. |
|
Now you got me very confused, as previously you wrote:
Quote:In any case BBC BASIC is interpreted, so there's no conventional 'compiling' or 'linking' involved: |
|
Or by this:
Quote:| the 'program' is treated as data |
|
Do you mean that the basic source file is included (possibly as tokens) then your "compiler" takes parts or the whole of BBCWRUN.EXE and creates another exe with these tokens as included data?
Sorry to be a pain with all these questions but I'm trying to understand the process.
|
| « Last Edit: Sep 17th, 2013, 4:49pm by DavidS » |
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: Customizing the IDE
« Reply #7 on: Sep 17th, 2013, 7:16pm » |
|
on Sep 17th, 2013, 4:43pm, DavidS wrote:| Sorry to be a pain with all these questions but I'm trying to understand the process. |
|
A BB4W executable consists of the run-time engine (code) plus the tokenised/compressed BASIC program (data) bound into a single Portable Executable file. Also incorporated in the EXE are embedded library and resource files (if any), an icon and a manifest. It is also possible to incorporate other resources, such as version information, by means of REM!Resource compiler directives.
None of this is particularly out-of-the-ordinary. Installer/setup programs typically create similarly-structured EXEs, because they too combine multiple compressed files plus an extract/install program in a single PE-format file.
If you have only previously encountered EXEs created by a traditional linker you have led a rather sheltered existence!
Richard.
|
|
Logged
|
|
|
|
|