01.05.2013 Views

Estructura de computadores

Estructura de computadores

Estructura de computadores

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CC-BY-SA • PID_00178132 63 Programación en ensamblador (x86-64)<br />

5.1.1. <strong>Estructura</strong>s <strong>de</strong> datos<br />

Veamos cómo acce<strong>de</strong>r a vectores y matrices utilizando lenguaje C y lenguaje<br />

<strong>de</strong> ensamblador.<br />

Definimos en C un vector y una matriz y hacemos la suma <strong>de</strong> los elementos.<br />

int main(){<br />

}<br />

int vec[6]={1,2,3,4,5,6},mat[2][3]={{1,2,3},{4,5,6}};<br />

int i,j, sumaVec=0, sumaMat=0;<br />

for (i=0;i

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!