New project.
ZXNet echo conference «code.zx»
From Arseniy Astapenko → To Kirill Frolov 30 October 2000
Hello, Kirill!
October 26, 2000 01:34, Kirill Frolov wrote to Oleg Dokukin:
KF> level, and at least somewhat compatible with the standard library
KF> higher-level functions, of which only the necessary ones are connected
KF> for the program.
Such libraries can be easily written even on ASMA if you use conditional
compilation and macros.
KF> but they read and wrote on it almost... After all, it’s time for development and debugging
KF> there are many times more programs in pure assembly than in C, maybe 10 times
KF> it’s easy to be, and not only longer, but also more difficult. This is the same for
KF> spectrum is just wasted man-years of work and megabytes of useful stuff
KF> software.
From my experience working at GBC, I can say that this is how everything was planned.
Asmov libraries were written for basic low-level
functions /approximately/:
1. display.lib - setting display modes; cleaning and loading
resource palettes, tiles, attributes and chr codes; calculation of screen address in
acquaintances; including fast procedures for special effects.
2. objects.lib - constructor, player and animation destructor, collision
detection
3. sound.lib - music. player + sfx effects
4. common.lib - keypad polling, cleaning, copying and sorting arrays5. math.lib - multiplication, division, square root, cos, sin
6. tilemgr.lib - video memory manager
7. memmgr.lib - ram manager
etc.
It was assumed that all this would be addressed from other sources.
However, the use of libs turned out to be so convenient that
and you can easily work with it from ASMA. (The library data contains
almost all low-level and time-critical functions).
So, when all this is there, writing any program turns out like
children's construction game - build it yourself ;) Using either
saves at least 50% of time.
The second is the use of resources in the program and the desire
to universality, especially in the case if the procedure is uncritical
by time. The idea of using resources is very simple - change
either does not cause changes to the program code at all, or these
changes are made automatically during compilation.
The simplest example of a resource is the sprite format in spriteland
(by DR). The resource consists of a header + actual data.
Let's say the header indicates the width/height of the sprite.
And the procedure that displays the sprite uses this data as parameters.
The differences are clear in the examples:
ld bc,$0303
ldhl,IconData
ld de,$4000
call ShowSpriteData
....
IconData: incbin "data.C"
ldhl,IconResource
ld de,$4000
call ShowSprite
ShowSprite:
ld b,[hl]
inc hl
ldc,[hl]
inc hl
....
IconResource: incbin "res.C"If we say the size of the sprite has changed, then just
is done by another incbin, and the program works as usual
The example is certainly primitive, but even it saves time
for the development of the subject :)
KF> Mednonogov why didn’t want to finish the ChV-2, I’m just sure
KF> that one of the reasons was simply hatred of assembly language. Plus to
This is unlikely to be the real reason ;)
2:5015/133.29@FidoNet was with you
Ars^FTL mailto:arseniy@pochta.by
From Arseniy Astapenko → To Kirill Frolov 8 November 2000
Hello, Kirill!
02 November 2000 12:26, Kirill Frolov wrote to Arseniy Astapenko:
KF>>> set
KF>>> higher-level functions, of which only are connected
KF>>> necessary for the program.
AA>> Such libraries are easy to write even on ASMA if you use
AA>> conditional compilation and macros.
KF> First of all, you have all the scope of identifiers
KF> get mixed up, inconvenient, in short.
I don’t remember how this is implemented in Spec’s software, but
Let's say in rgbasm there is a division of identifiers into
local and global. Locals start with a dot (.)
and act only within procedures, global ones - with
underscores (_) are entered into the global table
marks. However, an ordinary label can also be made global
writing:
global label
In practice, the starting marks are global for libs
all procedures.
KF> And secondly, it’s easy on ASMA
KF> inconvenient and buggy, only perhaps fast.
This is why libs are made, so that questions can be asked about the data.
There were no code sections.
KF> Hy and assemble the binary
KF> will be several times longer if large.Collecting a bunch of files on the flop is really a reason to run to the store :)
But in principle, you can also store something in a page, it’s unlikely
The size of the clean code will exceed 16K ;)
KF>>> Mednonogov why didn’t want to finish the ChV-2, I’m just sure
KF>>> that one of the reasons was simply hatred of assembly language. Plus
KF>>> k
AA>> This is unlikely to be the real reason ;)
KF> Yes, I know, Bill Gates is a great force and Microsoft is his dad...
By the way, I played it on gbc in microsoft puzzle collection :)) It works
almost like Windows, but better :)
2:5015/133.29@FidoNet was with you
Ars^FTL mailto:arseniy@pochta.by