Re: how to insert an asm instruction in C code and how to compile it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Srinivas G. wrote:

asm cmp al,0ah asm jne test
		asm mov	al,0dh     //; new line
		asm mov	bx,07h
		asm int	10h
		asm mov	al,0ah
test:
		asm mov bx,0x07
		asm int 0x10

Under which operating system do you want to run this code ? All 32-bit operating system working in protected mode won't allow you to use the int 0x10 BIOS functions.

If you're working under DOS, then, yes, it may work. But then, you're completely offtopic.

If you're working under GNU/Linux, then use one of the libraries available to make graphics (SDL for example, but they are plenty others).

Sincerly,

Thomas
--
Thomas Petazzoni
thomas.petazzoni@xxxxxxxx

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux