Jump to content

I'm Blank.... No title right now! :)

- - - - -

  • Please log in to reply
5 replies to this topic

#1
AKMafia001

AKMafia001

    Programmer

  • Members
  • PipPipPipPip
  • 119 posts
Well! I have to ask several things. Everything is about MASM.

I'm currently studying IBM-PC 16 bit Assemly. The first question is: The teacher is not enought good in Assembly, She sometimes gives us the examples of 32 bit registers like eax, ebx, .... Once she said that the result of MUL with the ax as supplied operand is stored in eax. While, I have studied that when an 8bit operand is supplied it is multiplied with al and the result is automatically stored in ax and if 16bit operand is supplied it is multiplied with ax and the result is stored both in DX & AX (the upper bits in DX).

I remember once she said the we can move from ax to eax or bx to eax the general purpose registers. Well, last week she had a quiz and she showed us the result in which she pointed out the question which was in the quiz,
mov eax, bx is it a correct move instruction?

Well! I logically answered yes because the destination is larger than the source and both are registers. She said check it out and provide me some evidence and reference if it is correct... :)

So, what do you say about it and about the MUL also. Provide me some reference so I might show her as she asked me for that.

Well! The other bunch of questions is: Why to learn a 16 bit assembly? It may help with learning the basics but we could start with 32 bit too.
Post some good links to learn 16 bit and what to do after I shall complete learning it :). Shall I start with 32 bit? Please provide me some guidance about it.

If I got something else in mind I will feel free to ask! :P

Thank You everyone!
I think i'm able to write a code for printing "Hello, World!". Proud of that!

#2
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,705 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
mov     eax, bx
No, it's not a valid instruction. Operands must be of the same size, regardless of whether they're registers or memory. The only exceptions are the movsx and movzx instructions, which sign-extend or zero-extend the source operand into the destination operand, respectively.

Multiplication:
8-bit --> result stored in ax.
16-bit --> result stored in dx:ax
32-bit --> result stored in edx:eax
64-bit --> result stored in rdx:rax.

Why learn 16-bit Intel assembly language? Think of it as a simplified version of 32-bit and 64-bit assembly language, which have hundreds more instructions, addressing modes, and other features. Start out small (literally) and then work your way up to the more complex things.

For the sake of simplicity, promoting this forum, and because I'm really familiar with them, you can check out my Intro to Intel Assembly Language tutorial series. There's a sticky thread at the very top of this forum called General Assembly Language Resources that you should look at as well. We put it there for a reason. :)
sudo rm -rf /

#3
RhetoricalRuvim

RhetoricalRuvim

    JavaScript Programmer

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,252 posts
  • Location:C:\Countries\US
I explain Win32 assembly (with NASM) in my tutorial series.

http://forum.codecal...m-part-1-a.html


@dargueta: Should I add that link to the 'Assembly Language Resources' page?

#4
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,705 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
Yeah, definitely.
sudo rm -rf /

#5
AKMafia001

AKMafia001

    Programmer

  • Members
  • PipPipPipPip
  • 119 posts
Thanks dargueta for the vivid answer.....

Well! I answered that logically with out knowing the rules, but I'm logically wrong also. I should tell her that I'm wrong.

Thanks for the links dargueta & RhetoricalRuvim -- I have been there in both the tutorial series and both are outstanding and well written. Besides I guess dargueta has discontinued the series because of the lake of time. Well! I liked your compiler creation series so much which you also have discontinued.

Thanks a lot again. :)
I think i'm able to write a code for printing "Hello, World!". Proud of that!

#6
dargueta

dargueta

    Writes binary right handed and hex left handed

  • Moderators
  • 4,705 posts
  • Programming Language:C, Java, C++, PHP, Python, Perl, Assembly, Bash, Others
  • Learning:JavaScript
Yeah, I keep telling myself I'm going to continue it, but I just do not have time these days. I really want to get back to writing them, though.
sudo rm -rf /




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users