LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-25-2010, 09:24 AM   #1
dakoder
LQ Newbie
 
Registered: Dec 2009
Location: Swindon Wiltshire England Earth
Distribution: Debian, mint-9, tinycore
Posts: 1

Rep: Reputation: 0
help with sending 'hello world' over an ethernet in linux assembly languge


Help.....

I have is an assembly language program which now needs to get 64 bytes of data from the network which is being transmitted every 100 ms (0.1 of a second) by a remote computer, I currently use

'telnet 192.168.xxx.xxx port'

in a bash shell to dump this data which works fine,

I now need to read this data in real time from within a linux assembly language program but do not know which is the best way to do this.
I could get telnet to pipe it to a file and just read the file from within the assembly code (but there may be issues with file sharing)
X11 graphics under assembly works well and I wondered if there was a similar system for using the ethernet in linux ?
is there a '/proc/my_RxTx_serial_data_port.txt file which the kernel automaticaly updates ?
is there a small 'hello ethernet' ELF binary I could pick apart which demonstrates sending/receiving 'hello world' over the ethernet ?
or do I use linux system calls and if so is there a code snippet for this ?

thanks.

Graham
 
Old 06-25-2010, 01:51 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,291

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
If you have the info pages installed, you can surely find the system calls in C. Don't do that job in assembler unless you absolutely have to (i.e. some twit of an IT lecturer dreamed this up for you and insists on it). If so, he's a sadist. Where you would use assembler is some routine that will be run a zillion times, and you call that from a C program, and it's all in ram.
 
Old 06-25-2010, 03:54 PM   #3
fruttenboel
Member
 
Registered: Jul 2008
Location: Tilburg NL
Distribution: Slackware 14.2 ciurrent, kernel 3.18.11
Posts: 270

Rep: Reputation: 48
Quote:
Originally Posted by dakoder View Post
Help.....

I have is an assembly language program which now needs to get 64 bytes of data from the network which is being transmitted every 100 ms (0.1 of a second) by a remote computer, I currently use
The days of assembly language ended over 10 years ago. Unless your processor is less than a 386, don't even think of assembly language. Any scripted language will be fast enough for any purpose.

If you want to stand out in the crowd, use one of the Wirthian languages to get the job done: Pascal, Modula-2 or Oberon. All of them support low level programming (to a certain degree) so you can do most of the things you want to.

The business kit is right... Only very rare cases justify the use and burden of assembly language.
 
Old 06-26-2010, 01:30 PM   #4
dakoder
LQ Newbie
 
Registered: Dec 2009
Location: Swindon Wiltshire England Earth
Distribution: Debian, mint-9, tinycore
Posts: 1

Original Poster
Rep: Reputation: 0
Some kind soul on the http://tinycorelinux.com/forum/
pointed me to http://sourceforge.net/projects/lscr/
this fantastic resource list everyting in the system call tables and has loads of example low level stuff. perfect.

thanks to all who helped, this kind of technical support really does have a gold seal attached !

graham

Last edited by dakoder; 06-29-2010 at 12:45 PM. Reason: updating post instead of renewing
 
Old 07-03-2010, 05:49 AM   #5
dakoder
LQ Newbie
 
Registered: Dec 2009
Location: Swindon Wiltshire England Earth
Distribution: Debian, mint-9, tinycore
Posts: 1

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by fruttenboel View Post
The days of assembly language ended over 10 years ago.
Oh no it did not ! http://www.menuetos.net/ (32/64 bit)

now if only menuet had a /proc & /media & /dev directory and could load ELF binaries and SU privilages and have all drivers and kernel written in assembler all nice and ready for the not now but soon to be embedded intel x86 micro-controller........<grin>

graham
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Chinese Languge pack Maurice Arthur MEPIS 2 02-15-2009 09:59 PM
Ethernet card not working in FC3.. Anybody in the world Who can help me out .. ozzie_penguin Linux - Hardware 1 08-17-2005 04:12 AM
Interface card(Ethernet) not sending DHCP requests vishalsethia Linux - Newbie 5 05-08-2005 01:12 AM
languge options user27519298 Mandriva 2 02-27-2005 11:47 PM
how to add russian languge in mandrake 10.0? icecube76 Mandriva 2 06-02-2004 02:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:17 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration