-

Changes

Jump to: navigation, search

Machine Dependencies

56 bytes removed, 09:52, 28 July 2017
no edit summary
Because of the variable width of an int, it is recom-mended recommended that short or long be used wherever possible in
preference to int. The exception to this is where a quantity
is required to correspond to the natural word size of the
this problem other than to avoid code which depends on a
particular ordering. In particular you should avoid writing
out whole structures to a file (via _�f_�w_�r_�i_�t_�e<strong>fwrite</strong>()) unless the
file is only to be read by the same program then deleted.
Different compilers use different amounts of padding between
One technique through which machine unavoidable machine
dependencies may be managed is the predefined macros pro-vided provided by each compiler to identify the target processor and
operating system (if any). These are defined by the compiler
driver and may be tested with conditional compilation
___________________________________________
|_M�_a�_c�_r�_o�_______________D�_e�_f�_i�_n�_e�_d�__f�_o�_r�_____________�<strong>_Macro______________Defined_for___________</strong>|
| i8051 8051 processor family |
| TOS Atari ST |
|___________________________________________�__________________________________________|
#if DOS char * filename = "c:file"; #endif /* DOS */ #if CPM char * filename = "0:B:afile"; #endif /* CPM */

Navigation menu