Guest User

task1

a guest
Mar 9th, 2015
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .SECT .TEXT
  2.  
  3. MOV BX, arr
  4. MOV SI, 1
  5.  
  6. MOV     CX, end - arr
  7.         SHR     CX, 1          
  8. 1:
  9.     MOV AX, (BX)
  10.     MOV DI, 1
  11.     CWD
  12.     DIV DI
  13.     CMP DX, -1
  14.     JE  LELSE
  15.     MOV     AX, SI
  16.     MUL (BX)
  17.     ADD BX, 2
  18.     MOV SI, AX 
  19. LELSE:
  20.         LOOP    1b
  21.  
  22. .SECT .DATA
  23. arr:    .WORD   2, 5, 3, 8, 1, 4  
  24. end:    .BYTE   0      
  25.  
  26. .SECT .BSS
Advertisement
Add Comment
Please, Sign In to add comment