Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org 100h
- push ourArr
- call OurProc
- mov [result], eax
- call OPNum
- EchoWait:
- mov ax, 0c08h ;like "readln;" in delphi
- int 21h
- test al,al
- jnz Skip
- mov ah, 08h
- int 21h
- Skip:
- ret
- ;===================================
- ourArr db 6, 7,11,5,2,3,7
- result dd ?
- include 'opnum.inc'
- OurProc:
- push bp
- mov bp, sp
- push di
- mov di, [bp+4]
- xor eax, eax
- xor cx, cx
- mov cl, byte[di]
- inc di
- .Cycle:
- test byte[di], 00000001b
- jz .Skip
- test byte[di], 00000010b
- jz .Skip
- inc eax
- .Skip:
- inc di
- loop .Cycle
- pop di
- pop bp
- ret 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement