XML-based object orientated pre-Assembler

From: Jure Sah (jure.sah_at_guest.arnes.si)
Date: 03/04/05


Date: Fri, 04 Mar 2005 00:26:14 +0100

Hello,

I have been promising an object orientated ASM IDE for a while now.
Trying to make the best of what is already here, I have made a compiler,
that will parse XML code and output ASM files.

The program still needs an internet interface (will do that tommorow),
but here is an example of what the code looks like, to wet your appetite:

        <?xml version="1.0"?>
        <code
        xml:base="http://my.webspace.com/"
        xmlns:xlink="http://www.w3.org/1999/xlink">
                <Default xmlns:href="Default.xml"></Default>
                <RegisterA xmlns:href="AX.xml">
                        <RegisterB xmlns:href="BX.xml">
                                mov ax,00FFh
                                mov bx,0FF0h
                                cmp ax,bx
                                mov cx,ax
                        </RegisterB>
                </RegisterA>
                mov ax,cx
        </code>

The point is, that since the compiler is W3C XML and XLink compilant,
you can now use whichever XML editor (IDE) to work with your ASM code
(colorfull, named XML tags tend to be lighter on the eyes, when you are
looking for something in the code). The compiler works like this example:

        <Whatever xmlns:href="AX.xml">
        ...
        </Whatever>

Relates to this file (AX.xml):

        <?xml version="1.0"?>
        <Compiler>
         <Begin>
                  push ax<br>
                mov ax,0000h
           </Begin>
           <End>
                  pop ax
           </End>
        </Compiler>

To produce this code:

        push ax
        mov ax,0000h
        ...
        pop ax

And while this example may seem silly, using this and an XML editor, it
becomes much more unlikely for you to end up with an out-of sequence
stack and any of the terrible consequences this usually brings. Not to
mention the segments can be labeled, making the program easier to read.

The XLink-ed XML of course, can be made to point to any ASM code you
choose and best of all, they do not need to be on the machine your are
compiling on, but anywhere on the internet. In this way you can define a
simplified language with these XML objects, then put them on a web
server and you never have to worry about them again, you can create
programs that you share with your friends / coworkers over the internet
and you only have to send them your XML program (which I might add is
also doomed to be much more understanable than the compiled ASM to them)
and if they wish to compile it, the components needed will be downloaded
automatically durring the compilation procedure.

The other good thing about this is that, if there ever will be large
compatible databases of these XML objects online, porting an ASM program
  written in this XML language (to another ASM form or to diffirent
hardware / software) will be simply a matter of changing the XML:base
link (xml:base="http://my.webspace.com/") to point to another location,
compile and viola, the code is ported.

I might improove the language used in case it turns out to be too
loosely compilant to W3C standards or if there are other practical
aspects of the XML standard that can be used, but it will be
backwards-compatible and I will avoid fixed high-level features such as
the many in HLA. I have no intention of reinventing hot water.

P.S.: You will notice that the XML compiler can also be used to compile
anything else made up of text, not only ASM programs.

Coming soon! Like... tommorow! Now I got to go to bed. =P

-- 
Model: INFJ
Primary function: Coprocessor
Secondary function: Cluster commander
"None felt feline, so I discounted copycat syndrome..."
	-- Ghost Song


Relevant Pages

  • optimizers are overrated
    ... I started learning ASM not long ago to improve my understanding of the ... The first function uses a typical C style loop to ... which one is more efficient all you guys would reply "the compiler will most ... so my "write C like ASM" optimization worked. ...
    (comp.lang.c)
  • Re: XML-based object orientated pre-Assembler
    ... > I have been promising an object orientated ASM IDE for a while now. ... > that will parse XML code and output ASM files. ... > compile and viola, the code is ported. ... "Why would someone use this product over other assemblers?" ...
    (alt.lang.asm)
  • Re: next ISO/ANSI standard for C++
    ... > to XML widespread-ness, but mostly to the length of one's career, no? ... 3rd party libraries. ... Wouldn't it be good to just provide a standard ... The more the compiler has to decide, the less probable it is to ...
    (comp.lang.cpp)
  • Re: C++ in ternms of C
    ... >about class and struct difference. ... How is the private and public part ... I tried to analise the ASM file produ ced my the VC++ compil er. ... >epresented by the c++ compiler in translation to intermediate stage. ...
    (microsoft.public.vc.language)
  • Re: [OT] Sed and Awk
    ... including leaving out the compiler and the libs necessary to ... then ASM would be the way to go. ... > debugging a suspected compiler bug? ... > the same assembly as nested ifs from my target compiler). ...
    (comp.unix.shell)