Programming :: Reverse Bit Order In MIPS/SPIM?
Apr 27, 2009
Here is what I have so far.The program receives and echos characters without syscalls. I am trying to add 2 procedures(rev7 and putint)Rev7: Reverses the least significant 7 bits and outputs $s2Putint: Prints the decimal value of $s2.When i run it, it echos the character then prints a "P". I have no idea where that comes from.Everything seems correct to me but I do not understand why it does not print the decimal digits
Code:
.data
hello:.asciiz "Enjoy This Program
[code]....
View 2 Replies
ADVERTISEMENT
Aug 12, 2010
I'm trying to write an extension to PHP which means coding in C. I'm really really rusty at C coding and was never very good at it.
Can anyone propose an efficient, safe, and [hopefully] future-proof way of reversing a double? Keep in mind that it should work on as many systems as possible and on 32- and 64-bit systems (and on ???-bit systems in the future?). Will the size of a 'double' ever change or will it always be 8 bytes?
I've tried this and it doesn't work...the compiler complains about "invalid operands to binary" because I'm trying bitwise shiftw on a non-integer.
Code:
x = (x>>56) |
((x<<40) & 0x00FF000000000000) |
((x<<24) & 0x0000FF0000000000) |
((x<<8) & 0x000000FF00000000) |
[Code]....
View 3 Replies
View Related
May 8, 2010
I have a BROTHER MFC-495cw and i do alot of printing so when i as openoffice, adobe etc to print a document it always comes out 1st page first with the last page on top (when i do it this way i have to go in and turn everything around i'm tired of doing that) i want it to print the page from last to first that way the first page is always on the top of the stack
i am running ubuntu karmik koala and i already mentioned my printer model
View 4 Replies
View Related
May 26, 2011
I am running fully updated ubuntu 10.10 and now, since 2 days ago, when I open a file
in open office, gimp or gedit etc the directories and files now appear in reverse alphabetical order.
View 8 Replies
View Related
Apr 6, 2011
I'm curious as to whether anyone else has experienced this, and has an explanation. I'm running Kile 2.0.85 under openSUSE 11.3 32-bit on a Lenovo X61. Twice in the past couple of days I've had the bizarre experience that, upon a sudden burst of typing my text has appeared in Kile in reverse order.
no ngis fo ecnacifingis eht fo redaer eht dnimer esaelp ,dniw cihportsoeG a htiw snoitalumis eht gnicudortni erehw ,Note the perfect reversal (I rarely type that accurately in forward mode). A day later it happened again: )1.3.5( noitceS fo hpargarap dnoces eht ni ,niaga ecnO.I've been using Kile for almost a year now, on two different machines and under several versions of openSUSE. Nothing remotely like this has happened before. I don't think I have a virus. I can't think of any event that may have heralded this mystical behaviour. Cheers, jdw
View 2 Replies
View Related
Mar 16, 2010
I am attempting to install SPIM on my machine. I have downloaded the Fedora 12 files from here and try to install like this:
Code:
# rpm -ivh cbi-package-config-12-10.i686.rpm
This appears to proceed with no issue. But, when I try to
Code:
# yum install SPIM
I receive error messages like this:
[Code]...
View 1 Replies
View Related
Sep 27, 2009
Reverse dns lookup in C?
View 3 Replies
View Related
Oct 12, 2009
I am using RHEL5. These are my config files:
Code:
options {
listen-on port 53 { 127.0.0.1; 192.168.14.54; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
[code]....
View 3 Replies
View Related
Sep 22, 2010
I am making a program to reverse a string
Code:
#include<stdio.h>
int main ()
{
int i,j;
[Code].....
View 5 Replies
View Related
Aug 23, 2010
QTreeView and QTableView have sort functions, but I need to sort a QListView, and for there to be no way for the user to turn off or reverse sorting.
View 11 Replies
View Related
Aug 25, 2010
how to use socket programming in order to implement chatting feature
View 5 Replies
View Related
Apr 18, 2011
I'm learning Haskell from an on-line tutorial, and trying to figure out how I/O works. I'm a bit confused with this example:
Code:
My expectation is for it to ask me for a line, then for it to convert the line I provide to uppercase (err... create a new line that is uppercase) and then output said line.
However, what actually happens when I run it is it firsts ask me for a line, then outputs "Next line: ", then outputs the uppercase line:
Code:
I realize that Haskell is not an imperative language, but I was (mistakenly?) under the impression that there was some kind of sequence guaranteed in the do blocks. Could someone explain why this happens, and how I can "fix" my code to get the desired behavior?
I'm running:
- Linux version 2.6.34-gentoo-r12 (64-bit)
- GNU bash, version 4.1.9(2)-release (x86_64-pc-linux-gnu)
- Glasgow Haskell Compiler, Version 6.12.3, for Haskell 98, stage 2 booted by GHC version 6.12.3
View 2 Replies
View Related
Jul 26, 2011
I want to change the parameter for ThreadLimit for one file as shown below using sed. I want to ignore the commented line. But the command I am using also executing with commented line.
# ThreadLimit: maximum setting of ThreadsPerChild
ThreadLimit 25
I want the desired output as
# ThreadLimit: maximum setting of ThreadsPerChild
#ThreadLimit 25
ThreadLimit 50
For this I am using command.
sed '/ThreadLimit/{;h;s/^/#/p;x;s/ .*/ 50/;}' test.txt.1 > test.txt
View 7 Replies
View Related
Jun 9, 2010
Say I have a text file with10 columns. I need to reorder them based on a list of column numbers that will reorder them.
My problem is this:
If I want to cut out 5 columns (columns 1,2,3,9,10) in the order 1,10,2,9,3 then I have tried using:
Code: cut -f1,10,2,9,3 my_file.txt > reordered_file.txt But this just extracts the columns in order as if I used:
Code: cut -f1,2,3,9,10 my_file.txt > reordered_file.txt How can I cut these columns and place them into the new file in the order I specify?
While this might seem quite trivial, I will actually need to do this for a file containing ~14000 columns with ~12000 columns that I need to extract in a particular order.
View 2 Replies
View Related
Apr 21, 2010
I would like to know if is it necessary(and why) to use setsid to create a session leader in order to create a daemon process?
View 1 Replies
View Related
Apr 19, 2010
I'm writing a PHP script, and I need a top 10 result from a mysql query.I've tryed like this:select IP,sum(download) from traf group by IP order by ASC limit 0,10and my sql returnsmysql> select IP,sum(download) from traf group by IP order by ASC limit 0, 10;ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC limit 0, 10' at line 1As I red through Google this is not quite supported by mysql, so is there another way to do this?
View 5 Replies
View Related
Jun 16, 2011
I wonder if it is possible to avoid JNI in order to port a c/c++ STL application to android ?Do I have an alternative for calling C/C++ (STL) code ?
View 2 Replies
View Related
Feb 24, 2010
When I parse a XML file, should I rely on the order of elements?
For example say we have:
Should I rely on the above order?
Would the following still be valid:
I'm trying to find out if a well formed XML document should have an ordered structure, or if it's still valid XML if it has no order.
View 7 Replies
View Related
Aug 18, 2010
in my text file of 5 columns 2 column is in DDMMYYYY format. (ie DATE OF BIRTH). how to use sort command for its ascending order and descending order.
Is the same can be use for the date format YYYYMMDD ?
View 3 Replies
View Related
Mar 12, 2010
I'd like to create a script which allows me to order its data (let's say: Name, age, department and work start date) by date. And display the result in another file.
View 1 Replies
View Related
Mar 21, 2011
Examples:
Code:
$ ./test.sh -a -c 2
operator is -gt
remcount is
^ value missing!
Code:
$ ./test.sh -b -c 2
operator is -lt
remcount is
^ value missing!
Yet when "-c" is the first argument, its value is present:
Code:
$ ./test.sh -c 2 -b
operator is -lt
remcount is 2
What could I do to ensure the value of "-c" is picked up regardless of the argument order?
View 5 Replies
View Related
May 12, 2011
Probably a stupid sounding question, but bear with me please. I need to use the link grammar parser in order to do some part of speech tagging. It's freely available and works once you run the makefile or 'make' it or however it's correctly said. Thing is, it has a C API which I intend to use. And once I ran a bit of the sample code given in the documentation it gave a whole host of errors. This is very confusing because I'm including the path for the folder that has all the header files.
gcc -I/path/include/ filename.c. But it still gives me errors about not being able to find things that are clearly defined there. An hour of trudging around the internet tells me I need to 'compile' the API first. I'm not exactly sure how or if I'm supposed to do that. If someone could just shed light on this it would be greatly appreciated. I grow increasingly cynical to the musical swell of my tiny brain rattling in my skull.
View 5 Replies
View Related
Dec 7, 2010
I've a program which manages my pdf and references. I wish to put some of the information on my website but that program (Mendeley) does export only in XML (or bibtex). I'd like to simply convert the XML output files to SQL in order to create or update an SQL database.I'm not an expert in either XML or SQL (use only PHPMyadmin). Does someone get help me to figure out?
View 2 Replies
View Related
Oct 21, 2010
I am trying to write a bash script that will extract a .cbr (.rar) file, traverse the extracted files in alphabetical order and rename them 001.JPG, 002.JPG, 003.JPG, etc.So far I only have this much to extract it:
Code:
#!/bin/bash
#
[code]....
View 8 Replies
View Related
May 1, 2011
I have made two source files named as sum.c and average.cI have included sum.c in average.c
both files in Documents directory.when i compile average.ot followingerror"average.c:4:22: fatal error: sum.c: No such file or directorycompilation terminated.How to solve this issue?I have tried to copy sum.c to usrinclude folder but unable to copy
View 8 Replies
View Related
Jul 24, 2010
I'm trying to add local sockets in my multi-threaded application in order to exchange data between threads. The only problem I got is that most of the information available on the net is related to internet oriented socket programming whileI want to perform local connections. got a thread that does the sniffing via libpcap. And I would like that thread to send each captured packet to a second thread that will analyse the packetof the thread implementations is written in separate .h file.Or maybe there is a more effective method of exchanging data between threads
View 14 Replies
View Related
Feb 21, 2010
how can i manipulate the source code of ps command in order to hide a process from the list that run by ps.as you know ps command list all the process that exist in /proc.so how can i do this??this is part of my assingment...
View 13 Replies
View Related
Feb 2, 2010
How would I list 4 users ID numbered 10, 11, 12 and 13 from my users list and output them to a file busers where their names are numbered by ascending order? How would I accomplish that on a one line command?
View 4 Replies
View Related
Feb 28, 2009
how to set reverse dns for my IP? I've configured bind with a reverse dns for my IP, but it doesn't work when I test it.
View 2 Replies
View Related
Sep 12, 2010
I have a domain and the settings for it are pointed at my IP address. But when I look up my IP address, it does not show my domain as the hostname. What settings do I have to change to make my IP translate into my domain as the hostname?
View 3 Replies
View Related