Sponsored Content
Top Forums Programming How Can a Machine Reads a Compiler Since A Compiler is Written in Text! Not Binaries? Post 302257985 by f.ben.isaac on Thursday 13th of November 2008 01:41:50 PM
Old 11-13-2008
Quote:
Originally Posted by jim mcnamara
You are asking the chicken & egg question - which comes first?
You can write a binary executable directly in hex, so very early assemblers (which are compilers) were written that way. There also were link editors as well. ld for example.

I like Corona's explanation. I think at one time I read that as well.

Most compilers are based on lex & yacc. Read about those.

>>You can write a binary executable directly in hex,

And HEX, so what translates these hexes to binaries for the compiler?
If a agree with you, writing in binary 1 & 0 will make machine understand what do you want to do! There has to be convertion between hexes to binaries and since hex is not binaries, what does the conversion! Machine does not giva a damn to anything else except if there is another binary written as a translator who translates hexes back to binary. Any idea?

I'm very new to this, i ask in a very dummy questions to know the basics - only overview, no technical stuff....

THANKS
 

We Also Found This Discussion For You

1. Programming

C compiler to build Sparc/Solaris binaries on Linux

Just that the Subject says. I am looking for a C compiler for Linux x86 that will allow me to compile a C source code file and the resulting binary will be able to run on a Sparc running Solaris. Thanks. (2 Replies)
Discussion started by: lyonsd
2 Replies
gnutls_hex2bin(3)						      gnutls							 gnutls_hex2bin(3)

NAME
gnutls_hex2bin - convert hex string into binary buffer. SYNOPSIS
#include <gnutls/gnutls.h> int gnutls_hex2bin(const char * hex_data, size_t hex_size, char * bin_data, size_t * bin_size); ARGUMENTS
const char * hex_data string with data in hex format size_t hex_size size of hex data char * bin_data output array with binary data size_t * bin_size when calling *bin_size should hold size of bin_data, on return will hold actual size of bin_data. DESCRIPTION
Convert a buffer with hex data to binary data. RETURNS
GNUTLS_E_SUCCESS on success, otherwise an error. SINCE
2.4.0 REPORTING BUGS
Report bugs to <bug-gnutls@gnu.org>. GnuTLS home page: http://www.gnu.org/software/gnutls/ General help using GNU software: http://www.gnu.org/gethelp/ COPYRIGHT
Copyright (C) 2008 Free Software Foundation. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. SEE ALSO
The full documentation for gnutls is maintained as a Texinfo manual. If the info and gnutls programs are properly installed at your site, the command info gnutls should give you access to the complete manual. gnutls 2.8.6 gnutls_hex2bin(3)
All times are GMT -4. The time now is 05:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy