assembly - Anything wrong with the assmbly code to count number of positive element in list -
can please advice wrong below assmbly code using tasm, can not output @ below.
from tasm output
d:\tasmzip\tasmzip>tasm test1.asm turbo assembler version 1.0 copyright (c) 1988 borland international assembling file: test1.asm error messages: none warning messages: none remaining memory: 453k d:\tasmzip\tasmzip>tlink test1.obj turbo link version 2.0 copyright (c) 1987, 1988 borland international d:\tasmzip\tasmzip>test1 d:\tasmzip\tasmzip>
my code:
assume cs:code , ds : data org 0000h data segment list db 2,23,11,7,5,25,13,18,0 ; given array last element 0 indicate end of array data ends code segment org 2000h start : lea si , list mov cl,0 mov al,0 again: cmp al,[si] ; end of je on inc si inc cl jmp again on : mov ah,4c int 21h code ends end start
you not printing out answer, exiting 0
return value. need add more system calls print out value in cl
after loop.
Comments
Post a Comment