/f-cpu/ygasm/README.txt
created Mon Jul 16 23:57:59 2001 by Yann Guidon <whygee@f-cpu.org>

hello,
this file explains you some basics about this directory.

First, some files or parts thereof have been written long,
long ago, before F-CPU existed (in the Internet Time Scale :-P),
that is : when i studied for my License in the MIME department
at the University of Paris 8 (1Q1998) . This is where i took my
first lessons in FLEX and BISON. The project back then was
to make an assembler for the SHARC DSP, so i have developped
a framework which included some facilities which matched the ADI
assembler format. This project was called GRAZER (ask me why)
and miserably failed because
1) the ADI asm is completely wicked and it was a real nightmare
to do it in BISON
2) the HW which was meant to use it failed to work, in the
absence of logic analyser in the lab.

However i had kept the sources and used it for playing
on my own "experimental" pseudo-RISC architecure (PFQ-based ISA)
and i have added all the nice features that make this package
valuable : the most useful features of cpp are implemented, such as
#define, #ifdef, #else, #endif, file include, and all are recursive.
I had also created a sophisticated label and variable mechanism
which allowed address computations and 1-pass assembly with
some block-based memory management and backwards value association
of the kind :
  r1 = value
// some code
  value = @+5

Oh btw, "@" represents the value of the current (virtual) PC
(NASM, which is my preferred assembler, uses '$' instead)

                        ---0OoO0---

Then, F-CPU came and i just had to "hack" the assembler a bit.
i don't remember what it became.

Then, the GNL side of the F-CPU project needed a pseudo-C front-end
and i slaughtered the sources heavily : some valuable parts have
been removed because they were unnecessary. I have merged the old
GRAZER code with the PPCM C-parser from my teacher, and rewritten
the label management routines (now it's a binary tree search,
which is faster and simpler than the original linked lists).

Now (summer 2001), i need to generate some binaries so i can test
the emulator currently under serious hack (QDCPOC).
it's more than a simple hack (as i first thought) because much
code must be rewritten after it was removed. However, the first
time is always harder and i don't think it's such a pain as before.

YGASM means : YG's ASseMbler. other F-CPU asm are also being
written by others but you know that i like to control my
working environment.

This code (parser, bison and flex files, ect.) is released under
GPL because i think that it can be useful in whole or part(s).
it's always discourageing to think that you have to do everything
from scratch, and this old code is not getting too cranky, it has
helped me several times.

BUT BE WARNED : I DIDN'T COMPILE IT FOR A LONG TIME AND IT'S SOMETIMES
UGLY, I HAVE USED SOME NASTY TRICKS (what did you expect ? :-P) AND
IT'S CURRENTLY UNDER HEAVY REWORK. THIS RELEASE WILL NOT EVEN COMPILE
PROPERLY AND BE USEFUL.

ok, now : time to code.
if you modify anything, please warn me and indicate what you changed,
mail me (whygee@f-cpu.org) for bug notices.


Sun Aug 12 03:26:25 2001 :
i'll have to add the GNU/GPL headers on all the files.
i've also moved some references to the F-CPU definitions
elsewhere.

dim mar 17 05:49:17 GMT 2002
I have made a first package for the fromfs utilities.
the fromfs images are generated with a NASM source
and i want to use only YGASM. So i have to add some
critical features :
  - restore (rewrite) the backwards symbol assignation
  - add constants (db, dw, dd, dq with various endianness)
  - ensure that ALL computations are performed in 64-bit format
Time to code...
