Author Topic: C program to NASM  (Read 279 times)

Offline DogsterFam

  • New Member
  • Posts: 1
C program to NASM
« on: May 19, 2018, 12:01:32 PM »
can you help me translate this code to NASM for windows. Thank you!
#include <stdio.h>
#include <stdlib.h>
 
int main()
{
   char ch;
 
   printf("Do you want to shutdown your computer now (y/n)\n");
   scanf("%c", &ch);
 
   if (ch == 'y' || ch == 'Y')
      system("C:\\WINDOWS\\System32\\shutdown -s");
 
   return 0;
}
« Last Edit: May 19, 2018, 12:37:19 PM by DogsterFam »