Programming with 64-Bit ARM Assembly Language by Stephen Smith

Programming with 64-Bit ARM Assembly Language by Stephen Smith

Author:Stephen Smith
Language: eng
Format: epub
ISBN: 9781484258811
Publisher: Apress


_end: mov X0, #0 // Use 0 return code

mov X8, #__NR_exit

svc 0 // Linus command to terminate

Listing 8-4Main program for the memory mapped flashing lights

The main program is the same as the first example, except that it includes a different set of macros.

The first thing we need to do is call the mapMem macro. This opens /dev/mem and sets up and calls the mmap service as we described in the section “In Devices, Everything Is Memory.” We store the returned address into X9, so that it is easily accessible from the rest of the macros. There is error checking on the file open and mmap calls since these can fail.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.