Exercises-Arrays&Structures

Exercises-Arrays&Structures - SYSC-3006 Computer...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
SYSC-3006 Computer Organisation Study Exercises : Arrays and Structures 1. For each of the following C-like declarations of structures, show the corresponding assembly declaration. Provide EQU directives for addressing the elements within the structures (to be used in a later exercise) a. struct { int a; int b }; b. struct { byte a, int b; boolean c } c. struct { char a[10]; int b[4]; byte c } 2. For each of the following C-like declarations of arrays, show the corresponding assembly declaration. a. byte array[10]; b. int array[3] = {0,0,0} c. long int array[20]; d. char array[10][20]; e. int array[3][4]; f. Using the following structure definition TYPEDEF struct { int a; byte b; } STRUCT_TYPE; STRUCT_TYPE array[3]; g. Using the following structure definition TYPEDEF struct { int a; word b; char c[20]; } STRUCT_TYPE; STRUCT_TYPE array[5]; 3. For each of the following assembly structures, show how to access the identified element. a.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/21/2009 for the course SYSC 3006 taught by Professor Yuuono during the Summer '09 term at Carleton.

Page1 / 2

Exercises-Arrays&Structures - SYSC-3006 Computer...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online