Turbo汇编语言 [英] Turbo Assembly Language

查看:153
本文介绍了Turbo汇编语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一名仍在大学的新手C / C ++开发人员。我想探索的主题之一是C语言具有的内联汇编。但是,我无法找到任何资源(通过谷歌)教我如何在Turbo C IDE中使用内联汇编。我正在使用Turbo C,因为它对我来说是最熟悉的。我还没有通过GASS学习汇编,因为我不熟悉GNU / Linux为C提供的环境。请给我提供资源,通过TASM学习汇编。我是装配中的绝对新手,想学习x86处理器系列的组件。

I am a novice C/C++ developer still in college. One of the topics that I would like to explore is the inline assembly that C language has. However, I have not been able to locate any resource (via google) that teaches me how to use inline assembly in the Turbo C IDE. I am using Turbo C as it is most familiar to me. I have not already learnt assembly via GASS as I am not familiar with the environment GNU/Linux provides for C. Please provide me with resources to learn assembly via TASM. I am an absolute novice in assembly and would like to learn the assembly for x86 processor family.

推荐答案

这个问题引起了我的注意。我觉得你很有兴趣探索低水平的编程世界。这可能是一种令人沮丧的经历,但是当你得到一些工作并且你明白你刚刚做了什么时,这是一种很棒的感觉。



我多年前使用过Turbo C什么时候它是基于DOS的,后来当它演变成C ++ Builder时,但我没有关注最新的历史。我只是用Google搜索了一下,看起来他们制作了一个简化版的C ++ Builder,他们命名为Turbo C.我认为这就是你所拥有的。



我不喜欢我不知道最新版本是什么或何时发布,但我怀疑你的功能可能有限。据我所知,不再支持Turbo C,它可能无法处理现代CPU中引入的新指令集。如果可能的话,我的建议是使用更新的IDE。我不知道Visual Studio是否理想,但它是我过去使用过的。



我找到了一些旧Turbo的链接C的东西。也许这可以帮到你:

http:// www.ic.unicamp.br/~celio/mc404/turboc201/embedded-asm.html [ ^ ]

https://sites.google.com/site/pratiktambe/assemblyandc [ ^ ]



如果您想尝试Visual Studio,这里有两篇CodeProject文章可以帮助您入门:

在C / C ++中使用内联汇编 [ ^ ]

GCC Vs VC ++中的内联汇编 [ ^ ]



我喜欢解决方案1中给出的链接。以下是我的一些旧链接,但是由于几年前我的内联汇编代码是为了优化视频压缩代码而完成的,所以在这个阶段链接可能会有点先进。

Paul Hsieh的装配实验室 [ ^ ]

Assembly Gems [ ^ ]

Mark Larson:装配优化技巧 [ ^ ]

Agner:优化汇编代码 [ ^ ]



最后一个链接(Agner)是具有高级上下文的链接之一,但我把它包括在这里,因为对于任何希望使用汇编代码进行优化的人来说, 引用。此外,该页面底部还有很多链接。





一切顺利。

Soren Madsen
This question caught my eye. I think it is great that you are interested in exploring the low level universe of programming. It can be a frustrating experience, but when you get something working and you understand what you just did, it is a great feeling.

I used Turbo C many years ago when it was DOS based and later when it evolved into C++ Builder, but I have not followed the latest history. I just Googled a bit and it looks like they made a stripped down version of C++ Builder that they named Turbo C. I assume that is what you have.

I don''t know what the latest version is or when it was released, but I suspect you might be limited in functionality. As far as I understand, Turbo C is no longer supported and it might not be able to handle the newer instruction sets introduced in modern CPUs. My advice would be to use a newer IDE if it is possible for you. I don''t know if Visual Studio is ideal, but it is what I have used in the past.

I did find a couple of links to the old Turbo C stuff. Maybe that can help you out:
http://www.ic.unicamp.br/~celio/mc404/turboc201/embedded-asm.html[^]
https://sites.google.com/site/pratiktambe/assemblyandc[^]

If you instead want to try out Visual Studio, here are two CodeProject articles to get you started:
Using Inline Assembly in C/C++[^]
Inline Assembly in GCC Vs VC++[^]

I like the links given in Solution 1. Below are some of my old links, but since my inline assembly code was done a few years ago in order to optimize video compression code, the links might be a little advanced for you at this stage.
Paul Hsieh''s Assembly Lab[^]
Assembly Gems[^]
Mark Larson: Assembly Optimization Tips[^]
Agner: Optimizing assembly code[^]

The last link (Agner) is one of those with advanced context, but I included it here because it is the reference for anyone looking into using assembly code for optimization purposes. Additionally, there is a great list of links at the bottom of that page.


All the best.
Soren Madsen


试试这个:



Try this:

_asm{
   mov eax, #FFFF;
   ....
}





http://www.cs.virginia.edu/~evans/cs216/guides/x86.html [ ^ ]



http://static.patater.com/gbaguy/x86asm.htm [ ^ ]


这篇关于Turbo汇编语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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