Page 46 - ARM 64 Bit Assembly Language
P. 46

Introduction  29

                                                                       .
                                               FFFFFFFFFFFFFFFF        . .

                                                                     Stack


                                                                    Currently
                                                                     Unused


                                                                      Heap


                                                                 Uninitialized Data
                                                                      .bss
                                                                  Read Only Data
                                                                    .rodata

                                                                  Initialized Data
                                                                     .data

                                                                  Program Code
                                                                     .text
                                                                       .
                                               0000000000000000        . .

                              Figure 1.7: Typical memory layout for a program with a 32-bit address space.


                     program memory correspond to executable code, statically allocated variables, dynamically
                     allocated variables, and automatically allocated variables.



                     1.5 Chapter summary

                     There are several reasons for Computer Scientists and Computer Engineers to learn at least
                     one assembly language. There are programming tasks that can only be performed using as-
                     sembly language, and some tasks can be written to run much more efficiently and/or quickly
                     if written in assembly language. Programmers with assembly language experience tend to
                     write better code even when using a high-level language, and are usually better at finding and
                     fixing bugs.
                     Although it is possible to construct a computer capable of performing arithmetic in any base,
                     it is much cheaper to build one that works in base two. It is relatively easy to build an electri-
   41   42   43   44   45   46   47   48   49   50   51