Programming :: Print A Single Digit Integer On To The Screen Using The Int 0x80?

Jul 4, 2010

I want to print a single digit integer on to the screen using the int 0x80. I have loaded the number in the ecx(=5, say), size in edx (=4, lenght) and eax (=4) ebx (=1). I've added 48 to the contents of ecx, and then calling int 0x80, I thought should print 5 on the screen.

However it does not print anything. also gives no errors. I checked the contents of the ecx reg (gdb), it has 53.

A snippet showing the this will be great. I've seen snippets using the c library (printf), but I want to see how it is done using int 0x80.

View 9 Replies


ADVERTISEMENT

Hardware :: (OLD) Marian/Sek'D Prodif Plus Driver \shaw Digit I/o, And Don't Need Digit I/o?

Jul 8, 2010

Before i want to buy (OLD) Sek'd Prodif plus soundcard, i want to know, this card is working with Ubuntu 10.04?I found some information in the Alsa page, but i just shaw digit i/o, and i don't need digit i/o, just ANALOG I/O.Somebody can tell me about this card?I really need any information about driver (alsa or oss)

View 1 Replies View Related

OpenSUSE Install :: Change 3-digit Uid To 4-digit?

Dec 28, 2009

I have a new computer on which I have installed suse11. My old computer has suse10. I have copied all my files to move to the new machine and I have the same username on both systems but the uid on my old one is 501 and on the new one it is 1001. know this is going to cause trouble

View 1 Replies View Related

Programming :: Get First Digit Of Each Line?

Nov 24, 2010

I have a file that contains something like this:Quote:

HOURS FROM-TO
------------------------------------
4 10.00-14.00
8 8.00-16.00
10 10.00-20.00

Now, i need to get only the first column, i know how to do that awk '{print $1}', but how can i make an operation with all these numbers? (8+4+10...)

View 3 Replies View Related

Programming :: Replacing The Last Digit?

Jun 23, 2010

i am trying to replace the last digit in the ip address(25) with 47 using following:Quote:echo 192.168.0.25|sed -r s/([0-9]*.[0-9]*.[0-9]*)/47/g'but not able so far, was wondering if you can help, so i can find my mistake.

View 6 Replies View Related

Programming :: Convert An 8 Digit String Into A Long

Dec 15, 2010

I'm trying to convert an 8 digit string into a long. The code compiles, but I'm getting only 1 digit placed into the long.

[Code]....

View 2 Replies View Related

Programming :: Comparing String With Integer?

Sep 19, 2010

If I have a variable, say xvar, which can take both string and integer value and I want to perform an operation in following 2 conditions:1. Either xvar is null2. xvar equals 2[ -z "$xvar" ] || [ $xvar -eq 2 ] && <some-code>Doesn't seem to work if xvar takes string valuesI know that since I have no restriction on xvar, I can get away with string comparison in second test too, ie[ -z "$xvar" ] || [ "$xvar" = "2" ] && <some-code>
But, 'Sams teach yourself shell script in 24 hrs' says that [ expr1 -eq expr2 ], if either is string, it assumes 0 valueIs it true

View 5 Replies View Related

Programming :: Comparison Between Pointer And Integer

Jul 6, 2010

I'm trying to write a simple program that lists a menu and then asks you for your decision, and you can answer with a number or the name. However, I don't know how to add the second options (name).

View 14 Replies View Related

Programming :: Concatenating An Integer To A String?

Oct 18, 2010

I have a function that take char* I call this function in an array, and I need to pass the following:-i+" binomial" to be like "2 binomial" or whatever value of i value (i is an integer) it is pretty easy to be done in java, but how to concatenate an integer with a string and get char* or string to pass to a new function.If you missed me i just need to get the following :string =integer + string

View 5 Replies View Related

Programming :: C - Can't Print In Screen The Content Of File

Mar 20, 2010

why this code can't print in the while loop the content of the file ?

Code:

#include <stdio.h>
int main()
{
FILE *fp;

[code]...

View 7 Replies View Related

Programming :: Split File When Integer Is Found

Jun 25, 2010

I have a file in which contains one line with a lot floating points.In the very first place and some times in the downstream, there are a few integers, surrounded by blank spaces.1 1.02-4 1.03-5 544 1.04-1 65 2.98-1 5.78-10 3.45-2 etc etc.I aim to split the file in more files each of them containing an integer and the following floatings until the next integer.

View 1 Replies View Related

Programming :: Simple Shell Script That Produce Digit Values

Aug 9, 2010

I just started learning shell programming and I'm trying to create a shell script that produce something like this:
Input: 1 234 5 678 9
Output: < <<< 5 >>> >
Input:abc d 1234 5 5 67890 e f ghij
Output:abc d <<<< 5 5 >>>< e f ghij
Characters with values less than 5 will display '<' digit values greater than 5 display '>'. The digit '5' will be left unchanged.

Below is my unfinished code:
#!/bin/sh
read userInput
for f in "$userInput"
do
f1="$(echo ${f} | sed "s/[^0-9]//g")"
if test $f1 -lt 4
then
f3='<'
elif test $f1 -gt 6
then
f3='>'
fi
f2="$(echo ${f} | tr "$f1" "$f3")"
echo $f2
done

View 12 Replies View Related

Programming :: In C Program The Value Of An Integer Variable Is Changing Rapidly

May 12, 2010

In a c program the value of an integer variable is changing rapidly. I have to get the value of that variable at a particular instant from another program. How can i do it without using a file?

When i tried with extern variable as

I execute the both .c file from 2 terminals but got only value 0 printed for both var_a and var_b all the time .

View 4 Replies View Related

Programming :: Java - Doesn't Hold Integer Values

Apr 27, 2011

I have a java compiler and Im using a double intiger called Experience and when compiled and run the double intiger does not hold intiger values that are mathameticle. Like 1.5 - 1.4 will equal .100000000000000000009 and 5/3 will equal 1.0. and 1.5x 1.4 doesnt equal 2.1. Is there something I am doing wrong with double intigers? Is it the compilers fault? Could it be something thats wrong with my computer and the compilers I am using are not tat fault? Anyways double 1.5 + 1.4 does equal 2.9 so.

View 4 Replies View Related

Programming :: C Function Not Returning An Integer After Comparing It To A Char?

Jan 23, 2010

I've got a strange bug that I cannot figure out how to solve. Here is the function.

Code:
int getnexttab(char input[], int index, int length)
{

[code]....

View 14 Replies View Related

Programming :: How To Convert Negative Integer To Byte Array?

Oct 26, 2010

I need to convert an integer to a byte array of size 2 and vice versa. The code shown below works well for positive values but not for negative values. Also, using an array of size four makes the conversion works. However, I am limited to an array of size 2.

View 5 Replies View Related

Programming :: Multithreaded Reading And Writing Of A Shared Integer?

Nov 4, 2010

It it safe to read a shared integer while another thread is writing to it on a multicore system?

View 3 Replies View Related

Programming :: Awk: Print Out A Message To The Screen When Redirecting The Output To File?

Mar 15, 2010

I have a problem when using awk:

e.g: awk '{processing text}' File1 > File2

But when I'm processing the File1, I want to print out some messages to the screen (not the File2). How can I do that?

View 5 Replies View Related

Programming :: Use Regex In Perl Script To Detect Allowed Words From The File And Then Print Output To The Screen?

Oct 4, 2010

Its my first post in here so please be patient I am trying to use regex in perl script to detect allowed words from the file and then print output to the screen.

As an example : I have text file with orders and returns :

Item2-SKU-2-11.08.2010-online
Item3-SKU-3-11.09.2010-return
Item4-SKU-4-11.09.2010-store

My question: is it possible to make sure that i am ony outputing to the screen orders based on few conditions like Item,order form e.g. online.And is it possible to have multiple matches (Item2 only diplay if ordered online etc)

View 1 Replies View Related

Programming :: Connect Multiple Sockets From A Single Client To A Single Server And Keep Them Open?

Oct 13, 2010

I have question about the UNIX sockets. my goal is to connect multiple sockets from a single client to a single server and keep them open...I'm not sure if that is possible to create or not. Do you have any suggestion or an example of code?

View 1 Replies View Related

Programming :: Convert String To Integer Back To String C++ ?

Mar 13, 2010

Code:

The error is:

Code:

What I want to do is take input of ip4 as a string, convert it to an integer to add 1 to it, then reconvert it back to a string. Its not working.

My full code is:

Code:

View 1 Replies View Related

Ubuntu Installation :: Live CD Error: Error_code+0x73/0x80

May 5, 2010

I have the following problem: I burn a Cd with Ubuntu 10.04 and when I turn on the live cd pops up the following error: error_code 0 x73/0x80. Does anyone else have any idea how to deal with this?

Intel Celeron D 325 2533 MHz
ASRock P4i65GV
Ram 512 MB (PC3200 DDR SDRAM)
BIOS Type AMI (06/10/2004)
Video Card: WinFast A340 128MB

When you try to install pops up this error: 0 work_notifysig x13/0x1b.

View 9 Replies View Related

Ubuntu Installation :: Error: 4.940378 [<c0570be3>] Error_code+0x73/0x80

Jan 13, 2010

When I try to run the install from CD I get the following error: 4.940378 [<c0570be3>] Error_code+0x73/0x80

This then locks me up with the curser blinking and the num lock, caps lock, scroll lock lights blinking. I have searched throughout multiple forums but can't find an answer.

View 4 Replies View Related

Programming :: Asm 64bit Registers - "64-bit Linux Allows Up To Fourteen Parameters To Be Transferred In Registers (6 Integer And 8 Floating Point)."

Mar 28, 2010

I have tried to learn how 64bit asm (nasm in my case) works and found, among the many disparate pieces of info on the net, a few vague inferences that floating point registers can be used for other purposes than what they are intended for, example: "64-bit Linux allows up to fourteen parameters to be transferred in registers (6 integer and 8 floating point)." This would be fantastic for string operations/manipulation (I have never used asm for floating-point operations), can anyone shed a bit of light?

View 8 Replies View Related

Programming :: Unix Programming - Single Thread Server Can Support Exactly 2 Clients At Once

Sep 28, 2010

A simple TCP based chat server could allow users to use any TCP client (telnet, for example) to communicate with each other. For this question you should consider a single process, single thread server that can support exactly 2 clients at once, the server simply forwards whatever is sent from one client to the other (in both directions). Your server must not insist on any specific ordering of messages as soon as something is sent from one client it is immediately forwarded to the other client. As soon as either client terminates the connection the server can exit

View 4 Replies View Related

Programming :: Unix Programming - Single Process That Does Not Start Up Any Other Threads

Sep 28, 2010

i want a process that can operate as both a TCP echo server and a UDP echo server. The process can provide service to many clients at the same time, but involves a single process that does not start up any other threads.

View 3 Replies View Related

Ubuntu Networking :: 4 Digit Pin Isn't Enough To Connect?

Jun 9, 2011

I'm staying in a new flat and the landlord told me the widow has a four digit pin. The network shows up as WPAA/WPA2 personal. When I go to enter the pin, 4 digits isn't enough to let me try to connect. She swears that's the passcode

View 1 Replies View Related

Ubuntu :: 10.04-Switch Between Dual And Single Screen?

Jul 21, 2010

I am having issues switching between dual monitors and a single monitor.

I have a Dell laptop with an NVIDIA graphics card that I use with a docking station attached to a monitor.

My problem is that if I shutdown without first changing the NVIDIA settings back to the single monitor (the laptop's screen) when I boot with the laptop undocked half the screen is on the monitor that is not attached.

Is there a way to switch between dual and single monitors without using the NVIDIA settings.

View 3 Replies View Related

Ubuntu Networking :: Why 5 Digit Ports Open In 10.10

Jan 2, 2011

I have been running Ubuntu 10.10 and have found that at any time I am connected to the Internet that I will randomly see high port numbers open when doing a port scan on my computer all are in the unknown listings with five digit numbers so I don't know what is going on or who is using them. Please check your system to see if you are having the same thing happen by using network tools and filling in your local ip address in the port scan tab. If you shut down your Ethernet interface and run port scans the high ports are no longer open. this will at least keep whoever is using your ports at bay when you are not using the net.

View 4 Replies View Related

Ubuntu :: Make A 2(n) Digit Number With Additional Zero(s)

Jun 24, 2011

in terminal: if var = 2 and we write the file name "name$i" it would be "name2" but my file name is "name02" (in fact I wanna have a 'for' loop on about 50 files named: a01, a02, ... , a50)

is there any way to make a 2(n) digit number with additional zero(s) like "%02d" in C ?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved