I have my exams in microprocessor and have the programs as undeer to come and i dont have any idea but your program examples have been good to understand ...
I humbly request you to please post the programs below as early as possible cos i have my exams in two days..
Waiting for your favorable reply as early as possible
Thanking You..
God bless you..
1 . Write and Assembly language programs in 8086 to copy one string from source location to destination location.
2. Write Assembly Language programs in 8086 Microprocessor for following and show status register 1. add 70h and 55h 2. multiplication of 12h and 21h
3. Write 8086 assembly language programs for following and show status
of flag register. (i) add 90h and 80h (ii) subtract 5678h from 1234h
4 . Write 8086 assembly language program to move block of 5 bytes stored in data segment to the extra segment. Use MOVSB and REP instructions.
5. Write an Assembly language program in 8086 Microprocessor to
Add and multiply two 8 bit numbers and show the status of Flag
Register.
6. Write an Assembly language programs in 8086 Microprocessor to
OR and XOR two 8 bit numbers.
Comments
http://www.csn.ul.ie/~darkstar/assembler/tut1.html
7 tutorials
What ASM program are you using?
Some are free downloads.
It would be a blessing ... thanks in advance ... please do help me out ... Thank You .. God bless you
It would be a blessing ... thanks in advance ... please do help me out ... Thank You .. God bless you
If you test a simple program like this one:
#include
#include
void main ()
{
int a;
float b,c,d,e;
a=628;
b=a/600;
c=sin(b);
d=cos(b);
e=tan(b);
printf("
%d",a);
printf("
%f",b);
printf("
%f",c);
printf("
%f",d);
printf("
%f",e);
}
You can compile and make an EXE with TCC filename
or make an ASM file with
TCC -S filename
Some of this ASM is like this:
_TEXT segment byte public 'CODE'
;
; void main ()
;
assume cs:_TEXT
_main proc near
push bp
mov bp,sp
sub sp,18
push si
;
; {
; int a;
; float b,c,d,e;
;
; a=628;
;
mov si,628
;
; b=a/600;
;
mov ax,si
mov bx,600
cwd
idiv bx
mov word ptr [bp-18],ax
fild word ptr [bp-18]
fstp dword ptr [bp-4]
;
; c=sin(b);
;
fld dword ptr [bp-4]
sub sp,8
fstp qword ptr [bp-28]
fwait
call near ptr _sin
add sp,8
fstp dword ptr [bp-8]
;
; d=cos(b);
;
fld dword ptr [bp-4]
sub sp,8
fstp qword ptr [bp-28]
fwait
call near ptr _cos
add sp,8
fstp dword ptr [bp-12]
;
; e=tan(b);
;
fld dword ptr [bp-4]
sub sp,8
fstp qword ptr [bp-28]
fwait
call near ptr _tan
add sp,8
fstp dword ptr [bp-16]
;
;
; printf("
%d",a);
;
push si
mov ax,offset DGROUP:[email protected]
push ax
fwait
call near ptr _printf
pop cx
pop cx
;
Too see flags and registers you can use the program
DEBUG.EXE (in all PC with 16 & 32 bit) on your EXE file