Posts
 
Reputation
Loading chart. Please wait.
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
3
Posts with Upvotes
3
Upvoting Members
2
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
~10K People Reached
About Me

I spend copious amounts of time programming an operating system in assembly and C. When I'm not geeking out I read, listen to music, work, climb mountains and work towards running my own company.

Interests
Photography, mountain climbing, hiking
PC Specs
i5 @ 3.5GHz | 4GB RAM @ 2005MHz | 5850 @ 1200/850 1.7TB HDD space | Soundcardless :( Windows 7 | Ubuntu…
Favorite Forums

30 Posted Topics

Member Avatar for Auraomega

Returning back to asm and coding in general, got an issue with what's probably an obvious mistake but I'm stumped non-the-less. [CODE='c']kputs("Testing");[/CODE] [CODE]; ; Print a single character to screen ; kputchar: ; assumes the register ax will contain the character to print mov edx, [SCREEN] ; edx = screen …

Member Avatar for Auraomega
0
106
Member Avatar for degamer106

I think you've misunderstood how modulus works, or maybe I've misunderstood you :P Basically in your x % y example, you are taking y away from x until x is less than y, then returning x. Example in C that I wrote a while ago: [CODE=c]int mod(int a, int b) …

Member Avatar for Shankye
-1
254
Member Avatar for Auraomega

Is there any documentation available on creating a dynamic voltage frequency scaling tool in C? I've been unable to find anything on Google and the only applications I seem to be able to find using DVFS are closed source. My preference would be for a Windows based system as that …

Member Avatar for N1GHTS
0
128
Member Avatar for Auraomega

Just wondering how I can get the time the program was compiled into my code dynamically, I'm guessing it'll be through my makefile somehow but my Google-fu has failed today. Any help would be great! (GCC + make *only*)

Member Avatar for nezachem
0
133
Member Avatar for JeshtLian
Re: HELP

No. Go read an assembly book, produce some code and ask us where you need help. We don't simply give the code around here.

Member Avatar for brandonrunyon
-1
77
Member Avatar for litsluv
Member Avatar for iwanttolearnc

You've used a finite loop which may make it appear that break is being called and that blink is only being called once, I.E. it'll loop 256 times and then come out of the for loop. I suspect you want something like this: [CODE]if (!(strcmp(userinput, led))){ //condition 1 for(;;){ //condition …

Member Avatar for iwanttolearnc
0
114
Member Avatar for jemz

You're not going to call your new line with that for loop. [CODE]for(i=0;i<10;i++) { for(j=0;j<i;j++) { printf("*"); } printf("\n"); }[/CODE] Will now give the output: [QUOTE]* ** *** **** ...[/QUOTE] So you now need to change the logic to add some spaces to make your * centre. I'll leave that …

Member Avatar for jemz
0
73
Member Avatar for N1GHTS

How are you compiling in GCC? That error usually comes from not supplying the required libraries at compile time.

Member Avatar for N1GHTS
0
612
Member Avatar for challarao

There are many ways to compile code on Windows similar to Linux. If you used an IDE on Linux, then Code::Blocks is a great suggestion, as is Visual C++. If you used the command line then you can install Mingw which is like GCC and works through the command line, …

Member Avatar for Auraomega
0
313
Member Avatar for susin

[B]>#define p printf >#define s scanf[/B] No. Just no. This is [I]really[/I] bad practise, not only should you avoid macros where possible, it's also generally a bad idea to rename functions, it reduces code readability and makes it harder for someone else to debug your code, on top of this …

Member Avatar for Auraomega
0
282
Member Avatar for nigelmercier

As odd as it sounds: [CODE]p = (p + 1) % 10; // works p = (p++) % 10; // doesn't work[/CODE] So if you want to get it all on a single line, do the the top line.

Member Avatar for mitrmkar
0
346
Member Avatar for satishsingh

Ok, first it'd help if I could understand your question (typing in proper English helps there). Assembly simply gets turned into machine code, which then controls the CPU, which in turn can control other hardware (not quite that simple, but we'll pretend it is). All machine code is is a …

Member Avatar for Auraomega
-1
122
Member Avatar for priyanka.js28

Like Adak said, all the compiler really does is convert your code into assembly (which is basically a set of mnemonics for binary). Any compiler worth its salt will optimise it to be the quickest: [CODE=C]p++;[/CODE] becomes: [CODE=ASM]inc eax[/CODE] Where as: [CODE=C]p += 1;[/CODE] would become (if the compiler didn't …

Member Avatar for SaiBalaji
0
430
Member Avatar for ankur3000

I tried running your code, there are multiple issues with it but I'll just list the ones that jumped out to me and leave you to figure out the others. [Line 5] Change your char *ref[52] to be char ref[52], and every other line in your code that uses *ref[i] …

Member Avatar for Auraomega
0
125
Member Avatar for firoz3321

You'll need to write your own data type to do this. There is also a library out there which can hold numbers up to a stupid amount, but I can't rememeber what it is called. If you have a search on Google I'm sure you'll find it. EDIT: Found it, …

Member Avatar for prvnkmr449
0
4K
Member Avatar for Auraomega

I'm in the process of coding my own OS and right now I'm working on a stdio lib but was just wondering about fputs and how it should write to the screen, which would be a better approach? Making stdout a file descriptor and having puts call fputs with the …

Member Avatar for Auraomega
0
102
Member Avatar for smith32

From the top... [Line 4] Why are you using a 2d array as well as a 1d array? [Line 12] Getting data 1 longer than the array (2 longer than you should be using seeing as the last value of a char array should be 0x00). [Line 19] Why are …

Member Avatar for Adak
0
222
Member Avatar for JayNak

Check your warnings. You'll almost certainly be getting them on every line that you've passed your buffer/token. Remove the & sign and it should work correctly.

Member Avatar for Ancient Dragon
0
206
Member Avatar for krille_x

argv is for giving arguments to your program. You're wanting to return arguments so: [CODE]int main(int argc, char **argp) { // create a new 2D array to return value from int **ret; // dynamically allocate memory here (AKA malloc) // return our ret array }[/CODE] This should start you off …

Member Avatar for Narue
0
170
Member Avatar for king chandel

You might have better luck posting on the assembly board as opposed to the C board (unless you're wanting to do inline assembly, if that's the case PM me and I'll give you as much assistance as I can). A good place to start learning assembly is [url]http://forum.codecall.net/assembly-tutorials/[/url] specifically the …

Member Avatar for Auraomega
0
92
Member Avatar for jeevsmyd

Using modulo you can generate a number up to pretty much anything: [CODE]int number = rand();[/CODE] generates a number between 0 and the max your system can handle (likely, 2^32 / 2). [CODE]int number = rand() % 6;[/CODE] generates a number between 0 and 5 (as 6/6 = 1 remainder …

Member Avatar for Auraomega
0
437
Member Avatar for rtirak

[CODE]int main(int argc, char **argp) { bool understood = false; do { read("http://www.daniweb.com/forums/thread78060.html"); // if you get the chance check who you're insulting here, too. } while(!understood); }[/CODE]

Member Avatar for rtirak
0
167
Member Avatar for amarnathch

Narue, out of interest what is the convention for this kind of thing? I just found [URL="http://www.cs.nyu.edu/exact/core/doc/stackOverflow.txt"]this link[/URL] which gives the specific sizes for each platform, I'm just intrigued as to why it has to be 2^16 minimum.

Member Avatar for Narue
0
95
Member Avatar for creeps

As far as I'm aware, the reason people [I]used[/I] for( ; ; ) was due to being faster than while(1), although I believe any compiler worth it's salt these days will optimise while(1) to produce the same output as for( ; ; ). I think the reason people [I]still[/I] use …

Member Avatar for creeps
0
103
Member Avatar for Auraomega

I've never used inline assembly shockingly, and I'm just wondering how/if I can do something. Bit of background; I'm coding a basic OS kernel, I have various subroutines written in assembly and amongst others I have a puts subroutine that is an attempt at mimicking puts in C. In order …

Member Avatar for Auraomega
0
124
Member Avatar for GAslugger

I'm not familiar with dynamic C, but assuming it's the Rabbit IDE, I'd recommend checking out the documentation [URL="http://www.rabbit.com/documentation/docs/manuals/DynCFunctionReference/index.htm"]here[/URL] if you haven't already. Assuming there is no initialisation required for printf then the code appears to be correct except that your main function should return an int: [CODE=C]int main(int argc, …

Member Avatar for Auraomega
0
187
Member Avatar for Auraomega

Trying to write a puts like subroutine in assembly but failing miserably. I'm using BIOS calls only (I.E. I'm not running another operating system). The code is using Intel syntax. What I have so far is: [CODE=asm]; [BITS 32] [GLOBAL hello_world_asm] ; ; a very basic puts function without the …

0
53
Member Avatar for Auraomega

Finished writing this a little while ago but unfortunately the generated MD5 doesn't match other application's hashes. I have basically used [URL="http://en.wikipedia.org/wiki/Md5"]Wikipedia[/URL] for reference. I have a feeling my error is introduced in the padding stage but I can't be certain, hoping a fresh set of eyes could point out …

Member Avatar for Kieran Y5
0
265
Member Avatar for Auraomega

Hi there, I'm in the process of moving some code into Visual C++ 2008, the code works fine when compiled with Mingw however crashes when compiled with VC++: [CODE=c++] s_cell **cell; *cell = (s_cell *) malloc(sizeof(s_cell) * MAP_X); for(int loop = 0; loop < MAP_X; loop++) { cell[loop] = (s_cell …

Member Avatar for Aranarth
0
168