I'm try to wrote in assembly
I try to write through the cell values ​​coup addresses 100h
to 110h negative values​​. (If the value is negative - it
remains negative). Do not use the Compare CMP. so i try to check the MSB
sign with text command and it isn't working I wrote this
code segment
assume ds:code,cs:code
start: mov ax,code
mov cx,10
mov si,100h
check:
mov al,[si]
test al,10000000h//here i have problem!
je isntnegative
inc si
dec cx
cmp cx,0
jz finish
jmp check
isntnegative:
neg al
inc si
dec cx
cmp cx,0
jz finish
jmp check
finish:
int 21h
nop
code ends
end start
I know it's long and effective but it's the best I can do at the moment.
No comments:
Post a Comment