PAGE 60,80 STSG SEGMENT PARA STACK 'STACK' DW 12 DUP(0) STSG ENDS DATASG SEGMENT PARA 'DATA' ILK DW 1 IKI DW 1 UC DW ? BULUNCAK DW 10 DATASG ENDS CODESG SEGMENT PARA 'CODE' ASSUME CS:CODESG,SS:STSG,DS:DATASG MAIN PROC FAR PUSH DS XOR AX,AX PUSH AX MOV AX,DATASG MOV DS,AX MOV AX,ILK MOV BX,IKI MOV CX,BULUNCAK SUB CX,2;dongumuz 3'ten sayiya eşit olana kadar döner L1: MOV UC,AX ADD UC,BX MOV AX,BX MOV BX,UC LOOP L1 MOV AX,UC RETF MAIN ENDP CODESG ENDS END MAIN
LST Çıktısı :
Microsoft (R) Macro Assembler Version 5.00 11/17/13 04:51:25
Page 1-1
PAGE 60,80
0000 STSG SEGMENT PARA STACK 'STACK'
0000 000C[ DW 12 DUP(0)
0000
]
0018 STSG ENDS
0000 DATASG SEGMENT PARA 'DATA'
0000 0001 ILK DW 1
0002 0001 IKI DW 1
0004 ???? UC DW ?
0006 000A BULUNCAK DW 10
0008 DATASG ENDS
0000 CODESG SEGMENT PARA 'CODE'
ASSUME CS:CODESG,SS:STSG,DS:DATASG
0000 MAIN PROC FAR
0000 1E PUSH DS
0001 33 C0 XOR AX,AX
0003 50 PUSH AX
0004 B8 ---- R MOV AX,DATASG
0007 8E D8 MOV DS,AX
0009 A1 0000 R MOV AX,ILK
000C 8B 1E 0002 R MOV BX,IKI
0010 8B 0E 0006 R MOV CX,BULUNCAK
0014 83 E9 02 SUB CX,2
0017 L1:
0017 A3 0004 R MOV UC,AX
001A 01 1E 0004 R ADD UC,BX
001E 8B C3 MOV AX,BX
0020 8B 1E 0004 R MOV BX,UC
0024 E2 F1 LOOP L1
0026 A1 0004 R MOV AX,UC
0029 CB RETF
002A MAIN ENDP
002A CODESG ENDS
END MAIN
Microsoft (R) Macro Assembler Version 5.00 11/17/13 04:51:25
Symbols-1
Segments and Groups:
N a m e Length Align Combine Class
CODESG . . . . . . . . . . . . . 002A PARA NONE 'CODE'
DATASG . . . . . . . . . . . . . 0008 PARA NONE 'DATA'
STSG . . . . . . . . . . . . . . 0018 PARA STACK 'STACK'
Symbols:
N a m e Type Value Attr
BULUNCAK . . . . . . . . . . . . L WORD 0006 DATASG
IKI . . . . . . . . . . . . . . L WORD 0002 DATASG
ILK . . . . . . . . . . . . . . L WORD 0000 DATASG
L1 . . . . . . . . . . . . . . . L NEAR 0017 CODESG
MAIN . . . . . . . . . . . . . . F PROC 0000 CODESG Length = 002A
UC . . . . . . . . . . . . . . . L WORD 0004 DATASG
@FILENAME . . . . . . . . . . . TEXT DEM
33 Source Lines
33 Total Lines
14 Symbols
51062 + 461290 Bytes symbol space free
0 Warning Errors
0 Severe Errors
16 Kasım 2013 Cumartesi
Assemblyde fibonacci
Kaydol:
Kayıt Yorumları (Atom)
Hiç yorum yok:
Yorum Gönder