
14-03-2006, 00:42
|
|
|
|
חבר מתאריך: 28.08.02
הודעות: 24
|
|
|
צריך עזרה באסמפלר
שלום חברים וחג פורים שמח
נתונה התוכנית הבאה שבניתי ואשר בודקת אם מערך מסודר בסדר עולה:
----------------------------------------------
; template for programs
.model small
.stack 100h
.data
ar db 5
len db 5
ans db 0
.code
mov ax,@data
mov ds, ax
; here your program starts
mov bx,ar
mov al,len
dec al
loop:
mov cl,[bx]
inc bl
mov ch,[bx]
cmp cl,ch
ja notsorted
dec al
jnz loop
mov ans,1
jmp sof
notsorted:
mov ans,0
sof:
; here you program ends
mov ah,4ch
int 21h
end
------------------------------------------------------
כשאני מריץ באמצעות easyspu נותן שגיאה ב- ja notsorted
האם משהוא יכול לעזור בדחיפות עם תודה מראש
|