nihonium
/
mipt_clang
Archived
1
0
Fork 0
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.

21 lines
267 B
C

3 years ago
#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);
}