Tuesday, August 02, 2011

Chapter 10 slides on seyfarth.tv/asm

I have completed the PDF slides for Chapter 10 and uploaded them to http://seyfarth.tv/asm for people to download as needed.  Chapter 10 is about arrays.  Prior to this chapter a little use was made of arrays, but this chapter shows a wide variety of memory addressing patterns which are applied to arrays.

This is some code to illustrate creating arrays using malloc.  This is far more convenient than using fixed size arrays in the data or bss segment.  It is faster and it allows using very large arrays, while the static arrays are limited to 2 GB.  This is the right way to work with arrays.

There is a sample program which allocates an array, fills it with random integers, and finds the minimum in the array.  There is also some code to copy one array to another using normal looping.

The chapter ends with a discussion of command line parameters which are critical for more Linux applications.

Only 9 more sets of slides to prepare!

No comments: