cmmdc functie asm
TRANSCRIPT
-
7/25/2019 CMMDC Functie Asm
1/1
// CMMDCFunctie_asm.cpp : Defines the entry point for the console application.//
#include "stdafx.h"#include using namespace std;
int CelMaiMare(int a, int b){
_asm{
mov eax, [ebp+8]mov ebx, [ebp+12]mov edx, 0div ebx
start_while:cmp edx, 0je end_whilemov eax, ebx
mov ebx, edxmov edx, 0div ebxjmp start_while
end_while:mov eax, ebx
}}
int main(){
int a, b, cmmdc;cin >> a >> b;
_asm{
push bpush acall CelMaiMareadd esp, 8mov cmmdc, eax
}cout