ASSMBLY Languages
5 posters
Page 1 of 1
ASSMBLY Languages
include macro.txt
.model small
.stack
.data
head db "FIBONACCI SERIES$"
head1 db "Enter the number of integers in the series: $"
head2 db "Fibonacci series is: $"
backmenu db "Back to main menu [y/n]: $"
outs db ?
hi db ?
cat db 0
p1 db 10
p2 db ?
fibo dw ?
bx_num dw ?
ten dw 0ah
input db 5 dup(" ")
ctr db 0
.code
start:
act4 proc far
file
public act4
clrscr 79, 1, 17, 3, 50
clear 46, 2, 29, 4, 49
clear 24, 3, 3, 3, 28
clear 24, 3, 50, 3, 74
clear 24, 3, 3, 11, 3
clear 24, 3, 74, 11, 74
;clear 24, 22, 3, 22, 74
clear 24, 8, 53, 8, 56
clear 43, 12, 1, 21, 78
gotoxy 3, 31
printf head
gotoxy 8, 10
printf head1
lea di, head1
xor cx, cx
mov bh, 30h
mov bl, 0dh
one:
inp
cmp al,0
mov [di], al
sub [di], bh
inc cx
inc di
cmp bl, al
jne one
lea di, head1
cmp cl, 02h
jne two
mov cl, [di]
jmp three
two:
xor cx, cx
mov al, [di]
mul p1
add cl, al
inc di
add cl, [di]
three:
mov ctr, cl
xor ax, ax
mov bx, 0001h
mov fibo, bx
gotoxy 11, 10
printf head2
mov p1, 10
gotoxy 17, 4
and ctr, 00h
mov bx_num, bx
four:
push bx_num
mov bx, bx_num
add bx, fibo
xchg fibo, bx
mov bx_num, bx
pop ax
xor dx, dx
some:
div ten
push dx
xor dx, dx
inc ctr
cmp ax, 000h
jnz some
dips:
pop dx
add dl, 30h
disp dl
dec ctr
jnz dips
mov p2, ' '
mov dl, p2
disp dl
disp dl
inc cat
cmp cat, 9
jnz kataposan
and cat, 00h
add hi, 2
xor dx, dx
mov dh, hi
mov dl, 5
kataposan:
loop four
gotoxy 25,25
inputed:
mov ah,02h
mov bh,00
mov dh,15h
mov dl,30
int 10h
mov ah,9
lea dx,backmenu
int 21h
mov ah,01
int 21h
cmp al,'n'
jne cond
jmp start
cond:
cmp al,'y'
jne notequal
jmp bak1
notequal:
mov ah,02
mov dl,08h
int 21h
mov dl,20h
int 21h
mov dl,08h
int 21h
jmp inputed
bak1:
call main
ret
gotoxy 22,23
out
act4:
call main
ret
act4 endp
end
extrn main:far
.model small
.stack
.data
head db "FIBONACCI SERIES$"
head1 db "Enter the number of integers in the series: $"
head2 db "Fibonacci series is: $"
backmenu db "Back to main menu [y/n]: $"
outs db ?
hi db ?
cat db 0
p1 db 10
p2 db ?
fibo dw ?
bx_num dw ?
ten dw 0ah
input db 5 dup(" ")
ctr db 0
.code
start:
act4 proc far
file
public act4
clrscr 79, 1, 17, 3, 50
clear 46, 2, 29, 4, 49
clear 24, 3, 3, 3, 28
clear 24, 3, 50, 3, 74
clear 24, 3, 3, 11, 3
clear 24, 3, 74, 11, 74
;clear 24, 22, 3, 22, 74
clear 24, 8, 53, 8, 56
clear 43, 12, 1, 21, 78
gotoxy 3, 31
printf head
gotoxy 8, 10
printf head1
lea di, head1
xor cx, cx
mov bh, 30h
mov bl, 0dh
one:
inp
cmp al,0
mov [di], al
sub [di], bh
inc cx
inc di
cmp bl, al
jne one
lea di, head1
cmp cl, 02h
jne two
mov cl, [di]
jmp three
two:
xor cx, cx
mov al, [di]
mul p1
add cl, al
inc di
add cl, [di]
three:
mov ctr, cl
xor ax, ax
mov bx, 0001h
mov fibo, bx
gotoxy 11, 10
printf head2
mov p1, 10
gotoxy 17, 4
and ctr, 00h
mov bx_num, bx
four:
push bx_num
mov bx, bx_num
add bx, fibo
xchg fibo, bx
mov bx_num, bx
pop ax
xor dx, dx
some:
div ten
push dx
xor dx, dx
inc ctr
cmp ax, 000h
jnz some
dips:
pop dx
add dl, 30h
disp dl
dec ctr
jnz dips
mov p2, ' '
mov dl, p2
disp dl
disp dl
inc cat
cmp cat, 9
jnz kataposan
and cat, 00h
add hi, 2
xor dx, dx
mov dh, hi
mov dl, 5
kataposan:
loop four
gotoxy 25,25
inputed:
mov ah,02h
mov bh,00
mov dh,15h
mov dl,30
int 10h
mov ah,9
lea dx,backmenu
int 21h
mov ah,01
int 21h
cmp al,'n'
jne cond
jmp start
cond:
cmp al,'y'
jne notequal
jmp bak1
notequal:
mov ah,02
mov dl,08h
int 21h
mov dl,20h
int 21h
mov dl,08h
int 21h
jmp inputed
bak1:
call main
ret
gotoxy 22,23
out
act4:
call main
ret
act4 endp
end
extrn main:far
vampscalling- DPC Member
-
Posts : 31
Age : 32
Joined date : 2009-11-19
Location : Cebu City
Cash : 26474
Re: ASSMBLY Languages
first click mo ctrl+4
second click mo ctrl+5
third click mo ctrl+6
yan lng tol
second click mo ctrl+5
third click mo ctrl+6
yan lng tol
Last edited by vampscalling on Sun Nov 29, 2009 7:52 pm; edited 1 time in total
vampscalling- DPC Member
-
Posts : 31
Age : 32
Joined date : 2009-11-19
Location : Cebu City
Cash : 26474
vampscalling- DPC Member
-
Posts : 31
Age : 32
Joined date : 2009-11-19
Location : Cebu City
Cash : 26474
Re: ASSMBLY Languages
Please ELABORATE it for us to understand.
And avoid double posting. Thanks !
And avoid double posting. Thanks !
Meliatrix :)- DPC VIP Member
-
Posts : 10657
Age : 27
Joined date : 2009-10-14
Location : City of Love :)
Cash : 31536
Re: ASSMBLY Languages
what kind of asembly language is this?
deathrowcore- Newbie
-
Posts : 17
Age : 31
Joined date : 2009-10-29
Location : pampanga
Cash : 26554
Re: ASSMBLY Languages
FIBONACCI SERIES$ tol
vampscalling- DPC Member
-
Posts : 31
Age : 32
Joined date : 2009-11-19
Location : Cebu City
Cash : 26474
Re: ASSMBLY Languages
i mean like cpp, java .. what programming language is that?
fibonacci is a simple problem in some languages
fibonacci is a simple problem in some languages
deathrowcore- Newbie
-
Posts : 17
Age : 31
Joined date : 2009-10-29
Location : pampanga
Cash : 26554
Similar topics
» ASSMBLY Languages
» ASSMBLY Languages
» ASSMBLY Languages
» ASSMBLY Languages
» Languages You Can Speak/Understand
» ASSMBLY Languages
» ASSMBLY Languages
» ASSMBLY Languages
» Languages You Can Speak/Understand
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|