السلام عليكم
اخوانى اخواتى خبراء التعامل مع لغة سى احتاج لمساعدة منكم فى تصحيح هذه الاكواد وجعلها تعمل .... لانى حاولت معها دون جدوى ...
الكود الاول
كود:void clrscr(void);void getch(void);main(void){ clrscr(); getch();}void clrscr(void){ asm mov ax, 3 asm int 10h}void getch(void){ asm mov ax, 10 asm int 16h}الكود التانى
كود:#include<dos.h>void clrscr(void);void getch(void);main(void){ clrscr(); getch();}void clrscr(void){ union REGS regs; regs.x.ax = 0x0003; int86(0x0010, ®s, ®s);}void getch(void){ union REGS regs; regs.x.ax = 0x0010; int86(0x0016, ®s, ®s);}الكود التالت
كود:#include<dos.h>void putch(char ch);void clrscr(void);void getch(void);main(void){ clrscr(); putch('H'); putch('e'); putch('l'); putch('l'); putch('o'); putch(10); /*New Line (ASCII)*/ putch(13); /*Return Carriage (ASCII)*/ getch();}void printch(char ch){ union REGS inregs, outregs; inregs.h.ah = 0x0002; inregs.h.dl = ch; intdos(&inregs, &outregs);/*Or int86(0x0021, &inregs, &outregs);*/} void clrscr(void){ union REGS inregs, outregs; inregs.x.ax = 0x0003; int86(0x0010, &inregs, &outregs);}void getch(void){ union REGS regs; regs.x.ax = 0x0010; int86(0x0016, ®s, ®s);الكود الرابع
كود:void gotoxy(int x, int y){ union REGS inregs, outregs; inregs.h.ah = 0x02; inregs.h.bh = 0x00; inregs.h.dh = y; inregs.h.dl = x; int86(0x0010, &inregs, &outregs);}void getxy(int *x, int *y){ union REGS inregs, outregs; inregs.h.ah = 0x03; inregs.h.bh = 0x00; int86(0x0010, &inregs, &outregs); *x = outregs.h.dl; *y = outregs.h.dh;}void clrscr(void){ int i; for(i=0;i<25;i++) printf("\n"); gotoxy(0, 0);}void putc(char ch, int color){ union REGS inregs, outregs; inregs.h.ah = 0x09; inregs.h.al = ch; inregs.h.bh = 0x00; inregs.h.bl = color; inregs.x.cx = 0x0001; int86(0x0010, &inregs, &outregs);}void puts(char *str, int color){ union REGS regs; int getx; regs.h.ah = 0x03; regs.h.bh = 0x00; int86(0x0010, ®s, ®s);getx = regs.h.dl; while(*str){ putc(*str++, color); regs.h.ah = 0x02; regs.h.bh = 0x00; regs.h.dl = ++getx; int86(0x0010, ®s, ®s); }}اتمنى منكم مساعدة سريعة لانه عندى امتحان فاينل ولازم نقراهم بعد التنفيد ...
وشكرا جزيلا لكم
مصدر الموضوع الى خبراء لغة السى ... طلب بسط - منتديات الهندسة نت http://www.alhandasa...1#ixzz1y0AnAoFZ