:3

But yes, I am starting to try and learn x86 assembly. Heads up, I won't want to put up with the cliche'd "But that's useless in today's modern world" stuff. Wink

Now with that said, I heard NASM is the best assembler for x86 development -- but does anyone else know any others? I bet TASM would work if a table for x86 was included with it... as creating one from scratch would take a team of highly skilled x86 asm specialists a decent amount of time to make Razz

Also, does anyone know any good online resources for Input/Output on standard Personal Computers running something like Vista or Windows 7? I can't believe there would be a huge difference in all of the hardware configs, besides maybe a few different RAM and GPU and etc. configs.

Smile
NASM is regarded as one of the best x86 Assemblers, but I've heard MASM isn't half bad either.

However, that aside, ASM programming on a computer very different from ASM programming on embedded devices such as calculators. Even more important is that modern OSes are essentially undocumented at the Assembly level.
Qwerty.55 wrote:

Even more important is that modern OSes are essentially undocumented at the Assembly level.

I disagree. http://www.google.com/search?client=ubuntu&channel=fs&q=Windows+ASM+functions&ie=utf-8&oe=utf-8
By "modern," I meant Windows Vista, Win7, Mac OSX, etc... If you'll notice, Windows XP (which I suppose is still modern) is about the latest Windows OS for which you'll find significant resources. Linux is a special case with rather better documentation, though.
souvik1997 wrote:
Qwerty.55 wrote:
Even more important is that modern OSes are essentially undocumented at the Assembly level.
I disagree. http://www.google.com/search?client=ubuntu&channel=fs&q=Windows+ASM+functions&ie=utf-8&oe=utf-8
That's not proper documentation, it's just reverse-engineered. Consider that MSDN (continuing the Windows examples) has tons of documentation for many languages, but rarely if ever even mentions assembly.

Ashbad wrote:
Also, does anyone know any good online resources for Input/Output on standard Personal Computers running something like Vista or Windows 7? I can't believe there would be a huge difference in all of the hardware configs, besides maybe a few different RAM and GPU and etc. configs.

You can't just talk to the hardware, and even if you could, it would be a terrible idea. To be a cursory answer to your question, here's a call to printf in Cygwin, gotten from gcc and put into a form such that it (should) be callable from C (it's probably not a workable program on its own):

Code:
LC0:
    .ascii "Hello, world!\12\0"
    .text
.globl _helloworld
_helloworld:
    pushl %ebp
    movl %esp, %ebp
    subl $8, %esp
    andl $-16, %esp
    movl $LC0, (%esp)
    call _printf
    ret

It's ugly and pointless. Any OS in common use is designed to be worked with at a level above assembly, and there are really only two cases in which you might want to use it:
  • Systems programming, working directly on the hardware, in which case you'll only write a few very low-level functions in assembly.
  • Optimization, in which case you want to write small snippets of assembly and have your compiler insert them where necessary.

Neither of those use cases are the sort of thing I'd recommend to a beginner. If you really want to do such a thing, you're best off learning C and mucking about with the generated code from there, not blindly trying to write assembly code in the same manner you can do on an embedded system like a calculator.
Well, I have already learned C very well, so that's not a problem. However, I like your advice of looking at compiled C code and libraries to learn some things -- it seems like that would be the best way to go.
Ashbad wrote:
Well, I have already learned C very well, so that's not a problem. However, I like your advice of looking at compiled C code and libraries to learn some things -- it seems like that would be the best way to go.
One particularly good way to do that is write a simple program in C, then run it with gdb, set breakpoints, and step through the code. For simple programs and *low optimization levels* the generates x86 ASM is generally quite easy to understand, in my opinion.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement