Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Assebly troubles

Name: Anonymous 2010-11-07 8:39


...
mov si, field

mov ax, 0
mov [variable], ax
mov cx, 10

cyclus:
    mov ax, [SI]
    cmp ax, [variable]
    jbe skip
        mov [variable], ax
    skip:
    inc si
    loop cyslus
    mov ax, [v4]

...

in data section:

field dw 1, 2, 3, 4, 5, 6, 7, 8, 9, 0
variable resw 1

...
I get stack. Do you know where is the problem??? I want to get biggest number from fiel and store it in variable

Name: Anonymous 2010-11-07 14:04

Noone geeky enought?
I run this simple program and I get bad values in al.


SECTION CODE:

..start:
mov si, field
mov cx, 2
cyc:
    mov al, [si] ;HERE IS MY PROBLEM MAKER
    inc si
loop cyc

; Call DOS to exit
mov ah, 0x4c
int 0x21

SECTION DATA:
field db 1, 2

Please help!!

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List