On Mon, 30 Jan 2012, rvmart...@ntlworld.com wrote:
michael.vancann...@wisa.be wrote the following on 30/01/12 14:49:53:
I think the reason for producing an ASCII version first is very simple:
All FPC sources - including the compiler - are in ASCII encoding.
I don't understand this statement - ASCII and EBCDIC are just human
representations of a computer's internal code.
I write my programs in the Latin (or Roman) alphabet and the computer does the
rest.
When I was writing VS/Pascal programs I used the same source code as input to
VS/Pascal on the mainframe and to Virtual Pascal on the PC.
Unless the FP source code is to be fed into a mainframe compiler like
IBM's VS/Pascal or the Stanford compiler then the first step is surely to
write a backend for the (eg PC) compiler to produce 370 assembler code.
Producing EBCDIC rather than ASCII sounds a trivial part of the task.
I had in mind the following scenario:
1) Somehow we build - using cross-compilation - a first version of the
compiler that actually runs on the 370. This binary is transferred to a
370 machine.
2) The sources of the compiler and RTL are transferred to the 370.
I assume that after the file transfer, the sources are still in ASCII format
?
3) At that point the compiler can try to recompile itself on the 370
machine.
Unless you have performed some tranformation of the compiler/RTL sources,
the compiler in step 3 will read and compile from ASCII sources, no ?
Michael.
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel