ASSMBLY Languages

View previous topic View next topic Go down

ASSMBLY Languages

Post by vampscalling on Thu Nov 19, 2009 9:15 pm

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
avatar
vampscalling
DPC Member

Male
Posts : 31
Age : 26
Joined date : 2009-11-19
Location : Cebu City
Cash : 14779

Back to top Go down

Re: ASSMBLY Languages

Post by herecomeskamote on Mon Nov 23, 2009 9:14 pm

panu po ba magparun nito?
avatar
herecomeskamote
DPC Member

Male
Posts : 32
Age : 23
Joined date : 2009-11-23
Location : Don oh!
Cash : 14751

http://friendster.com/daryllmuffin

Back to top Go down

Re: ASSMBLY Languages

Post by vampscalling on Mon Nov 23, 2009 11:08 pm

first click mo ctrl+4
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
avatar
vampscalling
DPC Member

Male
Posts : 31
Age : 26
Joined date : 2009-11-19
Location : Cebu City
Cash : 14779

Back to top Go down

Re: ASSMBLY Languages

Post by vampscalling on Sun Nov 29, 2009 7:52 pm

wewew
avatar
vampscalling
DPC Member

Male
Posts : 31
Age : 26
Joined date : 2009-11-19
Location : Cebu City
Cash : 14779

Back to top Go down

Re: ASSMBLY Languages

Post by Meliatrix :) on Mon Nov 30, 2009 11:42 am

Please ELABORATE it for us to understand.

And avoid double posting. Thanks !
avatar
Meliatrix :)
DPC VIP Member
DPC VIP Member

Female
Posts : 10657
Age : 21
Joined date : 2009-10-14
Location : City of Love :)
Cash : 19841

Back to top Go down

Re: ASSMBLY Languages

Post by deathrowcore on Thu Dec 03, 2009 12:47 pm

what kind of asembly language is this?
avatar
deathrowcore
Newbie

Male
Posts : 17
Age : 25
Joined date : 2009-10-29
Location : pampanga
Cash : 14859

Back to top Go down

Re: ASSMBLY Languages

Post by vampscalling on Fri Dec 04, 2009 9:47 pm

FIBONACCI SERIES$ tol
avatar
vampscalling
DPC Member

Male
Posts : 31
Age : 26
Joined date : 2009-11-19
Location : Cebu City
Cash : 14779

Back to top Go down

Re: ASSMBLY Languages

Post by deathrowcore on Sun Dec 06, 2009 8:35 am

i mean like cpp, java .. what programming language is that?
fibonacci is a simple problem in some languages
avatar
deathrowcore
Newbie

Male
Posts : 17
Age : 25
Joined date : 2009-10-29
Location : pampanga
Cash : 14859

Back to top Go down

Re: ASSMBLY Languages

Post by danielvicedo on Tue Dec 08, 2009 12:40 am

Thanks for this yo .
avatar
danielvicedo
DPC Freak

Male
Posts : 1078
Age : 22
Joined date : 2009-10-16
Location : under my bebe's bed. :)
Cash : 15638

http://danielvicedo.tk

Back to top Go down

Re: ASSMBLY Languages

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum