Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .SECT .TEXT
- MOV BX, arr
- MOV SI, 1
- MOV CX, end - arr
- SHR CX, 1
- 1:
- MOV AX, (BX)
- MOV DI, 1
- CWD
- DIV DI
- CMP DX, -1
- JE LELSE
- MOV AX, SI
- MUL (BX)
- ADD BX, 2
- MOV SI, AX
- LELSE:
- LOOP 1b
- .SECT .DATA
- arr: .WORD 2, 5, 3, 8, 1, 4
- end: .BYTE 0
- .SECT .BSS
Advertisement
Add Comment
Please, Sign In to add comment