Chapter4.7-mikroprocessor

328
-1

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
328
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Chapter4.7-mikroprocessor

  1. 1. Data Movement Instructions A Course in Microprocessor Electrical Engineering Department University of Indonesia
  2. 2. Assembler Detail <ul><li>Directives </li></ul><ul><ul><li>Some common assembly language directives (pseudo-operations) appear in Table 4.21 </li></ul></ul><ul><ul><li>Directives indicate how an operand or section of program is to be processed by the assembler: </li></ul></ul><ul><ul><ul><li>Storing Data in a Memory Segment: DB, DW, DD, SEGMENT, .DATA, ENDS, DUP, ALIGN -ex. 4.12 </li></ul></ul></ul><ul><ul><ul><li>ASSUME, EQU, ORG: the EQU equates a numeric, ASCII, or LABEL to another label -ex. 4.13 ; the THIS refers the data as byte or word -ex. 4.14 ; the ORG (origin) changes the starting offset address of data in the data segment; the ASSUME tells the </li></ul></ul></ul>
  3. 3. Assembler Detail (cont’d) <ul><ul><ul><li>the assembler what names have been chosen for the code, data, extra, and stack segments; the PROC and ENDP indicate the start and end of a procedure (subroutine) -ex. 4.15 ; others are CALLF, CALLN, RETF, RETN, NEAR, FAR -ex. 4.16 </li></ul></ul></ul><ul><li>Memory Organization </li></ul><ul><ul><li>The assembler uses two basic formats for deve-loping software: models and full-segment defi-nitions (available to the MASM assembler) </li></ul></ul><ul><ul><li>Models ( ex. 4.17 ): The TINY model (64 KB) and the SMALL model (128 KB), and HUGE model (>128 KB) </li></ul></ul>
  4. 4. Assembler Detail (cont’d) <ul><li>Full Segment Definitions </li></ul><ul><ul><li>Ex. 4.18 & Ex. 4.19 illustrate the use of full-segment definitions </li></ul></ul><ul><ul><ul><li>Full-segment definitions are also used with the Borland and Microsoft C/C++ environments for procedures developed in assembly language </li></ul></ul></ul><ul><ul><li>More structured form than the model method </li></ul></ul><ul><ul><li>STACK_SEG, DAT_SEG, CODE_SEG, END MAIN </li></ul></ul>
  5. 5. Assembler Detail (cont’d) <ul><li>A Sample Program </li></ul><ul><ul><li>Study carefully Ex. 4.20 </li></ul></ul>

×