Practice with basic assembly
language commands: MOV, ADD, SUB, MUL
and DIV
Writing simple assembly
language program and testing it out with Edlinas
Reboot your computer into DOS
Run Edlinas from the DOS prompt as follows:
A:>EDL EXAMPLE.ASM
Go into command interpreter by hitting the Escape key. Test out the
following storage commands. before entering each command write down on
this sheet what you expect the resulting contents of the destination
register to be:
MOV EAX, 10
MOV EAX, 010H
MOV EAX, 0AH
MOV EAX, -2
MOV EAX, -02H
MOV AX, 27
MOV BX, AX
MOV CL, BH
MOV AL, AH
MOV EAX, ESI
MOV AL, EBX ( this command is not legal, see what will happen)
Test out the following arithmetic commands. Before entering each
command write down on this sheet what change you expect the command to
produce.
MOV EAX, 0
ADD EAX, 03H
SUB AX, 2
MOV EBX, 0FFFAH
ADD EBX, EAX
SUB BX, AX
SUB BL, BH
MOV AX, 10101H
MOV BH, 8
MUL BH
MOV BX, 2
MUL BX
MOV EBX, 010101010H
MUL EBX
MOV AX, 19
MOV BH, 5
DIV BH
MOV AX, 0400H
MOV BH, 2
DIV BH
Write an Assembly language program that calculates the sum of 12 and
-3, the product of 12 and 3, and the result of the integer division and
the remainder of 27 and 8. For the multiplication and division write 3
different versions of the program: using 8 bit registers, 16 bit registers
and 32 registers.
You can execute the lines of your program one after another using command
interpreter.