lect21

Lect21 - NAME lect21 ORG DW 0FFFEh main store address of main in RESET vector Assembler Directives set up data structures ORG 0200h staring at

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

View Full Document Right Arrow Icon
NAME lect21 ORG 0FFFEh ; store address of main in RESET vector DW main ; Assembler Directives set up data structures ORG 0200h ; staring at address 0200h n_pts DEFINE 8 ; n_pts = Assembler constant = 8 (like #define in C) ; Not a variable -- not stored in memory A DS8 n_pts ; allocate space for array of 8 bytes sumVal DS16 1 ; allocate space for 1 sixteen bit word (in case sum > 255) minA DS8 1 ; allocate space for 1 byte RSEG CODE main mov #0x0A00, SP ; initialize top of stack ; Test of Bigger MOV #1234, R8 MOV #0650, R9 CALL #bigger MOV R9, bigVal ; . ... ; . ... CLR R6 ; main is using R6 ; . ... MOV #55h,R5 ; main is using R5 too ; . .. CALL #fill_A ; fills A array with data PUSH R11 ; main pushes R11 for some reason ; . ... MOV #n_pts,R4 ; pass n_pts = size of array in R4 MOV #A,R5 ; pass address of A in R5 CALL #getmin ; call procedure getmin MOV R4, minA ; save returned value in minA ; . .... POP
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 10/04/2010 for the course ECE 2801 taught by Professor Jarvis during the Spring '08 term at WPI.

Page1 / 2

Lect21 - NAME lect21 ORG DW 0FFFEh main store address of main in RESET vector Assembler Directives set up data structures ORG 0200h staring at

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