Simple Assembly Language Programming - Data Transfer, Arithmetic & Jump/Branch Instructions

I am fairly new to assembly language but i am starting to grasp the concept of it. I am trying to write a simple program in assembly language whilst trying to include data transfer, arithmetic ,jump and branch instructions. If anybody could kindly show me how to include these extra options it would be much appreciated. Once i can see an example i tend to pick up the concept of it easily.

For reference, this is the program that i have written so far which provides functionality for arithmetic to add two numbers together.

program Project1;

var
      a, b, c: Integer;
begin
      // Get the sum of a, b, and c.
      Write('Type the first value: ');
      Readln(a);
      Write('Type the second value: ');
      Readln(b);

      c := a + b;

      Writeln;
      Writeln(a, ' + ', b, ' = ', c);

      Write('Press any key to continue...');
      Readln;
end
LVL 1
ACEAFTYAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Lee W, MVPTechnology and Business Process AdvisorCommented:
That's not assembly... that looks like C to me.
_Katka_Commented:
No that's definitely Object pascal (BP or Delphi) :))

regards,
Kate
_Katka_Commented:
ACEAFTY try to expand your idea :P

Kate
JavaScript Best Practices

Save hours in development time and avoid common mistakes by learning the best practices to use for JavaScript.

Lee W, MVPTechnology and Business Process AdvisorCommented:
You know, I thought it might be... but I've never worked in delphi or Pascal and even C I've only done a little of.  I know some BASIC assembly and one thing I know for sure, this isn't it.
furqanchandioCommented:
hi

it is pascal

and i think you dont have to be a pascal programmer to understand it

:-)

furqanchandioCommented:
.model small
.stack 100h

.data
message1 db " Enter first number : ",0dh,0ah,'$'        ; create a string array
message2 db "Enter second number : ",0dh,0ah,'$'       ; 0dh 0ah  are new line plus carige return, '$' terminates the string

a db ?
b db ?
c db ?

.code
main proc
mov ax,@data
mov ds,ax

mov ah,9
mov dx, offset message1
int 21h
mov ah,1
int 21h
mov a,al

mov ah,9
mov dx, offset message2
int 21h
mov ah,1
int 21h
mov b,al

add c,a
add c,b

mov al,2
mov ah,c
int 21h

mov ah,4ch
int 21h

main endp

end main

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Assembly

From novice to tech pro — start learning today.