BeginnerProgrammer
سه شنبه 23 آذر 1389, 09:53 صبح
من نمیدونم اشکال کدم کجاس؟
.386
.MODEL FLAT
ExitProcess PROTO NEAR32 stdcall,dwExitCode:DWORD
INCLUDE io.h
Cr EQU 0dh
Lf EQU 0ah
.stack 4096
.DATA
count word 1
num dword ?
tavan BYTE 16 DUP(?)
n BYTE 16 DUP(?)
prom BYTE "Result:",0,Cr,Lf
.CODE
_start:
input n,16
atoi n
mov ebx,eax
mov num,ebx
input tavan,16
atoi tavan
calculate:
cmp count,eax
jle calculate
mul ebx,num
inc count
jg finish
finish:
itoa tavan,ebx
output prom
;lb1:
; mul ebx
; loop lb1
output prom
INVOKE ExitProcess,0
PUBLIC _start
END
.386
.MODEL FLAT
ExitProcess PROTO NEAR32 stdcall,dwExitCode:DWORD
INCLUDE io.h
Cr EQU 0dh
Lf EQU 0ah
.stack 4096
.DATA
count word 1
num dword ?
tavan BYTE 16 DUP(?)
n BYTE 16 DUP(?)
prom BYTE "Result:",0,Cr,Lf
.CODE
_start:
input n,16
atoi n
mov ebx,eax
mov num,ebx
input tavan,16
atoi tavan
calculate:
cmp count,eax
jle calculate
mul ebx,num
inc count
jg finish
finish:
itoa tavan,ebx
output prom
;lb1:
; mul ebx
; loop lb1
output prom
INVOKE ExitProcess,0
PUBLIC _start
END