CSC258H1 Lecture Notes - Array Data Structure, Memory Address, Data Element
Document Summary
Designing assembly code: making sense of assembly code. At the beginning o program, can create labels for memory. When reading/writing assembly code, recognize portions of locations that are used to store values. # initial value 3, an int is 32 bytes var1: . word 3. # note that a char is 4 bits array1: . byte a , b . # storage unitialized could be used as a. # 40-element character array or a 10 . space 40 same as malloc(sizeof(int)*10) in c. Array2 is a label that"s the address of a 40 bytes space. Can jump to var1, array1, and etc. like a label. When jump to var1, will execute 3 as an instruction: code section syntax. data indicates the start of the data declarations, not a label. text indicates the start of the program instructions, not a label. Main: the initial line to run when executing the program: arrays in assembly language.