|
|
Up |
  |
Author: cryptercrypter
Date: Sep 22, 2008 20:34
Here is a simple helloworld program :
------------------------------------------------------------------------
------------------------------------------------------------------------
section .text ;section declaration
;we must export the entry point to the ELF linker or
global _start ;loader. They conventionally recognize _start as
their
;entry point. Use ld -e foo to override the default.
_start:
;write our string to stdout
mov edx,len ;third argument: message length
mov ecx,msg ;second argument: pointer to message to write
mov ebx,1 ;first argument: file handle (stdout)
mov eax,4 ;system call number (sys_write)
int 0x80 ;call kernel
;and exit
mov ebx,0 ;first syscall argument: exit code
mov eax,1 ;system call number (sys_exit)
int 0x80 ;call kernel
|
| Show full article (1.32Kb) |
|
5 Comments |
|
  |
Author: cryptercrypter
Date: Sep 22, 2008 20:31
How do I read a directory using assembly programming in Linux ? More
precisely, what is the system call for that ?
-Crypter
|
| |
|
1 Comment |
|
  |
Author: Jim CarlockJim Carlock
Date: Sep 17, 2008 07:13
(Bob Masta) wrote:
: So, has anyone been down this road yet with a pure
: assembly app? I'd be very grateful for any pointers
: or examples.
Hi Bob,
While I have not dug into the internals of XML manifests and how the OS
effectively calls them (ie, which API gets called before/during loading
an application, something at some point gets called to load an XML sheet
from the resources and it should not matter which compiler/linker builds
the resource information (afterall all PE files are such)). I think the
following represents a good explanation at their purpose and how they
get used.
You use a manifest when you do not want to use the standard Visual Basic
common controls .dll (or you want to use perhaps a common control resource
you developed yourself). The manifest tells the application to use a very
specific common control library.
How does Windows know about different common control libraries? The
following key in the registry describes all of them:
|
| Show full article (2.55Kb) |
|
no comments
|
|
  |
Author: comp.lang.asm.x86comp.lang.asm.x86
Date: Sep 17, 2008 00:15
If you are having trouble posting to clax86,
here is some information that might help you:
1. If you are using an "anti-spam" from address, then you need to be
aware that many ISPs now test for valid domain names. In addition,
there are several proposals for systems which will verify the user
name, as well.
2. To allow you to post without exposing yourself to spammers,
the Clax86 moderation software now replaces your real address with
"spamtrap@ crayne.org", while preserving the rest of the "From:"
header. If you are sending a test message, please use a subject of:
"Test, please do not approve".
Such messages will be returned as "off topic".
Please do not ask the moderator for help if you are
not using a reachable from address.
|
| Show full article (2.31Kb) |
|
no comments
|
|
  |
Author: climber.cuiclimber.cui
Date: Sep 15, 2008 12:16
Hi all,
I need to make the assembly code developed on Linux portable to Mac
OSX. And the assembly code contains plenty of calls to C library
functions, such as printf(), time(), srand(), etc.
The code won't work on Mac OSX. 'gcc' complains that those symbols
(C function names) can not be recognized.
I did compiled some C code on Mac OSX, using :
gcc -S code.c
to obtain the assembly code produced by gcc for Mac OSX. However,
the generated asm code is not readable, and I do not understand it.
Does anyone know how to invoke C library functions on Mac Osx ? Or
there are some resource to check on?
Thanks..
cheers,
tony
|
| |
|
4 Comments |
|
  |
Author: comp.lang.asm.x86comp.lang.asm.x86
Date: Sep 15, 2008 00:15
--
This message is posted periodically by the Clax86 robomoderator.
|
| |
|
no comments
|
|
  |
Author: climber.cuiclimber.cui
Date: Sep 12, 2008 11:11
Hi all,
I am trying to compile assembly code on Mac Osx. The assembly
program contains calls to C library functions, such as functions
defined in ..:
call pthread_create
call rand
...
This will work fine on Linux:
gcc -lpthread file1.s -o file2
But on Mac osx, gcc complains that the function names defined in
can not be resolved.
On linux, gcc 4.0 does not even require to specify '-lpthread' in
command line.
I am new user on MAC. How to get the code compiled on MAC osx? Any
ideas?
thanks.
tony
|
| |
|
no comments
|
|
  |
Author: Christian SchulzChristian Schulz
Date: Sep 12, 2008 09:10
Hello!
At the last week, i passed a tutorial ( http://www.tutorials.de/forum/
programming-tutorials/20706-ein-eigenes-kleines-betriebssystem.html,
german), which shows, how a minimal operating system (written in
assembler) works.
The result was a "OS" which was able to boot up from a 3,5" floppy,
gives a line text out, and restarts the pc. I compiled it with NASM
2.03. Ok, it seems to work.
The sourcecode of the boot.asm: http://nopaste.tshw.de/1221235441c1562/
The code of the kernel.asm: http://nopaste.tshw.de/1221235511c1562/
But my question is now: How can i carry on? And how can insert C-Code
to run more programs?
Im very sorry for my english, and i hope that you understand, what i
have written.
Christian
|
| |
|
5 Comments |
|
  |
Author: Phoenix87Phoenix87
Date: Sep 12, 2008 01:25
I hope I'm not writing an OT here.
I'm trying to write some notes about x86 Assembly under Linux, but
since English isn't my main language and I have no experience of
pre-80286 assembly programming with real mode, segments etc., I
welcome anybody who may give me a hand correcting and improving my
papers (from the point of view of English language as well of
technical contents).
|
| |
|
9 Comments |
|
  |
Author: Himanshu ChauhanHimanshu Chauhan
Date: Sep 12, 2008 00:02
Hello all,
I know a little bit of assembly but I don't know any assemblers syntax.
I want to learn assembly in more detail. Which book is better? Art of
Assembly or Programming from Ground up. AoA discusses arch in detail but
I don't want to spend time in HLA. On the other hand, PGU doesn't
discuss arch in detail but discusses Gas in details. I am little bit
confused here.
Thanks and Best Regards
--Himanshu
|
| |
|
8 Comments |
|
|
|
|