assembler

Building an assembler

Hello people ! I need to build an assembler for a CPU architecture that I've built. The architecture is similar to MIPS, but this is of no importance. I started using C#, although C++ would be more appropriate. (C# means faster development time for me). My only problem is that I can't come with a good design for this application. I am...

Has anybody had real experience with the Terse Assembler ?

I'm interested in playing with assembler (again) as a diversion from high level languages like Smalltalk, and came across the Terse Assembler Site. The syntax looks quite interesting, and appears to be a useful development on Assembler Languages, but I was wondering if anyboy has used Terse in a real world project and did it offer adva...

Which x86 assembler do you use?

For anyone who works with x86 assembly, I'm curious which assembler you use. Preferably, the name should be an acronym and end in "ASM" =) ...

Using yyparse() to make a two pass assembler?

I'm writing an assembler for a custom micro controller I'm working on. I've got the assembler to a point where it will assemble instructions down to binary. However, I'm now having problems with getting labels to work. Currently, when my assembler encounters a new label, it stores the name of the label and the memory location its referr...

documentation of gnu assembler directives

I'm trying to learn mips assembly at the moment. To that end, I wrote a very simple c program... int main(){} ...and compiled it on a mips machine with the -S option to gcc to generate assembly code. Here is what the beginning of the main function looks like: .ent main main: .frame $fp,8,$31 .mask 0x40000000,-8 .f...

How to get rid of gcc assembler warning "setting incorrect section attributes for .init" in C code?

I have the following C code: struct myStruct_t { const char m_name[60]; const uint32_t m_data; }; const struct myStruct_t myStruct __attribute__(( __aligned__( 64 ), section(".init") )) = { "myName", (uint32_t)&someOtherStruct }; When I compile in gcc 4.1.1 (for PS3), I get the warning: 1>c:/t...

Phar Lap Assembler: I Need information/documentation and binaries if possible.

I've inherited a rather old big and complex codebase for a program originally targeted at MSDOS. It turns out that some sections of this program are written in an obscure dialect of x86 assembler called "Phar Lap assembler", after the company and product that produced the assembler program. I've done a fairly deep google search and I'm u...

How to make a cross-platform c++ inline assembly language?

I hacked a following code: unsigned long long get_cc_time () volatile { uint64 ret; __asm__ __volatile__("rdtsc" : "=A" (ret) : :); return ret; } It works on g++ but not on Visual Studio. How can I port it ? What are the right macros to detect VS / g++ ? ...

What are good or interesting Assembler-like languages, but at a higher level?

I've been looking at L.in.oleum and am intrigued by it's mix of higher-level constructs (loops, dynamic variables) with low-level assembler power (registers). Are there other languages like Lino out there, which blend the speed of assembler with productivity enhancing features? EDIT: I realized this kind of sounds like an ad. I'm ge...

Trying to no-op an instruction

Is it possible using GNU tools (gcc, binutils, etc) to modify all occurrences of an assembly instruction into a no-op? Specifically, gcc with the -pg option generates the following assembly (ARM): 0x0: e1a0c00d mov ip, sp 0x4: e92dd800 stmdb sp!, {fp, ip, lr, pc} 0x8: e24cb004 sub fp, ip, #4 ; 0x4 0xc: ebfffffe bl 0 <mco...

compile AMR-nb codec with RVCT for WinCE/Window Mobile

Hello everybody, I'm working on amr speech codec (porting/optimization) I have an arm (for WinCE) optimized version from voiceage and I use it as a reference in performance testing. So far, binary produced with my lib beats the other one by around 20-30%! I use Vs2008 and I have limited access to ARM instruction set I can generate with M...

Assembler - are you using it for something nowadays?

I'd like to know if it makes sense to know assembler nowadays? or I should forget it as wasting of time? When I've learnt some basics like reading files counting, making loop and function. I'm not sure if it makes sense to learn more? can I ever needed? Dupe: http://stackoverflow.com/questions/143561/is-there-a-need-to-use-assembly-...

How do modern compilers use mmx/3dnow/sse instructions?

I've been reading up on the x86 instruction set extensions, and they only seem useful in some quite specific circumstances (eg HADDPD - (Horizontal-Add-Packed-Double) in SSE3). These require a certain register layout that needs to be either deliberately set up, or occur from the series of instructions before it. How often do general-purp...

"file not recognized" while using the GNU linker

I'm probably doing something wrong, being a newbie. Could you please help me out? I've written a simple Hello World program in C called hello.c, and ran the following command: gcc -S hello.c That produced hello.s. Then I used that file with GNU assembler, as: as hello.s Which produced a non-executable a.out, which still needs to b...

x86 code generator framework for Delphi

Has anyone come across a framework or library for Delphi to simplify the generation of x86 code? I am not looking for an assembler, but rather a framework that abstracts the code generation process above the low level bits and bytes. Ideally I would like to build on top of an existing library or framework rather than hardcode the logic o...

SIC Assembler I/O question

I've coded a SIC assembler and everything seems to be working fine except for the I/O aspect of it. I've loaded the object code into memory (converted char format into machine representation), but when I call SICRun(); to execute the code, I get an error stating "devf1 cannot be found". I know this is related to the input/output devi...

Is it possible to compile assembly code in MSVC++?

Is it possible to create, edit, link, compile (is compile the word?) etc. assembly code in MSVC++? Also, if it's not possible, how can I create an .exe out of plain text, ie: convert the text into whatever format is required to use assembly code, then turn the assembly code into an .exe. (I'd say compile, but I don't think that is the c...

Why do programmers confuse the term "assembler" with "assembly"?

As programmers we need to be precise with our verbal and written communication. Why do so many programmers confuse the term "assembler" (the object code generator) with "assembly" (the language you program in)? The distinction is unambiguous. Could there be historical explanation? ...

how to integrate assembly code when i am designing a compiler in c?

i am designing a compiler in c . but for certain problems like big integers i have to code in assembly code . so how can i integrate assembly code in c? i am wrting my code in dev cpp.. which i suppose uses gcc ... in windows..!!.. pls give me instructions for linux too ...

Images for Assembler, Interpreter and Compiler?

I got an assignment to make hand-drawn posters of Assembler Interpreter Compiler I googled for images of above three but not able to get some exact images which can define the above three properly. Can anyone share some image links which will give an idea about what is Assembler, Interpreter and compiler in computers. Thanks ...