* FW: Machine Code
@ 2005-12-12 19:55 Landon Blake
2005-12-12 20:17 ` Brian Raiter
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Landon Blake @ 2005-12-12 19:55 UTC (permalink / raw)
To: linux-assembly
Is it possible to write machine code instruction directly to the
computers memory without using an assembler? Is there an open source
"binary file" editor that someone can recommend that will allow me to do
this?
Do chip manafacturers typically provide an assembler that compiles
assembly language instructions into the machine code for there
processor, or does a programmer have to rely on third parties for the
assemblers?
I'm just wondering if it is possible to write a machine code file
directly without the need for an assembler.
Landon
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: FW: Machine Code
2005-12-12 19:55 FW: Machine Code Landon Blake
@ 2005-12-12 20:17 ` Brian Raiter
2005-12-12 20:36 ` Claudio Fontana
2005-12-13 1:31 ` Ricardo Nabinger Sanchez
2 siblings, 0 replies; 4+ messages in thread
From: Brian Raiter @ 2005-12-12 20:17 UTC (permalink / raw)
To: linux-assembly
> Is it possible to write machine code instruction directly to the
> computers memory without using an assembler? Is there an open source
> "binary file" editor that someone can recommend that will allow me
> to do this?
Are you trying to write instructions to memory or to a file? Assuming
a file, various binary file editors do exist, yes. The traditional
name for them is "hex editor", so you'd probably have better luck
searching for that. emacs has a hexl-mode as well.
You can also use Nasm as a sort of power hex editor, by specifying the
bin output format. This will give you total control over the bytes of
the output file while still allowing you to make use of the
assembler's higher-level features.
Note, though, that Linux doesn't have a ".bin" file format like MS-DOS
that consists entirely of machine code. ELF executable files require a
fair bit of overhead.
> I'm just wondering if it is possible to write a machine code file
> directly without the need for an assembler.
Nothing about Unix executable file formats is proprietary knowledge.
You could build your own copy of the Linux kernel manually, using a
hex editor instead of an assembler. It would probably take you months
of full-time work, but it's certainly possible to do.
b
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FW: Machine Code
2005-12-12 19:55 FW: Machine Code Landon Blake
2005-12-12 20:17 ` Brian Raiter
@ 2005-12-12 20:36 ` Claudio Fontana
2005-12-13 1:31 ` Ricardo Nabinger Sanchez
2 siblings, 0 replies; 4+ messages in thread
From: Claudio Fontana @ 2005-12-12 20:36 UTC (permalink / raw)
To: Landon Blake; +Cc: linux-assembly
--- Landon Blake <lblake@ksninc.com> ha scritto:
> Is it possible to write machine code instruction
> directly to the computers memory
> without using an assembler? Is
> there an open source "binary file" editor
memory or file?
> that someone can recommend that will allow me to do
> this?
>
> Do chip manafacturers typically provide an assembler
> that compiles assembly language instructions into
the machine code
> for there processor, or does a programmer have to
rely on
> third parties for the
> assemblers?
There are assemblers provided by various parties,
manufacturer included, for popular architectures and
operating systems.
> I'm just wondering if it is possible to write a
> machine code file
> directly without the need for an assembler.
sure.
For small trivial tasks (change one opcode, change
static data) I use xxd and xxd -r (the reverse
operation of xxd, a data dumper similar to od).
man xxd
> Landon
CLaudio
___________________________________
Yahoo! Messenger: chiamate gratuite in tutto il mondo
http://it.messenger.yahoo.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FW: Machine Code
2005-12-12 19:55 FW: Machine Code Landon Blake
2005-12-12 20:17 ` Brian Raiter
2005-12-12 20:36 ` Claudio Fontana
@ 2005-12-13 1:31 ` Ricardo Nabinger Sanchez
2 siblings, 0 replies; 4+ messages in thread
From: Ricardo Nabinger Sanchez @ 2005-12-13 1:31 UTC (permalink / raw)
To: linux-assembly
Quoting "Landon Blake" <lblake@ksninc.com>
Sent on Mon, 12 Dec 2005 11:55:06 -0800
> I'm just wondering if it is possible to write a machine code file
> directly without the need for an assembler.
yes, you want to look at these:
http://www.cag.lcs.mit.edu/dynamorio/
http://www.cag.lcs.mit.edu/rio/
regards.
--
Ricardo Nabinger Sanchez
GNU/Linux #140696 [http://counter.li.org]
Slackware Linux + FreeBSD
Left to themselves, things tend to go from bad to worse.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-12-13 1:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-12 19:55 FW: Machine Code Landon Blake
2005-12-12 20:17 ` Brian Raiter
2005-12-12 20:36 ` Claudio Fontana
2005-12-13 1:31 ` Ricardo Nabinger Sanchez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).