基于XML的面向对象的预汇编程序 [英] XML-based object orientated pre-Assembler

查看:47
本文介绍了基于XML的面向对象的预汇编程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我一直承诺面向对象的ASM IDE已经有一段时间了。

试图充分利用已有的东西,我已经制作了一个编译器,

将解析XML代码并输出ASM文件。


该程序仍然需要一个互联网接口(会做那个tommorow),

但这里有代码的例子,以满足你的胃口:


<?xml version =" 1.0"?> ;

< code

xml:base =" http://my.webspace.com/"

xmlns:xlink = http://www.w3.org/1999/xlink">

<默认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& gt;


重点是,既然编译器是W3C XML和XLink编译器,那么你现在可以使用任何XML编辑器(IDE)来处理你的ASM代码

(当你在代码中寻找某些东西时,炫目,命名的XML标签往往会更轻松。)编译器的工作原理如下:


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

...

< / Whatever>


与此文件(AX.xml)有关:


<?xml version =" 1.0">

<编译器>

<开始>

推斧< br>

mov ax,0000h

< / Begin>

< End>

pop ax

< /结束>

< /编译器>


生成此代码:


push ax

mov ax,0000h

...

pop ax


虽然这个例子看起来很傻,使用这个和一个XML编辑器,它变得更不可能让你最终得到一个无序的
堆栈以及这通常带来的任何可怕后果。不要提供
提及可以标记段,使程序更容易阅读。


XLink-ed XML当然可以指向任何ASM代码你

选择,最重要的是,他们不需要在你的机器上编译你的b $ b b,但在互联网上的任何地方。通过这种方式,您可以使用这些XML对象定义一个简单的语言,然后将它们放在一个Web服务器上,您再也不用担心它们,您可以创建它们

您通过互联网与朋友/同事分享的程序

您只需向他们发送您的XML程序(我可能会添加它是

也注定要比编译后的ASM更加难以理解。

如果他们希望编译它,所需的组件将在编译时自动下载

程序。


关于这一点的另一个好处是,如果在线存在这些XML对象的大型

兼容数据库,移植ASM程序<用这种XML语言编写的
(到另一个ASM表单或不同的硬件/软件)只需要更改XML:base

link(xml:base =" http://my.webspace.com/")指向另一个位置,

编译和中提琴,代码被移植。


我可能会改进使用的语言,以防它被证明太多

松散地对W3C标准进行了编辑,或者如果有其他可用的XML标准的实用方面,那么它将向后兼容并且我将避免固定的高-Level功能,例如

HLA中的许多功能。我无意重新发明热水。


PS:您会注意到XML编译器也可用于编译

由文本组成的任何其他内容,不仅仅是ASM计划。


即将推出!喜欢...... tommorow!现在我要去睡觉了。 = P


-

型号:INFJ

主要功能:协处理器

辅助功能:集群指挥官


没有感觉到猫科动物,所以我打折了山寨综合症......

- 鬼歌

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

推荐答案

2005年3月4日星期五00:26:14 +0100,Jure Sah写道:


[snip]


我不得不说这是一个非常有创意的汇编程序你正在创建...

虽然我确实问过,XML给我的纯文本是什么?


Vi和Emacs,非常棒的通用文本编辑器,都提供语法

突出显示,以及大量汇编程序知道如何包含文件。


虽然看起来它可以工作但我必须看到程序本身

虽然做出决定。


PS。看起来有点像Beth所说的统一模型:)


Percival
On Fri, 04 Mar 2005 00:26:14 +0100, Jure Sah wrote:

[snip]

I''d have to say that it is a very creative assembler you are creating...
Though I do ask, what does XML give me over plain text?

Vi and Emacs, very awesome general purpose text editors, both offer syntax
highlighting, and plenty of assemblers know how to include files.

Though this looks like it could work, I''d have to see the program itself
though to make a decision.

PS. Looks kinda like that Unified model Beth was talking about :)

Percival




" Jure Sah <菊****** @ guest.arnes.si>在消息中写道

news:42 ************** @ guest.arnes.si ...

"Jure Sah" <ju******@guest.arnes.si> wrote in message
news:42**************@guest.arnes.si...
你好,
我一直承诺面向对象的ASM IDE已经有一段时间了。
为了充分利用已有的东西,我已经制作了一个编译器,它将解析XML代码和输出ASM文件。
....
虽然这个例子可能看起来很愚蠢,但是使用这个和XML编辑器,它变得更不可能让你最终失去序列
堆叠和通常带来的任何可怕后果。不要提及可以标记的段,使程序更容易阅读。


听起来你真的想要创建一个XML版本的

传说中的BethTools。系统(了解详细信息)。

XLink编辑的XML当然可以指向您选择的任何ASM代码,最重要的是,它们不需要是在你的机器上编译,但在互联网上的任何地方。通过这种方式,您可以使用这些XML对象定义简化语言,然后将它们放在Web服务器上,您再也不用担心它们了,您可以创建您共享的程序与您的朋友/同事通过互联网
您只需向他们发送您的XML程序(我可能会添加它也注定比编译的ASM更难以理解)
如果他们希望编译它,所需的组件将在编译过程中自动下载。


又有什么意义?

关于这一点的另一个好处是,如果有大量的
兼容的数据库这些XML对象在线,移植用这种XML语言编写的ASM程序(到另一个ASM表单或不同的硬件/软件)只需要改变XML:base
链接(xml:base =" http://my.webspace.com/")指向另一个位置,
编译和中提琴,代码被移植。


好​​吧,如果你要放弃对机器的依赖,那肯定会让我感觉好像你这样做,那么为什么不仅仅是使用HLL吗?

我可能会改进使用的语言,以防它对W3C标准过于松散地了解或者是否有其他实际的方面。可以使用的XML标准,但它将向后兼容,我将避免固定的高级功能,例如HLA中的许多功能。我无意重新发明热水。

PS:您会注意到XML编译器也可用于编译由文本组成的任何其他内容,而不仅仅是ASM程序。 />
即将推出!喜欢...... tommorow!现在我要去睡觉了。 = P
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. ....
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.
It really sounds like you''re trying to create an XML version of the
fabled "BethTools" system (seach Google for details).

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.
And what''s the point?

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.
Well, if you''re going to give up machine dependence, which it sure
seems to me like you''re doing this, then why not just use a HLL?

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




祝你在世界上好运,但是你回答了几个重要的问题:


1.此产品的受众是谁?

2.此产品的用途是什么?

3.为什么有人会使用这个产品而不是其他装配工(或HLL)?


HLA,例如,旨在支持开始装配

语言程序员。这完全回答了上面的三个问题。

你提出了什么好处?能够使用XML编辑器编辑你的汇编程序

对于这里的大多数程序员来说都不是很好的开启。

的确,从经验来讲,我可以很漂亮很多人向你保证

只有很少一部分现有的程序集编程人员,一旦完成,他们就会愿意切换到你的系统。

让初学者成为这种系统唯一的大市场。对于那些想要学习装配的人来说,这有什么好处呢?也许

那些已经了解XML的人? (我不知道...)。当然,如果

你就像赫伯特一样,你只想自己创建一个

的汇编程序,就可以了。

干杯,

Randy Hyde



I wish you all the luck in the world, but have you answered a
couple of important questions:

1. "Who is the audience for this product?"
2. "What is the purpose of this product?"
3. "Why would someone use this product over other assemblers (or HLLs)?"

HLA, for example, was designed to support beginning assembly
language programmers. That completely answers the three questions above.
What benefits are you proposing? Being able to edit your assembly programs
with an XML editor isn''t a great turn-on to most programmers around here.
Indeed, speaking from experience, I can pretty much assure you that
there are only a tiny fraction of existing assembly programmers who
would be willing to switch to your system, once it''s complete. That
leaves beginners as the only large market for such a system. What
benefits does this offer to those wanting to learn assembly? Perhaps
those who already know XML? (I don''t know...). Of course, if
you''re like Herbert and you just want to create an assembler for
yourself, have at it.
Cheers,
Randy Hyde


Randall Hyde写道:
Randall Hyde wrote:
而这个例子可能看起来很愚蠢,使用这个和XML编辑器,它变得更不可能让你最终得到一个无序的堆栈以及这通常带来的任何可怕后果。不要提及段可以被标记,使程序更容易阅读。
这听起来像你正在尝试创建传说中的BethTools的XML版本。系统(了解详情)。
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.
It really sounds like you''re trying to create an XML version of the
fabled "BethTools" system (seach Google for details).




Google不会对该字符串给出任何匹配。



Google does not give any matches on that string.

XLink编辑的XML当然可以指向您选择的任何ASM代码,最重要的是,它们不需要在您编译的机器上,但在互联网上的任何地方。通过这种方式,您可以使用这些XML对象定义简化语言,然后将它们放在Web服务器上,您再也不用担心它们了,您可以创建您共享的程序与您的朋友/同事通过互联网
您只需向他们发送您的XML程序(我可能会添加它也注定比编译的ASM更难以理解)
如果他们希望编译它,所需的组件将在编译过程中自动下载。
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.



有什么意义?



And what''s the point?




它更易读,更易于组织和更改,防止

已经为其他软件完成的工作加倍并且更简单到了
costumize用于其他目的。



That it is more readable, easier to organize and change, prevent
doubling-up of work already done for other software and simpler to
costumize to serve another purpose.

关于这一点的另一个好处是,如果有任何大的
兼容的数据库这些XML对象onlin e,移植用这种XML语言编写的ASM程序(到另一个ASM表单或不同的硬件/软件)只需要改变XML:base
link(xml: base =" http://my.webspace.com/")指向另一个位置,
编译和中提琴,代码被移植。
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.



嗯,如果你要放弃机器依赖,这对我来说肯定就像你在做这个,那么为什么不使用HLL呢?



Well, if you''re going to give up machine dependence, which it sure
seems to me like you''re doing this, then why not just use a HLL?




XMLc并非独占使用,您可以非常简单地使用XMLc编译

程序,然后通过HLL处理器处理这些程序。 XMLc

是独立于编程语言的,仍然保持着它的完整列表

的潜在优势。

祝你好运世界,但你回答了几个重要的问题:

1.这个产品的受众是谁?


也许,正如你后来提到的,也是我自己,但通常它可能是:

1.任何希望保持代码可读性的ASM程序员可重复使用。

2.任何没有足够经验的人都可以顺利地阅读ASM代码,并可以使用代码的方便图形表示。

3.任何一群人在一个ASM计划上工作。

2.这个产品的目的是什么?


为许多不同的编程语言提供公共点,因此



devolopers创建一个通用的开发工具环境并达到全球公认的标准。对于

示例:为ASM程序员提供使用XML编辑器的优势。

3.为什么有人会使用此产品而不是其他汇编程序(或HLL)?


毫无意义的问题,我认为那些习惯于其他汇编程序或者使用
HLL并且发现XMLc可用的人实际上都会使用这两个汇编程序(因为XMLc

产生代码,而不是二进制代码。但我认为有可能以对象为导向,互联网级可移植并且对世界充满信心,并且不会对代码的有效性产生影响

本身必须吸引一些注意力。

例如,HLA旨在支持初学组装语言程序员。这完全回答了上述三个问题。
您提出了哪些好处?能够使用XML编辑器编辑汇编程序对于大多数程序员来说并不是一个很好的转变。


您是否为所有人说话?

事实上,根据经验,我几乎可以向您保证,
只有一点点现有组装程序员的一部分,一旦完成,他们愿意切换到您的系统。这使得初学者成为这种系统的唯一大市场。这对那些想要学习装配的人有什么好处呢?也许那些已经了解XML的人? (我不知道...)。当然,如果你像赫伯特一样,而你只是想为自己创建一个汇编程序,那就去吧。



XMLc is not exclusive to use, you can quite simply use XMLc to compile
programs which are then to be processed trough your HLL processor. XMLc
is programming-language independent and still maintains it''s full list
of potential advantages.
I wish you all the luck in the world, but have you answered a
couple of important questions:

1. "Who is the audience for this product?"
Perhaps, as you later mention, also myself, but generaly it could be either:
1. Any ASM programmer who wishes to keep his code readable and reusable.
2. Anyone who does not have enough experience to be able to smoothly
read ASM code and can utilize a handy graphical representation of the code.
3. Any group of people working togather on one ASM program.
2. "What is the purpose of this product?"
To provide a commonpoint for many diffirent programming languages, thus
create an universal devolopment environment of tools hand for the
devolopers and to make it up to globally accepted standards. For
example: Provide the advantages of using XML editors to ASM programmers.
3. "Why would someone use this product over other assemblers (or HLLs)?"
Pointless question, I think those who are used to other assemblers or
HLLs and find XMLc usable will be in fact using both (since XMLc
produces code, not binaries). But I suppose the prospect of being
object-orientated, internet-level portable and compilant to world
standars, without making sacrafices on the effectivness of the code
itself has got to attract some attention.
HLA, for example, was designed to support beginning assembly
language programmers. That completely answers the three questions above.
What benefits are you proposing? Being able to edit your assembly programs
with an XML editor isn''t a great turn-on to most programmers around here.
And you speak for all of them?
Indeed, speaking from experience, I can pretty much assure you that
there are only a tiny fraction of existing assembly programmers who
would be willing to switch to your system, once it''s complete. That
leaves beginners as the only large market for such a system. What
benefits does this offer to those wanting to learn assembly? Perhaps
those who already know XML? (I don''t know...). Of course, if
you''re like Herbert and you just want to create an assembler for
yourself, have at it.




这个项目背后的主要想法是不久前,当一个朋友在人工智能领域工作
时,引起了我的注意XML,

语言,其含义可以描述(当时我正在以一种简单的分层

格式工作

基于多维上下文的搜索范围),其中语言为dnyamic,所有内容都被引用为

defenition映射XML通过互联网链接。


参考的重点是,如果一切都在
$ b的某个地方$ b互联网,并且符合世界标准,它易于使用,并且不需要重新制作
。 XML也是一种语言,使您能够在相同的XML文件中使用上下文,将各种不同程序的各种信息放在各种信息中。正在进行XML编译,你可以获得很多b $ ba很多,并且可以使用另一种语言来提供

你的标准兼容性也意味着存储在
中的信息
您的代码是:

1.可以使用任何XML编辑器进行操作

2.任何XML编译读取器都可读取(可能包括几个

对ASM代码不感兴趣的应用程序)


因此,单独进行XML编译是有意义的。


我想更多的人已经教过XML而不是愿意尝试

ASM。 XML有未来,原始ASM(他们说)没有。人们将使用Java

和simmilar编程语言,因为它们共享XML的这些特性,但Java是一种缓慢的解释语言。 XMLc

为您提供了能够利用现代编程的所有优点

语言标准,它的语言已经并且将继续有足够的
$ b全球范围内$ b的可用编辑器同时为您提供工作,高效且完全可用的低级代码。


我会的,就我而言,利用XMLc并创建我的对象

并在互联网上分享它们,也许一旦有更多它们,

ASM的新手可能会寻求利用这些而不是为了原始ASM而立即使用。但我想,正如W3C所说的关于XML,它是一个好的标准,希望每个人都会接受作为好的工作实践的一部分,并把它作为一个好的标准。推荐。


但是我不会强迫它,它是一个可用的工具,如果你问我我是个好主意,它将是免费软件。


-

型号:INFJ

主要功能:协处理器

辅助功能:群集指挥官


没有感觉到猫科动物,所以我打折了山寨综合症......

- 鬼歌



The main idea behind this project was a while ago, when a friend working
in the area of Artificial Inteligence, brought to my attention XML, the
language where meaning can be described (at the time I was working on
poly-dimensional context-based search spheres) in a simple hierarchical
format, where the language is dnyamic and everything is refferenced to
defenition maps that the XML is linked to over the internet.

The point of that refference was that if everything is somewhere on the
internet, and compilant to world standards, it is easy to use and does
not have to be re-made. XML is also a language that enables you to put
various kinds of information that various diffirent programs will be
using, contextfully, in the same XML file. Being XML compilant you gain
a lot and being able to utilize a language on top of another that gives
you standard-compilance also means that the information stored within
your code is:
1. Manipulatable with any XML compilant editor
2. Readable by any XML compilant reader (which may include several
applications not interested in the ASM code within)

So being XML compilant alone has a point.

I suppose many more people have been taught XML than are willing to try
ASM. XML has a future, raw ASM (they say) does not. People will use Java
and simmilar programing languages because they share these
characteristics of XML, but Java is a slow interpreted language. XMLc
gives you all the advantages of being able to utilize modern programming
language standards, it''s language has and will continue to have plenty
of usable editors worldwide and at the same time, leaves you with
working, highly efficient and fully costumizable low-level code.

I will, as far as I''m concerned, utilize the XMLc and create my objects
and share them on the internet, perhaps once there are more of them,
people who are new to ASM may seek to utilize those instead of going for
raw ASM rightaway. But I suppose, as W3C says about XML, that it is a
good standard that hopefully everybody will embrace as a part of good
working praxis, and take that as a recomendation.

But I will not force it on you, it is a usable tool and a good idea if
you ask me, and it will be freeware.

--
Model: INFJ
Primary function: Coprocessor
Secondary function: Cluster commander

"None felt feline, so I discounted copycat syndrome..."
-- Ghost Song


这篇关于基于XML的面向对象的预汇编程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆