News
As you have probably already guessed, under the guise of news I offer you various thoughts of mine and other nonsense, although sometimes my statements can indeed be classified as news :)
Recently, I got access to the Internet and downloaded a file containing Spectrum music. In packed form, this stuff takes up about 8 megabytes; unpacked, it is 37 megabytes. You can imagine what an enormous amount of music that is (about 11,000 files). It made me nostalgic, so this issue features a well-known tune in a new arrangement.
New versions of the programs—the viewer and the editor. You have probably noticed that the viewer's version changed from 0.5 to 0.5+, while the editor's version went from 0.2 to 0.3, despite a roughly similar number of fixes and additions. That is simply because I came up with the idea of synchronizing the program versions to make them easier to keep track of. If you don't know, the program versions are displayed in the settings window title bars. But I forgot about this feature in viewer version 0.5, so it shows the numbers 0.4. I'll try to be more attentive in the future.
In one of the previous issues, I talked about the idea of a modular program structure. Recently, I spent some time looking through the source code and, I think, solved the problem of cross-references between modules. Now, lines of the following kind are written at the beginning of a module:
That is, in addition to the section listing its public entry points, a module stores the entry points it needs from other modules. Here is how a program is assembled from a heap of modules:
- The code sections of the modules are loaded byte-for-byte into a free area of memory. Internal addresses are adjusted along the way.
- A global table of exported entry points is created. At this stage, name conflicts are identified and the corresponding error messages are issued.
- The names are taken one at a time from the modules' external entry-point tables, and their offsets are searched for in the exported-entry-point table. Unknown entry points are also reported as errors.
- The result is a code block effectively compiled for the required memory area, even though the destination address may differ from the code's actual address.
As soon as I have a more or less working version of the macro file and settle on a format for storing data in a module, I will publish its text. I hope many of you will discover quite a few new things :).
Share your thoughts about the article