;nasm 2.11.08
%macro cmn 4
mov rax,%1
mov rdi,%2
mov rsi,%3
mov rdx,%4
syscall
%endmacro
section .data
msg1 db 10, "the count of 0"
msg1len equ $-msg1
msg2 db 10, "the count of positive"
msg2len equ $-msg2
msg3 db 10, "the count of negative"
msg3len equ $-msg3
array db -04h, 00h, 50h, -21h, 00h
countz db 00
countp db 00
countn db 00
section .bss
dispnum resb 02h
section .text
global _start
_start:
mov cl,05h
mov rsi,array
cont: mov al,[rsi]
cmp al,00h
je labelz
rol al,01h
jc labeln
inc byte[countp]