Witam, w asm jest zupelnie poczatkujacy, wlasciwie to dzisiaj zaczalem, napisalem takie cos:
stos_ SEGMENT stack
stos_ ENDS
Insert SEGMENT
ASSUME CS: Insert, DS: Insert
Vectlen EQU 5
Vect DB 1,2,4,5
Vect1 DB Vectlen DUP (?)
N DB 3
@begin: mov ax, cs
mov ds, ax
mov cx,VectLen
mov dl, N
mov si,0
@for: cmp dl,Vect[bx]
jl @if1_else
mov bx,cx
inc bx
cmp dl,Vect[bx]
jg @if1_else
mov bx,cx
dec bx
mov al,Vect[bx]
mov Vect1[bx],al
mov bx,cx
inc bx
mov Vect1[bx],dl
mov si,1
loop @for
@if1_else: cmp si,1
jne @jne
je @je
@jne: mov al,Vect[bx]
mov Vect1[bx],al
loop @for
@je: mov al,Vect[bx]
mov bx,cx
inc bx
mov Vect1[bx],al
loop @for
int 3
Insert ENDS
END @begin
Niestety podczas kompilowania pojawia sie
Microsoft (R) Macro Assembler Version 6.14.8444
Copyright (C) Microsoft Corp 1981-1997. All rights reserved.Assembling: C:\masm32\insssert.asm
C:\masm32\insssert.asm(48) : warning A4023: with /coff switch, leading underscor
e required for start address : @begin
Microsoft (R) Incremental Linker Version 5.12.8078
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.insssert.obj : fatal error LNK1190: invalid fixup found, type 0x0001
_
Link error
Aby kontynuować, naciśnij dowolny klawisz . . .
Program generalnie ma wstawiac element na posortowana tablice, generalnie algorytm dziala (napisalem to wczesniej w pascalu)
Prosilbym o jaka kolwiek pomoc! Byc moze ktos widzi w tym kodzie jakies bledy itp. bede bardzo wdzieczny za wskazowki.