Programming, for all ages and all languages.
uSername
Posts: 1 Joined: Thu Mar 29, 2012 12:41 pm
Post
by uSername » Thu Mar 29, 2012 12:45 pm
The 'int' command is not compiling using GCC Inline assembly. Here is my code:
Code: Select all
void uPrint(char uIn){
__asm__ ("movb $0x0A, %ah\n\t"
"movb $uIn, %al\n\t"
"int 16");
}
void uMain(){
uPrint('H');
}
Here is my error:
Snake
Posts: 19 Joined: Wed Mar 21, 2012 7:38 pm
Post
by Snake » Thu Mar 29, 2012 2:13 pm
iansjack
Member
Posts: 4687 Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK
Post
by iansjack » Mon Apr 02, 2012 9:38 am
Snake is right. Just using "int 16" refers to the address 16, not the constant 16. So you are trying to use a 32-bit or 64-bit (depending upon your OS) number with the "int" instruction, which just won't work.
petergerko
Posts: 1 Joined: Mon Apr 16, 2012 5:22 am
Contact:
Post
by petergerko » Mon Apr 16, 2012 5:34 am
Is this sign "$" used for both 32 and 64 systems?