You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
|
#include <stdio.h>
|
|
|
|
int main() {
|
|
short a, b, c, d;
|
|
scanf("%hd %hd", &a, &b);
|
|
asm
|
|
(
|
|
"mov %1,%%ax\n"
|
|
"mov %2,%%bx\n"
|
|
"cwd\n"
|
|
"idiv %%bx\n"
|
|
"mov %%ax, %%dx\n"
|
|
"mov %%dx, %0\n"
|
|
: "=r" (c)
|
|
: "r" (a), "r" (b)
|
|
);
|
|
printf("%hd\n", c);
|
|
}
|
|
|
|
|