LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > General
User Name
Password
General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!

Notices


Closed Thread
  Search this Thread
Old 04-12-2010, 01:12 PM   #1951
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231

OK OK You dont need to get mad.
Code:
xor eax,eax
push eax
call _exit
leave
ret
 
Old 04-12-2010, 01:16 PM   #1952
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by smeezekitty View Post
Code:
xor eax,eax
push eax
call _exit
leave
ret
What does that do?
 
Old 04-12-2010, 01:21 PM   #1953
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
It should be equivlant of exit(0); in C.
BTW If you think x86 asm hurts your brain, look at powerpc asm:
Code:
	.file	"powerpct.c"
	.section	".text"
	.align 2
	.globl main
	.type	main, @function
main:
	stwu 1,-16(1)
	stw 31,12(1)
	mr 31,1
	li 9,0
	ori 9,9,64000
	addi 9,9,-1
	mr 0,9
	mr 3,0
	lwz 11,0(1)
	lwz 31,-4(11)
	mr 1,11
	blr
	.size	main, .-main
	.ident	"GCC: (GNU) 4.0.0"
	.section	.note.GNU-stack,"",@progbits
 
Old 04-12-2010, 01:24 PM   #1954
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by smeezekitty View Post
BTW If you think x86 asm hurts your brain, look at powerpc asm:
Code:
	.file	"powerpct.c"
	.section	".text"
	.align 2
	.globl main
	.type	main, @function
main:
	stwu 1,-16(1)
	stw 31,12(1)
	mr 31,1
	li 9,0
	ori 9,9,64000
	addi 9,9,-1
	mr 0,9
	mr 3,0
	lwz 11,0(1)
	lwz 31,-4(11)
	mr 1,11
	blr
	.size	main, .-main
	.ident	"GCC: (GNU) 4.0.0"
	.section	.note.GNU-stack,"",@progbits
I can't say x86 asm is that bad once I got used to it, but that looks completely unintelligible!

What is it even supposed to do?

EDIT: reminds me that I once played around with AVR asm a long time ago, but I didn't understand much of it.

(and I'm still wishing I could do this without the 32-bit VM)

Last edited by MTK358; 04-12-2010 at 01:28 PM.
 
Old 04-12-2010, 02:19 PM   #1955
lupusarcanus
Senior Member
 
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022
Blog Entries: 19

Rep: Reputation: 146Reputation: 146
What are you doing now?

What are you doing, now?

Nothing.

The feeling is mutual.

wtf. I'm bored.
 
Old 04-12-2010, 02:57 PM   #1956
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
Squinting, trying to read the screen. Stupid eye allergies. (
 
Old 04-12-2010, 03:06 PM   #1957
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
ls | cat | grep hello
+ I am bored
 
Old 04-12-2010, 03:40 PM   #1958
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
How do you get the division remainder in x86 asm?

Also considering SSHing into my 32-bit VM from my desktop, but I don't understand any of the explanations online.

Or, if possible, SSHing to another 32-bit Linux box on my home network, if I only knew how to do that.

Still wish I can get 32-bit code running on my 64-bit desktop...

Last edited by MTK358; 04-12-2010 at 03:44 PM.
 
Old 04-12-2010, 03:43 PM   #1959
MrCode
Member
 
Registered: Aug 2009
Location: Oregon, USA
Distribution: Arch
Posts: 864
Blog Entries: 31

Rep: Reputation: 148Reputation: 148
Quote:
Originally Posted by MTK358
reminds me that I once played around with AVR asm a long time ago, but I didn't understand much of it.
Heh, I've got a PDF open right now with a "beginner's" tutorial on AVR assembly. It's not quite as simple as x86, to put it lightly. It also appears to be heavily based in Windows/AVR Studio. What's worse, I don't even know if this can apply to my Arduino, or if I'm stuck using the IDE software!

I'd really love to be able to write über-fast programs for the thing; I don't know how well the compiler optimizes the C++ code you write in the IDE.

EDIT: Then again, I can't even get some stupid %$%#$^%$# string parsing code working right now, so maybe I'm too much of a C++ idiot to even be thinking about assembly.

Last edited by MrCode; 04-12-2010 at 04:22 PM.
 
Old 04-12-2010, 03:46 PM   #1960
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
I don't know, both because I use the avrispmkII programmer, not arduino, and I still did it when I used AVR Studio in Windows.

And anyway, I must say that x86 asm isn't nearly as hard as I thought, it's just that there aren't any good tutorials.

Last edited by MTK358; 04-12-2010 at 03:47 PM.
 
Old 04-12-2010, 04:01 PM   #1961
GoinEasy9
Member
 
Registered: Feb 2004
Location: Manorville, New York, USA
Distribution: siduction, openSUSE Tumbleweed
Posts: 379
Blog Entries: 1

Rep: Reputation: 47
I used 6502 asm to learn how Atari loaded programs off of disks. It was fun, especially because of limited commands. Let's see, Load the accumulator, goto the accumulator ... FIRE the accumulator. Oh, just remembered, Atari had a lot of video games (I might have not remembered the commands correctly). Now, back to the regularly scheduled thread that won't die.
 
Old 04-12-2010, 04:04 PM   #1962
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by GoinEasy9 View Post
Now, back to the regularly scheduled thread that won't die.
As long as there are active members of this forum, they have internet access, and as long as they do things, this thread will probably just keep on going...
 
Old 04-12-2010, 04:08 PM   #1963
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
That should be just about infinity.
 
Old 04-12-2010, 04:27 PM   #1964
MrCode
Member
 
Registered: Aug 2009
Location: Oregon, USA
Distribution: Arch
Posts: 864
Blog Entries: 31

Rep: Reputation: 148Reputation: 148
What I'm doing now:


EDIT: Okay, I solved the problem, but the program is still buggy...

And worst of all, I don't know how to fix it!

Yes, I have anger issues. No, I don't have any patience.

Yes, I probably shouldn't be programming, then. No, I'm not going to stop just because of that.

Last edited by MrCode; 04-12-2010 at 06:21 PM.
 
Old 04-12-2010, 06:54 PM   #1965
damgar
Senior Member
 
Registered: Sep 2009
Location: dallas, tx
Distribution: Slackware - current multilib/gsb Arch
Posts: 1,949
Blog Entries: 8

Rep: Reputation: 203Reputation: 203Reputation: 203
Grilling steaks and posting from OUTSIDE. It's a real place it turns out. The rumors are TRUE!
 
  


Closed Thread



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



LinuxQuestions.org > Forums > Non-*NIX Forums > General

All times are GMT -5. The time now is 10:13 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