Techniques for programming procedural coprocessors
ZXNet echo conference «code.zx»
From Alexey Goncharov → To All 29 December 2006
Hello andrews
The direct way is to unify the command system by emulating one on the other. Vestimo
not arma on Z80 =) Thoughts about the “compilation driver” are out of touch IMHO
completely...
From Andrey Savichev → To All 29 December 2006
Hello, All
Happy New Year everyone.
This is a draft of an article, so it’s abstract.
Problem statement: we have z80 and ARM. We want to write programs for z80 using
its software and hardware environment (ZX Spectrum), but at the same time
using the capabilities of ARM. Write two programs every time instead of one
uncomfortable. How to make your life easier?
It is clear that we need to automate the process of obtaining the code. If the processors
connected not through memory (CPDP, memory manager, dual-port memory with
separation mechanisms), and through communication channels (RS-232, parallel port bit,
parallel port), it is required to organize data transfer through protocols
exchange using special library procedures (C), or macros
assembler
Is it possible to do without SRV? It is possible when the z80 gets to the procedure call,
which runs slowly on it, it stops (and processes
interrupt) or enters the I/O loop until the interrupt is received
from the "procedural processor", which is ARM. In case
using the C compiler, instead of the usual standard library
connect a specialized one (in the case of assembler, call macros). How
be with a "procedural processor"? Same source code again
compiles for it too. Only the functions and procedures themselves are provided
interface for receiving calls and parameters from the main "client" andtransferring the results of processing (calculations) to him. This can also be done with
using a specialized library. To automate and harmonize both
processes, you can write a compilation driver. If different
operating systems, it is necessary to use different sets of libraries.
From Andrey Savichev → To All 29 December 2006
Hello NovaStorm
It’s possible to emulate commands, but what about the software and hardware environment? gnu-C has
support for both z80 and arm, so it's just a matter of libraries. Of course, myself
a programmer can use conditional compilation to make life easier
compilation driver.
#ifdef arm_present
int my_algoritmpp(int a,int b,int c)
{
}
#else
int my_algoritm(int a, int b, int c)
{
}
#endif
can you just
slow int my(int a, int b, int c)
{
}
and the slow attribute will force the preprocessor in case of pass
compilation for z80 and
#define arm_present
insert
int my_algoritmpp(int a,int b,int c)
{
}
and in the case of a pass for arm
int my_algoritm(int a, int b, int c)
{
}
but with the corresponding libraries
From Raydac → To All 29 December 2006
Hello NovaStorm
Nov> The direct way - unification of the command system by emulating one on
Nov> friend. Vestimo not arma on Z80 =) Thoughts on the “compilation driver” IMHO
Nov> completely torn off from the soil...
Yes, after reading Andrei’s “scientific” reasoning, you come to the question - why in such a
architecture in general Z80? He is trying to insert a Z80 into his “virtual hardware”
like the British the queen.. “it seems to exist, but it doesn’t seem to rule”... :)" .. with
If you have ARM, you can unload the “queen” altogether, why strain something in its
architecture, the power bus is redundant for the Z80 :)
No matter how you read it, it turns out that he invents the HP iPAQ 2210 :) only
the problem is that it already exists and is selling well... and the Z80 emulates with
Spectrum is great..))
From Andrey Savichev → To All 29 December 2006
Hello Raydac
I'll try to start writing a compilation driver during the Christmas holidays and
libraries for gnu c. My modest achievements will be made public in this thread.