| | |
Using Assembly Codes in Bloodshed Dev-CPP
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
I am using BloodshedDev-CPP GNU. Assembly codes are written in this format :
int Variable=45; /*a random value*/
__asm(mov %ax,_Degisken);
The crap compiler uses 'AT&T Assembly Syntax'. The problem is I don't know that AT&T stuff and I want to call some interrupts in my program.
In the normal assambly language, interrupts are called with "int" keyword. But what about AT&T?
int Variable=45; /*a random value*/
__asm(mov %ax,_Degisken);
The crap compiler uses 'AT&T Assembly Syntax'. The problem is I don't know that AT&T stuff and I want to call some interrupts in my program.
In the normal assambly language, interrupts are called with "int" keyword. But what about AT&T?
>The crap compiler uses 'AT&T Assembly Syntax'.
Just because it uses an ASM syntax that you don't know doesn't mean that the compiler is crap. In fact, GNU GCC is a very good compiler that many experts recommend. Good first impression. :rolleyes:
>In the normal assambly language
There is no "normal" assembly language. Every architecture uses a different base assembly language, and every compiler that supports inline assembly uses its own variant.
>But what about AT&T?
Hmm, I don't know about everyone else, but I'm disinclined to help you after reading your derogatory and ignorant comments toward something you don't understand.
Just because it uses an ASM syntax that you don't know doesn't mean that the compiler is crap. In fact, GNU GCC is a very good compiler that many experts recommend. Good first impression. :rolleyes:
>In the normal assambly language
There is no "normal" assembly language. Every architecture uses a different base assembly language, and every compiler that supports inline assembly uses its own variant.
>But what about AT&T?
Hmm, I don't know about everyone else, but I'm disinclined to help you after reading your derogatory and ignorant comments toward something you don't understand.
New members chased away this month: 4
A Hacker's Mind:
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes..." - J.D.Salinger
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes..." - J.D.Salinger
•
•
Join Date: Nov 2004
Posts: 108
Reputation:
Solved Threads: 3
-masm=intel in the compiler options
Join me on IRC:
Server: irc.daniweb.com
Channel: #C++
Chat Via:
http://daniweb.com/chat/minichat.php
or
Your favorite IRC client.
Server: irc.daniweb.com
Channel: #C++
Chat Via:
http://daniweb.com/chat/minichat.php
or
Your favorite IRC client.
•
•
Join Date: May 2005
Posts: 7
Reputation:
Solved Threads: 0
I set this "-masm=intel" and then tried to compile this:
<< moderator edit: added [code][/code] tags >>
The errors were:
Assembler messages:
Error: symbol `label' is already defined
Error: symbol `label' is already defined
I don't know what to do.
Thanks for help
typek
C Syntax (Toggle Plain Text)
void flipIt(void* buffer) { void* b = buffer;// Ukazatel na buffer __asm__ // ASM kód ( "mov ecx, 256*256 \n\t" "mov ebx, b \n\t" "label: \n\t" "mov al, [ebx+0] \n\t" "mov ah, [ebx+2] \n\t" "mov [ebx+2], al \n\t" "mov [ebx+0], ah \n\t" "add ebx, 3 \n\t" "dec ecx \n\t" "jnz label \n\t" ); }
The errors were:
Assembler messages:
Error: symbol `label' is already defined
Error: symbol `label' is already defined
I don't know what to do.
Thanks for help
typek
•
•
Join Date: Jul 2005
Posts: 14
Reputation:
Solved Threads: 0
set "-masm=intel" and compile this:
AT&T does tend to suck. It hurts my eyes.
C Syntax (Toggle Plain Text)
void flipIt(void* buffer) { static void* b asm("b") = buffer;// Ukazatel na buffer asm(// ASM kód "mov ecx, 256*256;" "mov ebx, b;" "label:;" "mov al, [ebx+0];" "mov ah, [ebx+2];" "mov [ebx+2], al;" "mov [ebx+0], ah;" "add ebx, 3;" "dec ecx;" "jnz label;" ); }
AT&T does tend to suck. It hurts my eyes.
![]() |
Similar Threads
Other Threads in the C Forum
- Previous Thread: Problems with linking OBJ files
- Next Thread: Fstream object questions
Views: 10482 | Replies: 5
| Thread Tools | Search this Thread |
Tag cloud for C
adobe ansi api array arrays asterisks binarysearch calculate centimeter char convert copyanyfile copyimagefile copypdffile cprogramme createcopyoffile csyntax directory drawing dynamic executable fflush file fork frequency getlasterror givemetehcodez graphics gtkgcurlcompiling hacking hardware highest homework i/o inches incrementoperators infiniteloop initialization interest km lazy linked linkedlist linux linuxsegmentationfault list locate logical_drives match matrix microsoft motherboard multi mysql number open opendocumentformat opensource owf pattern pdf performance pointer pointers posix power problem probleminc program programming pyramidusingturboccodes read recursion recv repetition scanf scheduling scripting segmentationfault send shape socketprograming spoonfeeding stack standard string strings structures student suggestions systemcall testautomation unix user variable voidmain() wab win32 win32api windows.h






