Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //https://vk.com/evgenykravchenko0
- ___ ___ ___
- / /\ ___ / /\ / /\
- / /:/_ /__/\ / /:/_ / /:/_
- / /:/ /\ \ \:\ / /:/ /\ / /:/ /\
- / /:/ /:/_ \ \:\ / /:/_/::\ / /:/ /:/_
- /__/:/ /:/ /\ ___ \__\:\ /__/:/__\/\:\ /__/:/ /:/ /\
- \ \:\/:/ /:/ /__/\ | |:| \ \:\ /~~/:/ \ \:\/:/ /:/
- \ \::/ /:/ \ \:\| |:| \ \:\ /:/ \ \::/ /:/
- \ \:\/:/ \ \:\__|:| \ \:\/:/ \ \:\/:/
- \ \::/ \__\::::/ \ \::/ \ \::/
- \__\/ ~~~~ \__\/ \__\/
- ___
- /__/\ ___ ___
- \ \:\ / /\ / /\
- \ \:\ / /:/ / /:/
- _____\__\:\ /__/::\ /__/::\
- /__/::::::::\ \__\/\:\__ \__\/\:\__
- \ \:\~~\~~\/ \ \:\/\ \ \:\/\
- \ \:\ ~~~ \__\::/ \__\::/
- \ \:\ /__/:/ /__/:/
- \ \:\ \__\/ \__\/
- \__\/
- #include "stdafx.h"
- #include <stdio.h>
- #include <locale.h>
- #include <cstdlib>
- int main()
- {
- setlocale(LC_ALL, "rus");
- int number = 0;
- int size_number = 0;
- printf_s("Enter number: \n");
- scanf_s("%i", &number);
- _asm {
- xor esi, esi
- xor ebx, ebx
- mov eax, number
- test eax, 0ffff0000h
- jnz size_four
- test ax, 0ff00h
- jnz size_two
- add esi, 1
- mov bl, al
- jmp ended
- size_four :
- add esi, 4
- mov ebx, eax
- jmp ended
- size_two :
- add esi, 2
- mov bx, ax
- jmp ended
- ended :
- mov size_number, esi
- }
- printf_s("The number %i was written to a ", number);
- printf_s("%i byte cell \n", size_number);
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement