Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

#include "pch.

h"
#include <iostream>
#include <stdio.h>

using namespace std;


int v[11], n;
const char *p = "%d";
void baza2(int)
{
_asm {
mov eax, dword ptr[ebp+8]
mov esi, 0
mov edi, 2
_while:
cmp eax, 0
jbe stopwhile
mov edx, 0
div edi
mov v[esi*4], edx
inc esi
jmp _while
stopwhile:
mov n, esi

//afis
for1 :
cmp esi, 0
jbe fin
mov eax, v[esi * 4 - 4]
push eax
push p
call printf
add esp, 8
dec esi
jmp for1

fin:
}
}
int main()
{
int p = 2;
baza2(p);

You might also like