Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Program template
- INCLUDE Irvine32.inc
- .data
- ; declare variables here
- HelloTxt BYTE "Hello World!", 0ah, 0
- A DWORD 5
- .code
- main proc
- ; write your code here
- CALL countChars
- CALL WriteInt
- CALL Crlf
- invoke ExitProcess,0
- main endp
- countChars proc
- MOV ESI, OFFSET HelloTxt
- MOV EBX, 0
- ciklus:
- MOV AL, [ESI]
- CMP AL, 0
- JE vege
- INC EBX
- INC ESI
- JMP ciklus
- vege:
- MOV EAX, EBX
- ret
- countChars endp
- end main
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement