News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Why does different Assemblers have different synatax's ?

Started by sunshine33, April 10, 2018, 11:56:49 PM

Previous topic - Next topic

felipe

Quote from: zedd151 on April 12, 2018, 12:52:03 AM

for instance:
-------------
push some registers (edi, esi, for example)
push esp
mov ebp, esp

other code  here

pop esp
pop the registers previously pushed
---------
:biggrin: Let me correct that:

push   ebp
mov    ebp,esp
...
mov    esp,ebp
pop    ebp

zedd151

yup what he said.

Been away from my computer too long. lol

will fix my previous post :lol:

See, I can write buggy code even without my computer and masm32.  :P

edit to add:

[note to self]
I really shouldnt try to post examples without the necessary tools at hand. :lol:
[/note to self]

jj2007

Quote from: zedd151 on April 12, 2018, 10:01:05 AM
See, I can write buggy code even without my computer and masm32.  :P

Your code isn't buggy, it works perfectly:include \masm32\include\masm32rt.inc

.code
callme:
  push esi
  push esp
  mov ebp, esp
  print "hello world"
  pop esp
  pop esi
  retn

start:
  call callme
  print ", how are you?"
  exit

end start

sunshine33

Hello zedd151

I have been collecting notes and i have been staring into example for some time now .



I have some experience with coding a dynamic website in Html , Javascript , Php and Mysql

After staring into Assembly language  , the other languages doesn't look much difficult .

But i have a very hard time understanding the if else like statements in Assembly language .

I seriously wish we had a section to talk about Assembly language somewhere in this forum.

felipe

Quote from: sunshine33 on April 13, 2018, 03:38:33 AM
I seriously wish we had a section to talk about Assembly language somewhere in this forum.
:shock:
Search harder, but don't expect things in some silver plate  :icon_exclaim:.

sunshine33

Is this the section where i can ask the basic Assembly Language related questions ?


http://masm32.com/board/index.php?board=5.0

RuiLoureiro

 :biggrin: 
Hi Jochen,
               As you know, it is not a good idea to modify ebp inside a procedure without preserving it first...  ;)

felipe

Quote from: sunshine33 on April 13, 2018, 04:36:55 AM
Is this the section where i can ask the basic Assembly Language related questions ?
http://masm32.com/board/index.php?board=5.0

QuoteThe Campus: A protected forum where programmers learning assembler can ask questions in a sensible and safe atmosphere without being harassed or insulted. This is also targetted at experienced programmers from other languages learning assembler that don't want to be treated like kids. Note that 16 bit code or questions will be moved to the 16 bit forum.

zedd151

Quote from: sunshine33 on April 13, 2018, 04:36:55 AM
Is this the section where i can ask the basic Assembly Language related questions ?


Usually new members asking for asm help post here in The Campus, where this thread is located.

Got a specific topic? Start a new thread.

I'm at work right now, gotta gooooo.....

sunshine33



sunshine33


jj2007

Quote from: RuiLoureiro on April 13, 2018, 05:10:28 AMAs you know, it is not a good idea to modify ebp inside a procedure without preserving it first...  ;)

You are right, Lui - especially since this is The Campus ;)

RuiLoureiro


hutch--

Hi Sunshine,

The Campus is where you ask question of the type you are asking and that is why its here. Don't be afraid to ask questions in here, we all started somewhere and much of the reason why the older guys try and help out when they have the time is they often learnt assembler the hard way long ago.

Now note that the image you posted is dealing with old 16 bit assembler and that architecture is no longer useful in either 32 or 64 bit code. The 16 bit code uses a complicated segment / offset addressing mode due to hardware limitations of computers of that era where 32 and 64 bit code uses a much simpler and cleaner addressing mode that is called FLAT memory model, code and data in the same segment that only uses an OFFSET.