Please help me find the error with my code. Whenever I try to run the program, it returns a Segmentation Fault message. I've been trying to find and play with the codes but I'm really stuck.. Please help me.. Here's my code: [CODE] .section .data format: .asciz "%d\n" values: .int 5, 3, 2, 4, 7 smallest: .int 0 .section .text .global _start _start: leal values(, %edi,4), %esi movl $4, %ecx #outer loop counter movl $4, %ebx #inner loop counter movl (%esi), %eax movl %eax, smallest addl $4, %esi dec %ebx jz output loop: movl (%esi), %eax cmp smallest, %eax jl …

Member Avatar
Member Avatar
+0 forum 1

Hi, I'm beginning with C and makefiles. I'm trying to compile a list of C files with GNU Make. My code should compile all the C files in the folder into .o files along with few flags and then use these .o files to compile an executable file 'main'. and my code is this [CODE] CC=gcc FLAGS=-l./-O3 -Wall -c CFILES:=$(shell ls | grep .c) OBJS:=$(CFILES:%.c=%.o) all:$(OBJS) $(CC) $(OBJS) -o main $(OBJS):$(CFILES) $(CC) $(FLAGS) $(CFILES) [/CODE] Don't laugh please. This is not going to work as make is not going to compile each C file separately to build the final file …

Member Avatar
Member Avatar
+0 forum 1

please help with a c program for the following ASM.. [CODE] x is at %ebp + 8, y is at %ebp + 12 movl 8(%ebp), %ebx movl $0, %eax movl $0, %ecx .L13: leal (%eax, %eax), %edx movl %ebx, %eax andl $1, %eax orl %edx, %eax shrl %ebx Shift right by 1 addl $1, %ecx cmpl $32, %ecx jne .L13 [/CODE]

Member Avatar
+0 forum 0

Here is my code [code].section .data values: .int 0 array_end: .equ ARRAY_SIZE, array_end - values array_fmt: .asciz " %d" usort_str: .asciz "unsorted array:" sort_str: .asciz "sorted array:" newline: .asciz "\n" maxvalue: .int 1000 format: .asciz "%d" message: .asciz "Please enter a maximum size for the array to be sorted." output: .asciz "The length is '%d' \n" val_fmt: .asciz " %d" .section .bss .comm buffer, 4000 .section .text .globl main main: pushl $message call printf addl $4, %esp pushl $maxvalue pushl $format call scanf addl $8, %esp movl $buffer, %edi movl maxvalue, %edi pushl maxvalue pushl $output call printf addl $8, …

Member Avatar
+0 forum 0

Hi all, My directory setup is follows. * My project folder is dev/. * All source files are in src/ with respective names, i.e. buzzer.c in buzzer/, led.c in led/ , lcd.c in lcd/ ... * All headers are in inc/. * All compiled objects are in obj/. * The startup files are in startup/. I am trying to make a makefile which can identify changes in any dependency, i.e. dependencies in some other directory and update my target file. A sample of my directory setup is here: [url]http://rapidshare.com/files/376788297/dev.zip[/url] The makefile I wrote is here: [url]http://pastebin.com/nMiQDc42[/url] I am not able …

Member Avatar
+0 forum 0

You often hear the terms 'free software' and open source used interchangeably but they're not the same. In fact, true free software zealots launch into a fiery diatribe on the issue should you even utter the words "open source" when speaking of free software. Free software is not related to the amount of money you pay (or don't pay) for software; it is an ideology. Free means freedom. Most writers relate the concept to free speech or free beer, however, neither fully illustrates the concept. Free software, as defined by the [URL="http://www.fsf.org"]Free Software Foundation[/URL] (FSF), comply with the [I]Four Freedoms[/I]. …

Member Avatar
Member Avatar
+0 forum 3

Some time ago, I was writing a small command line interpreter, with the help of [url=http://docs.python.org/library/cmd.html#module-cmd]the standard module cmd[/url] which offers minimal support for such tasks, and I had the problem that this module doesn't have a function to parse a command line to produce a list argv which can be passed to [url=http://docs.python.org/library/optparse.html#module-optparse]optparse[/url] for example. I found a first solution with the third party module [url=http://pygments.org/]pygments[/url] which contains parsers for different languages, and I parsed the command line using pygment's bash parser. However, I was not completely happy with this solution and I started looking for the C function …

Member Avatar
Member Avatar
+1 forum 1

Do you need a reality check? Freedom isn't free. You have to work hard, and possibly even die, for it. Fortunately, free software doesn't require you to sacrifice anything but restrictions. Unfortunately, the powerful marketing machines constantly bombard and tempt you with semi-clever TV commercials, discount offers, inexpensive upgrades or feature hype in order to restrict your freedom. Purchasing proprietary operating systems and applications restrict you without cause. Actually, that isn't 100 percent true. There is a cause. You're restricted with the intent of imprisoning you and making you conform to their version of reality. That's the opposite of freedom. …

Member Avatar
Member Avatar
+0 forum 5

I was talking with my friend, [URL="http://blogs.zdnet.com/perlow"]Jason Perlow[/URL], yesterday and he told me that I should back off of the free software rants because he feels that I'm entering the gray edges of freakdom. We laughed about it but it made me think: When does a strong belief in something become extremism? I've had two conversations with Richard Stallman about free software specifically and freedom generally. My conclusion is that there's a fine line between freedom and freakdom. My goal is to find that line and explore its dimensions. My first conversation with Richard Stallman (RMS) was a tentative discussion, …

Member Avatar
Member Avatar
+0 forum 8

Have you searched for Linux distributions that are 100% free? Did you find more than one that suited your needs? Well, here's a list of nine from which you can choose your favorite. Free means freedom to alter, redistribute, sell or release as a different product with no restrictions on you or your new distribution. [B]1. [URL="http://www.blagblagblag.org"]BLAG[/URL][/B] - Blag is an operating system. Blag has a suite of graphics, internet, audio, video, office, and peer to peer file sharing applications. Based on Fedora, Blag has just about everything you'd ever need for productivity and fun. [B]2. [URL="http://www.dragora.org"]Dragora[/URL][/B] - Dragora is …

Member Avatar
Member Avatar
+1 forum 12

Hi guys can someone PLEASE give me the gnu C++ int class. Im trying to create a wrapper class to wrap the int class.

Member Avatar
+0 forum 0

I had the honor and pleasure of speaking to [URL="http://www.fsf.org"]Richard Stallman[/URL] a few days ago while he was in New Zealand on a speaking tour. I had been in an email conversation with him over several days asking about which software programs he uses and I finally connected with him for some clarification and more details. So, if you've ever wanted to get the scoop straight from the man himself, you'll want to listen to the [URL="http://www.frugaltechshow.com/stallman"]podcast[/URL]. The conversation begins abruptly because the phone conversation is a continuation of that email dialog. We also got cut off at one point …

Member Avatar
Member Avatar
+3 forum 12

The new version of the [URL="http://www.fsf.org/licensing/licenses/agpl-3.0.html"]GNU Affero General Public License[/URL] has been published by the Free Software Foundation, based upon the existing GNU GPLv3 license but with one important difference: support for on-demand software-as-a-service (SaaS) applications. By publishing this license, the FSF aims to foster user and development communities around network-oriented free software. The GNU Affero General Public License is a free, copyleft license for software which has been specifically designed to ensure cooperation with the community in the case of network server software. It is intended to guarantee the freedom to share and change versions of a program, ensuring …

Member Avatar
Member Avatar
+0 forum 2

The End.